GSOC-proposal python3-port

Contributions from the participants, questions and answers to their projects.
Discussions of proposals for upcoming events.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

GSOC-proposal python3-port

Post by looo »

Finally, I want to give it a try. Hopefully it's not already too late. This is my draft for a gsoc-proposal.

Porting FreeCAD to python3 (finally)

FreeCAD still lacks python3-support. There is a branch which builds with python3 but as there is much work done on all the CAD-modules there are new incompatibilities introduced quite often. At the moment I try to have the python3-branch synchronized with the master branch of FreeCAD. For this task quite some time is needed. To finally make FreeCAD python3-compatible there is the need to merge this branch into master. While modules are introducing python3-incompatibilities quite often it is not allowed to break any code currently working with python2.
The port of FreeCAD to python3 is quite important because other libraries have already disabled the support for python2 (eg. netgen). FreeCAD depends quite a lot on python and python modules. Therefore a release of FreeCAD 0.17 with python3 will make the library more future-prove and give 3rd-party developers the chance to use the latest python features.

goal
The work proposed to be done within the GSOC is aiming at FreeCAD compatibility with python3.6. At the end of the project the master of FreeCAD should be ready for a release with python3.6.

tools
This goal will be achieved by using the conda-package-manager which gives advanced possibilities to deploy test builds. There are already test builds available to test FreeCAD with python3 on linux 64 and windows will be supported soon.
For me it was/is a pleasure to work with conda to organize all the builds which had to be recompiled with python3. This tool gives the possibility to not only use a package-manager with consistent api across all major platforms, but also use it's modern features to simplify work for the maintainers and developers.

todo
- merge py3 in master (step by step to not break python2 functionality)
- make FreeCAD with python3 packages available via conda
- testing phase of main functionality (fixing py3-incompatibilities)
- testing of 3rd-party libraries (fixing py3-incompatibilities)

why choose this proposal?
While FreeCAD is on the CAD level quite dependent on opencascade (an open source CAD-Kernel), it has the possibility to extend the program with python-modules. This allows to automate processes and integrate other projects based on python. Allthough there are newer scripting languages available, python is still very popular and many scientist/ companies are using it nowadays. Working on the base to stay up-to date with python (python3) and maintaining FreeCAD via a python-package manager (conda) will help to get more people into the project.

why me?
I already work on the python3 port, and have a good picture of what is going on. To make the transition as smooth as possible time is needed. If there is the possibility to work on this project within GSOC I could spend more time on this project and the port will be done faster and smoother.

https://docs.google.com/document/d/1ode ... sp=sharing
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: GSOC-proposal python3-port

Post by ickby »

Hello Loo,

thanks for the proposal, definitely not too late!

I recommend to add a more detailled planning. Basically use your todo list and divide it into the 3 project phases. Make a clear description what to do in which phase, what the output will be and which kind of code will be ready in whcih phase. Often a weekly detail level is a good choice.

Furthermore it is required from google that code is written during GSoC. So you should put more emphasis of what the changes are you like to do, how your work effects the code and what may be needed to change.

Regards,
Stefan
simonvanderveldt
Posts: 62
Joined: Tue Mar 14, 2017 2:11 pm

Re: GSOC-proposal python3-port

Post by simonvanderveldt »

If you need any help when working on this feel free to ping me
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: GSOC-proposal python3-port

Post by looo »

@ickby : thanks for the review. I have updated the proposal at google docs. https://docs.google.com/document/d/1ode ... sp=sharing
@simonvanderveldt : thanks, I will do so. ;)
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: GSOC-proposal python3-port

Post by ickby »

Hello loo,

I think the proposal is already pretty good. Ther eis one thing I think you can add some more comments, and that is the automatic testing. What are your ideas about the interaction about the current test infrastructure (travis etc) with your intend to use conda. Is condy only for development or also later CI use? Do you intend to keep python 2&3 compatibility with CI tests or python 3 only?

Apart from that I think it is in a state that it could very well be added to GSoC. I recommend to upload it as draft to GSoC already and make the last finishing edits than.

Regards,
Stefan
Post Reply