How to grade a student software project?
My policy, my 2 cents:


Part of the grading corresponds to the expectation of the "customer". if this project is considered as an actual development project in industry, does it deserves that the customer is paying its full price. For instance, I will give 10 points (over 20) for that criteria. If the software fulfil all the requirements then the student is awarded the 10 points, otherwise he/she starts losing some of the points.
Part of the grading is for the quality of the code (structure, naming of variable, algorithmic aspects, etc.). I give 5 points at max here.
The rest is for the tasks around the code: modeling, UML stuff, reports, etc. The last 5 points can be found here.