Everything you need to know to contribute efficiently to the project.
- src - The actual FastAPI project
- src/app - The source code of the API
- src/tests - The unittests for the app
- client - The source code of the API client
- scripts - Example scripts
- nginx - Nginx config
This project uses the following integrations to ensure proper codebase maintenance:
- Github Worklow - run jobs for package build and coverage
- Codacy - analyzes commits for code quality
- Codecov - reports back coverage results
- Heroku - where the app is deployed from the
master
branch
As a contributor, you will only have to ensure coverage of your code by adding appropriate unit testing of your code.
Use Github issues for feature requests, or bug reporting. When doing so, use issue templates whenever possible and provide enough information for other contributors to jump in.
- Code: ensure to provide docstrings to your Python code. In doing so, please follow Google-style so it can ease the process of documentation later.
- Commit message: please follow Udacity guide
In order to run the same unit tests as the CI workflows, you can run the dockerized version of the server locally and run the tests over there:
docker-compose up -d --build
docker-compose exec -T pyroapi pip install -r requirements-dev.txt
docker-compose exec -T pyroapi pytest tests/
Please note that you can pick another port number, it only has to be consistent once you have started your containers.
To ensure that your incoming PR complies with the lint settings, you need to install flake8 and run the following command from the repository's root folder:
flake8 ./
This will read the .flake8
setting file and let you know whether your commits need some adjustments.
- See Alembic guide to create revision and run it locally.