connects the GET echo endpoint to the database rather than using the static .alwayson manifest file.
Moves the function for injecting the ManifestsRepo into handlers to a common spot injectors.py. As of right now injectors.py is presumed to be the location of all the injector functions used for FastAPI's dependency injection system.
Adds encoding/decoding functions to the AlwaysOnRequest and AlwaysOnResponse classes. As a clean-up task this functionality should be abstracted into an interface so there is base functionality but each class could override that functionality as needed. This clean-up task has been captured in https://github.com/hop-along-polly/always-on/issues/9
Type of Change
[ ] Bugfix (A non-breaking change that fixes an issue)
[x] Feature (A non-breaking change that adds new functionality)
[ ] Chore (A non-breaking change that adds no net new functionality, tests, refactoring, docs etc.)
[ ] Breaking Change (a fix or feature that is not backwards compatible with existing functionality)
Testing Steps
Spin up API and DB containers with docker-compose up
Run the following curl commands to upload a manifest and test the get endpoint.
Definition of Done Checklist
[x] I have only included commits that apply to the referenced Github Issue.
[x] I have performed a self-review of my own code.
[x] I have take time to refactor the code to ensure testability, and maintainability.
[x] I have made corresponding changes to the documentation (if needed).
[x] I have added tests that prove my fix/feature is working per requirements.
[x] I have provided sufficient code comments so any developer can support my code.
Description of Work
Github Issue Link
This PR
GET
echo endpoint to the database rather than using the static.alwayson
manifest file.ManifestsRepo
into handlers to a common spotinjectors.py
. As of right nowinjectors.py
is presumed to be the location of all the injector functions used for FastAPI's dependency injection system.Type of Change
Testing Steps
docker-compose up
Definition of Done Checklist