Thanks for helping improve astrameter. This document covers local development; for end-user install options see README.md.
- Python 3.10 or newer (3.10–3.13 are tested in CI)
- uv for dependencies and virtualenvs
From the repository root:
uv sync --extra devThis creates .venv, installs runtime and dev dependencies, and installs the project in editable mode so astrameter imports resolve without PYTHONPATH.
Application code lives under src/astrameter/ (src layout). Notable pieces:
| Path | Role |
|---|---|
src/astrameter/main.py |
CLI entry and device orchestration |
src/astrameter/config/ |
INI loading, powermeter factories |
src/astrameter/powermeter/ |
Powermeter backends |
src/astrameter/ct002/ |
CT002/CT003 UDP emulator |
src/astrameter/shelly/ |
Shelly protocol emulation |
tests/ |
Integration-style tests |
Co-located tests use *_test.py next to modules under src/astrameter/.
uv run ruff format .
uv run ruff check .
uv run mypy src/
uv run pytestCI runs the same (ruff format check, ruff check, mypy on src/, pytest with coverage on supported Python versions).
Follow the checklist in AGENTS.md (Adding a powermeter), using paths under src/astrameter/ (e.g. src/astrameter/powermeter/<module>.py, src/astrameter/config/config_loader.py).
- Base feature work on
developand open PRs againstdevelop. - Releases are merged to
mainas appropriate for the project maintainer.
For user-visible changes, add or update the single bullet under ## Next in CHANGELOG.md (see AGENTS.md — Changelog).