Skip to content

Development setup

1. Bootstrap the development profile

From the repository root:

python3 bootstrap.py bootstrap --profile dev

Activate the environment generated by bootstrap. On POSIX-like systems:

. ./.embeddyn/env.sh

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

python3 bootstrap.py status
python3 bootstrap.py doctor --profile dev

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:

embeddyn -> embeddyn.__main__:main
vsd      -> embeddyn.__main__:main   # compatibility alias

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:

pytest
python -m compileall -q embeddyn vsd
python -m embeddyn --help

For Studio JavaScript:

node --check embeddyn/local/static/app.js

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

embeddyn studio doctor
embeddyn studio run --no-open-browser

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

embeddyn rf status
embeddyn rf touchstone examples/rf/antenna_fixture.s1p --target-hz 2.4e9

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:

  1. unit test pure parsing/model logic,
  2. fake/subprocess-mock adapter behavior,
  3. mock adapter end-to-end project run,
  4. optional integration test with real tool,
  5. 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.