That's a good idea!sgrogan wrote:@simonvanderveldt, can you post an outline of what the transition would look like at the moment, similar to what looo did previously? Including add-on WB/Modules and macros.simonvanderveldt wrote:If they are to be normal Python models then there shouldn't be dashes/hyphens in their name, see https://stackoverflow.com/questions/761 ... mport-them
What's been done so far:
- Add non-GUI initialization of normal python modules to FreeCADInit
- Add GUI initialization of normal python modules to FreeCADGuiInit.py
- Add new Python package to contain the modules, should be a namespace package so it's easy to extend
- Add example/prototype migration of FreeCAD module to regular Python module, where the module has dependencies on non-migrated FreeCAD modules (Arch)
- Add example/prototype migration of FreeCAD module, where the module has dependencies on a migrated FreeCAD module (Start + Web)
The first two steps are backwards compatible, it's been working fine for me, so I guess I can create a PR to add that to master?
The latter two steps aren't 100% done because the custom FreeCAD filecopy action on make for the .py files in the CMakeListsstill needs to be added. Apart from that both should be fine. I'd like some feedback that it also works on Windows and macOS though.
Also their package and modules names still have caps in them, which ideally shouldn't be the case.
TODO:
- The web module adds some commands that can be added to toolbars which contain imports that are incorrect, these need to be fixed. Might be the same for the other modules
- Migrate all the packages, these can be done one by one, no need to do them all at once
- If we want we can also change the current FreeCAD custom init every FreeCAD Modules must have to the use of the regular __init__.py as mentioned here. Would be nice to know why a custom init module was used in the first place though
- Update the docs
- Add a deprecation warning/remove the old module code
P.S. I've just rebased the code on current master
[edit] The code lives here https://github.com/simonvanderveldt/Fre ... ce-modules