DynamicData icon indicating copy to clipboard operation
DynamicData copied to clipboard

Python Module Structure

Open PhoneDroid opened this issue 4 months ago • 1 comments

I planned on recommending the Python Module Structure upgrade but I ended up doing the work myself.

TLDR, I upgraded the addon structure to the 'new' Python Module Structure that loads addons similar to Python package / modules.


The changes consist of the following:

  • Source code / assets relevant during runtime are moved into a freecad/Dynamic_Data subfolder.
  • The new entrypoints are __init__ & init_gui
  • Separated the README media from the runtime assets
  • Fixed up the imports - though relative imports would be cleaner
  • Updated the README media links

This change isolates the addons files into it's own namespace meaning you can name them whatever you want without crashing into other addons files!

Again relative imports are now easy and preferred.


Please test test test.


Also before merging you might want to consider creating a new GitHub release for the CURRENT code. I'd recommend calling the tag v0.2.75 or v2.75.0

( Not sure, please correct the version string in the manifest, semantic versioning requires the format x.y.z )

Afterwards I'd increase the version and merge.

Let me know if you have any questions!

PhoneDroid avatar Oct 20 '25 06:10 PhoneDroid

Thanks for the PR. Seems to work okay so far. I'll use it for a while before merging, but I haven't been using FreeCAD much lately.

mwganson avatar Oct 21 '25 19:10 mwganson

@mwganson It's been a while ;D

PhoneDroid avatar Nov 18 '25 23:11 PhoneDroid