Developing UMAAPy
Contributor Environment
Use an editable install so tests and local commands resolve the workspace src/ tree:
python -m pip install --upgrade pip
pip install -e .[tests,cyclone]
Verify import resolution points to this checkout (not a stale site-packages install):
UMAAPY_AUTO_INIT=0 python -c "import umaapy,inspect; print(umaapy.__file__)"
Expected output ends with src/umaapy/__init__.py from your local repository path.
Type Generation
Cyclone DDS nightly Python bindings are required for Python 3.13 and type generation:
pip install cyclonedds-nightly==2025.11.25
Generate types from all IDL files under specs/idls/:
make generate-types-clean
Equivalent direct script invocation:
python scripts/generate_types.py --clean --verbose
This writes generated code under src/umaapy/UMAA/ (package tree, not a single file).
CI validates generated output drift in a dedicated Windows job by regenerating types and checking for tracked/untracked changes in
src/umaapy/UMAA/. If CI fails this check, regenerate locally and commit the updated generated files.
Troubleshooting:
With
cyclonedds-nightly==2025.11.25, run generation on Windows; current Linux nightlyidlccan segfault.If
idlcis not onPATH, setIDLC_PATH=/path/to/idlcbefore running generation.Use
--verboseto print per-file generation progress and failures.
Testing Workflow
UMAAPy tests are classified with explicit pytest markers:
unit: Fast isolated tests with no live DDS middleware requirements.component: Multi-module tests without live vendor middleware requirements.integration_vendor: Tests that require a live DDS runtime (Cyclone-first lane; marker name retained for compatibility).
Default test runs use the fast path and exclude vendor integration tests:
pytest
This is equivalent to:
pytest -m "not integration_vendor"
Run only middleware integration tests:
pytest -m integration_vendor
Useful collection checks:
pytest --collect-only
pytest -m "not integration_vendor" --collect-only
pytest -m integration_vendor --collect-only