Development setup¶
1. Bootstrap the development profile¶
From the repository root:
Activate the environment generated by bootstrap. On POSIX-like systems:
The dev profile selects the broad source/tool groups and installs the studio, mechatronics-storage, rf, and test Python extras.
If you are working only on a lightweight subsystem, a narrower profile can speed setup, but run final tests in a dev-capable environment before merging.
2. Inspect dependency state¶
Never resolve a failing bootstrap by deleting dirty external trees without checking whether they contain local work.
3. Editable package workflow¶
Bootstrap installs the project environment; when developing manually, keep the repository importable from the checkout. The package exposes:
PYTHONPATH=. plus python -m embeddyn is also useful in isolated test/subprocess workflows.
4. Baseline checks¶
Run before modifying code so you know whether a failure is pre-existing:
For Studio JavaScript:
If Node is unavailable and your change does not touch Studio JavaScript, document that limitation rather than silently claiming the check passed.
5. Run subsystem smoke tests¶
Studio¶
Check /api/health and /api/docs, then exercise the changed UI/API path.
Mechatronics¶
embeddyn mechatronics validate examples/mechatronics/dc-motor.yaml
embeddyn mechatronics run examples/mechatronics/dc-motor.yaml --mock
RF¶
Classic graph/build¶
Use the graph/specification fixtures relevant to the change. Full Zephyr/Renode builds require the full workspace and cannot always be exercised in lightweight CI.
6. Development directory hygiene¶
Generated directories that should normally stay out of source commits include:
.venv/,.embeddyn/,- local Studio data directories,
- run output/artifact stores,
- generated Zephyr build directories,
- openEMS simulation output,
- pytest/cache/build/wheel artifacts.
Small deterministic fixtures belong under tests/ or examples/ and should be intentionally reviewed.
7. External tool strategy¶
Do not require every developer to install every external simulator to run first-party unit tests.
Use this progression:
- unit test pure parsing/model logic,
- fake/subprocess-mock adapter behavior,
- mock adapter end-to-end project run,
- optional integration test with real tool,
- physical/HIL/lab validation where applicable.
Real external integration failures should not be hidden behind mocks; instead, mark the validation level in the PR/release notes.
8. Documentation preview¶
All new documentation is plain Markdown with Mermaid diagrams. Check relative links and code blocks locally. Git hosting platforms that support Mermaid will render the C4 diagrams directly; the text around every diagram must still explain the architecture if rendering is unavailable.