Skip to main content

Common Python libraries used by parts of Bell AVR

Project description

AVR-Python-Libraries

Code style: black

Install

To install the base package, run:

pip install bell-avr-libraries

Additionally, the serial and qt extras are available if you want to use the PCC or PySide functionality.

pip install bell-avr-libraries[serial,qt]

Usage

See the documentation website at https://bellflight.github.io/AVR-Python-Libraries

Development

It's assumed you have a version of Python installed from python.org that is the same or newer as defined in the .python-version file.

First, install Poetry:

python -m pip install pipx --upgrade
pipx ensurepath
pipx install poetry
# (Optionally) Add pre-commit plugin
poetry self add poetry-pre-commit-plugin

Now, you can clone the repo and install dependencies:

git clone https://github.com/bellflight/AVR-Python-Libraries
cd AVR-Python-Libraries
poetry install --sync --all-extras
poetry run pre-commit install --install-hooks

Run

poetry shell

to activate the virtual environment.

Build the auto-generated code with poetry run python build.py. From here, you can now produce a package with poetry build.

To add new message definitions, add entries to the bell/avr/mqtt/asyncapi.yml file. This is an AsyncAPI definition, which is primarily JSONSchema with some association of classes and topics.

The generator that turns this definition file into Python code is the homebrew build.py, so double-check that the output makes sense.

To generate the documentation, run the build.py script with the --docs option. This requires that Node.js is installed, and npm install has been run.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bell_avr_libraries-0.2.0a2.tar.gz (24.2 kB view hashes)

Uploaded Source

Built Distribution

bell_avr_libraries-0.2.0a2-py3-none-any.whl (29.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page