This project is designed to run on a Raspberry Pi and uses the uv package manager to handle its dependencies and pytest to test it's base functionality.
- Python 3.8 or higher
pip
| Variable Name | Description | Example |
|---|---|---|
| DB_HOST | Database host URL | 123abc-postgresql.services.clever-cloud.com |
| DB_USER | Database username | username |
| DB_PASSWORD | Database password | password |
| DB_PORT | Database port number | 6642 |
| DB | Database name | b7ghmkoed5btwtb6org5 |
| CONFIG_FILE_PATH | path to the sensor channel configuration file | path/to/config.json |
| DATA_PACKET_SIZE | OPTIONAL the size of the data packet expected from the Arduino | 23 |
| TESTING | OPTIONAL boolean to enable testing behavior, including mocking connections | True |
| DISABLE_REMOTE | OPTIONAL boolean to disable the remote data connection | True |
| DISABLE_LOCAL | OPTIONAL boolean to disable the local file cache | True |
| DISABLE_DISPLAY | OPTIONAL boolean to disable the local display data connection | True |
-
Clone the repository:
git clone https://github.com/HEEV/supermileage-pi-server.git cd supermileage-pi-server -
Install
uv:pip install uv
To build the dependencies needed for this repository, run the following command:
# normal
uv sync
# with dev dependencies
uv sync --devTo run the server within the uv environment, execute the following command:
uv run main.pyTo run the test suite [with or without the verbose option], simply execute the following:
uv run pytestPlease refer to the uv documentation for more details on adding packages, removing packages, and more.