🚧 Under Construction
This project is currently under development. Please check back later for updates.
This is is a support package for:
These two packages do not depend on each other, yet the services they spawn will communicate with each other in the form of serialized messages (sent via websockets). This requires the code in these two packages to follow the same convention on how messages are serialized and deserialized. To enforce this, these two packages are dependant on the nightskycam-serialization package and use its API for serializing / deserializing messages.
Dependency management with pip
is easier to set up than with poetry
, but the optional dependency-groups are not installable with pip
.
- Create and activate a new Python virtual environment:
python3 -m venv --copies venv source venv/bin/activate
- Update
pip
and build package:pip install -U pip # optional but always advised pip install . # -e option for editable mode
Dependency management with poetry
is required for the installation of the optional dependency-groups.
- Install poetry.
- Install dependencies for package
(also automatically creates project's virtual environment):
poetry install
- Install
dev
dependency group:poetry install --with dev
- Activate project's virtual environment:
poetry shell
To install test
dependency group:
poetry install --with test
To run the tests:
python -m pytest tests
To extract coverage data:
- Get code coverage by measuring how much of the code is executed when running the tests:
coverage run -m pytest tests
- View coverage results:
# Option 1: simple report in terminal. coverage report # Option 2: nicer HTML report. coverage html # Open resulting 'htmlcov/index.html' in browser.