Skip to content

Latest commit

 

History

History
91 lines (62 loc) · 1.72 KB

File metadata and controls

91 lines (62 loc) · 1.72 KB

dawnpy

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-serial
  • dawnpy-can
  • dawnpy-udp
  • dawnpy-lwm2m
  • dawnpy-modbus
  • dawnpy-tests

Install

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 .

Core Commands

Show help:

python -m dawnpy --help

Validate a descriptor config:

python -m dawnpy desc-valid boards/sim/sim/sim/configs/nsh_tests

Generate descriptor C++ from YAML:

python -m dawnpy desc-gen 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

Development

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.

Documentation

See Dawn Python tooling for the full Dawn Python tooling documentation.