Introduce YAML configuration file for deployment-specific settings #29
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 addon has no external configuration file. All deployment-specific values are either hardcoded as Python literals or stored in FreeCAD's XML preference system. This makes it difficult for administrators to pre-configure deployments, manage fleet-wide settings, or use the
silo-clientsubmodule from non-FreeCAD applications that lack FreeCAD's preference infrastructure.A YAML configuration file (e.g.
silo.yaml) would provide a single, human-readable source of truth for values that vary per deployment.Current State
No YAML files exist anywhere in the repository. No
yaml/pyyamlimports are present. Configuration is split across:ParamGet) — API URL, token, SSL settings, projects dirSILO_API_URL,SILO_API_TOKEN,SILO_PROJECTS_DIRValues That Should Move to YAML
Domain / Schema Configuration
"kindred-rd"— see #28)_DOMAIN_LABELSdict mapping category prefixes to human labels (schema_form.py:19-30)_ITEM_TYPES:["part", "assembly", "consumable", "tool"](schema_form.py:32)_SOURCING_TYPES:["manufactured", "purchased"](schema_form.py:33)_KNOWN_DEFAULTS: 12 "common" property names (schema_form.py:459-472)["draft", "review", "released", "obsolete"](silo_commands.py:1652)Timing / Network
_MAX_RETRIES=10,_BASE_DELAY=1,_MAX_DELAY=60Paths / Extensions
~/projects"cad"".kc"Proposed Config File Structure
Config File Resolution Order
SILO_CONFIGenvironment variablesilo.yamlin the addon directory (next tofreecad/)~/.config/kindred/silo.yaml(XDG user config)Proposed Implementation
pyyamlas a dependency (or use a minimal YAML parser to avoid the dependency).config.pymodule that loads and merges the YAML config with defaults.config.get("schema"),config.timeouts.http_default).silo.yaml.examplewith all defaults documented.Acceptance Criteria
silo.yaml.exampleis shipped with documented defaultssilo-client