Core Python tooling for Dawn.
Main Dawn project: railab/dawn.
dawnpy owns:
- repository and build helpers
- descriptor parsing, validation, and generation
- object ID decoding
- shared device/runtime helpers used by other Dawn Python packages
Transport clients and the project QA runner are split into separate packages:
dawnpy-serialdawnpy-candawnpy-udpdawnpy-lwm2mdawnpy-modbusdawnpy-tests
Dawnpy can be installed by running pip install dawnpy.
To install latest development version, use:
pip install git+https://github.com/railab/dawnpy.git
Or install directly from Dawn project sources:
cd tools/dawnpy
pip install -e .
Show help:
python -m dawnpy --help
Validate a descriptor config:
python -m dawnpy desc-valid boards/sim/sim/sim/configs/nsh_tests
Add --json for a machine-readable validation report instead of the
human-readable summary:
python -m dawnpy desc-valid --json boards/sim/sim/sim/configs/nsh_tests
Generate descriptor C++ from YAML:
python -m dawnpy desc-gen descriptor.yaml
Export a descriptor YAML file as a machine-readable JSON node/edge graph (nodes for IO/program/protocol/system objects, edges for program inputs/outputs/reset and protocol bindings; objects that fail typed decoding stay visible as invalid generic nodes):
python -m dawnpy desc-graph descriptor.yaml
Build a board/config:
python -m dawnpy build sim/sim/sim:nsh_tests
Build a batch of configs:
python -m dawnpy batch tools/config-build-all.txt
Run the core package QA locally:
cd tools/dawnpy
tox -e py
tox -e format
tox -e flake8
tox -e type
Unit tests must be runnable from the standalone dawnpy repository without
the Dawn source tree checked out. Tests that exercise source-backed behavior
should heavily mock Dawn source discovery and header loading, or build minimal
fake Dawn source/header layouts inside temporary directories, instead of
reading real Dawn sources.
See Dawn Python tooling for the full Dawn Python tooling documentation.