chore(silo): add root package.xml and migrate to SDK APIs #373
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The silo mod has a non-standard structure compared to all other Kindred addons (sdk, gears, datums, solver). It needs a root-level
package.xmland should migrate from directFreeCADGui.*calls to SDK APIs.Current Problems
1. Non-standard
package.xmllocationSilo's
package.xmllives atmods/silo/freecad/package.xml(depth 2) instead ofmods/silo/package.xml(depth 1). Every other addon places it at the mod root:mods/sdk/package.xmlmods/gears/package.xmlmods/datums/package.xmlmods/solver/package.xmlThe addon loader accepts depth 2 as a fallback, but this is fragile and inconsistent.
2. Duplicate initialization in Create core
Silo-specific setup is split between
mods/silo/freecad/InitGui.pyandsrc/Mod/Create/InitGui.py. The core module registers:This couples Create core to Silo implementation details. All of this should live in the silo addon itself.
3. Direct
FreeCADGui.*calls instead of SDK APIsSilo registers its origin via
FreeCADGui.addOrigin()and dock panels through Create core, instead of using SDK functions:kindred_sdk.register_origin()— for origin registrationkindred_sdk.register_dock_panel()— for auth and activity panelskindred_sdk.register_overlay()— already used (one call)4. CMake install targets miss
package.xmlThe current CMake install only copies
freecad/andsilo-client/:No root-level
package.xmlorInit.pyis installed.Proposed Changes
In
mods/silo(silo-mod repo)package.xmlatmods/silo/package.xml:Add root
Init.py— thin wrapper that addssilo-client/tosys.paththen delegates tofreecad/Init.pylogic.Migrate silo InitGui.py to use SDK APIs:
kindred_sdk.register_origin(silo_origin)instead ofFreeCADGui.addOrigin()kindred_sdk.register_dock_panel()for auth and activity panelssrc/Mod/Create/InitGui.pyinto silo's ownInitGui.pyRemove old
freecad/package.xml(or keep as secondary metadata if needed).In
createrepoRemove Silo-specific setup from
src/Mod/Create/InitGui.py:_register_silo_origin()(duplicate)_register_silo_document_observer()_setup_silo_auth_panel()_check_silo_first_start()_setup_silo_activity_panel()Update CMake install targets in
src/Mod/Create/CMakeLists.txt:Acceptance Criteria
mods/silo/package.xmlexists at mod root following the standard patternsrc/Mod/Create/InitGui.pykindred_sdk.register_origin()kindred_sdk.register_dock_panel()package.xmlandInit.pyat mod rootReference
Standard addon structure (e.g. datums):