Hi would like to suggest to put up some criteria, to reject merge request.
1. Python syntax and indention errors prohibit the pre-compilation and installation with some package managers.
Changed python code should be tested using the compileall module and possibly rejected.
http://pymotw.com/2/compileall/
https://docs.python.org/2/library/compileall.html
2. Any code that catches the Base exception class without re-throwing the exact same exception objects, needs to be hold for additional assessment.
issue #1701catch
issue #1700raise
Review criteria
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Review criteria
Code: Select all
python -m compileall -f .
Compiling .\Mod\Import\automotive_design.py ...
SyntaxError: ('invalid syntax', ('.\\Mod\\Import\\automotive_design.py', 2353, 54, '\t\teval_wr1_wr = ((SIZEOF(self.self.styles) == 1) XOR (SIZEOF(None) == 0))\n'))
Compiling .\Mod\Import\ifc2x3.py ...
SyntaxError: ('invalid syntax', ('.\\Mod\\Import\\ifc2x3.py', 8809, 44, '\t\teval_wr5_wr = ( not (EXISTS(self.axis) XOR EXISTS(self.refdirection)))\n'))
Compiling .\Mod\Import\ifc4.py ...
SyntaxError: ('invalid syntax', ('.\\Mod\\Import\\ifc4.py', 10588, 63, '\t\teval_axisandrefdirprovision_wr = ( not (EXISTS(self.axis) XOR EXISTS(self.refdirection)))\n'))
Re: Review criteria
Interesting, I didn't know that tool! Good find! Yes, let's start using it from now on
These ifc*.py files seem autogenerated by some tool... It's annoying that they contain syntax errors
These ifc*.py files seem autogenerated by some tool... It's annoying that they contain syntax errors
Re: Review criteria
Yes, thats a beta generator of the SCL (Step Class Library). It was intended to use them as high level parser for all kind of STEP files. But so far they are just dead code...
Stop whining - start coding!
Re: Review criteria
But this code looks seriously flawed. In python you can't define new binary operators. Bitwise xor would be "^" whereas logical xor is a complicated as it is in c "bool(x) != bool (y)" or "(not x) != (not y)"
Re: Review criteria
True, but this kind of bugs one have to fix in the SCL generator. The whole python code export is highly experimental. If it becomes important we have to team up with SCL to get it to better quality.
So far we use in Import still the OCAF importer, but for the long run I hope we can get ride of that special code portion of OCC....
Long story short - just ignore it
So far we use in Import still the OCAF importer, but for the long run I hope we can get ride of that special code portion of OCC....
Long story short - just ignore it
Stop whining - start coding!
Re: Review criteria
3. Files need to have proper licenses. The author information in the source code should match the authors of the git commits. (exceptions should be explained by the contributor)
4. Python modules should compile their resources at compile time (like Draft and Arch)
4. Python modules should compile their resources at compile time (like Draft and Arch)
Re: Review criteria
I think the only missing ones now are sanguinariojoe's ship and plot. There is the spreadsheet module too, but it seems that the C++ version is coming now...shoogen wrote:4. Python modules should compile their resources at compile time (like Draft and Arch)