A rewrite of shepherd using python 3.10 and FastAPI.
Reasons for a re-write:
Reasons against the re-write:
I (Edwin) think that a prototype re-write should at least be tried to see how hard it is mainly for 2, 6 and 7.
Additionally there are a whole load of features which a new shepherd could support but for now we just need to focus on feature parity.
Automatically install everything and set up the virtual env:
sh install.sh
The script is able to build python3.10 if you do not have it, alternatively you can follow the instructions here:
If building on a pi you will need to increase your swap space. 2GB has been tested to work on a pi 3A+.
Dependencies are managed using poetry which you can get here
poetry install
This will create a virtual environment where the dependencies will be installed this means that they will only be available for shepherd and will not interfere with the rest of your system.
You can enter this virtual environment by:
poetry shell
Start the server in development mode (hot reload):
poetry run uvicorn app:app --reload
To deploy run (chosen port and ip are optional):
poetry run uvicorn app:shepherd --host 0.0.0.0 --port 80
Tests are located in test/
Run all tests and stop on the first fail with a verbose output:
pytest -xv