Skip to content

Playing with FastAPI by creating an investment projections service (using Nutmeg's calculator to actually calculate the projections)

License

Notifications You must be signed in to change notification settings

AsadHasan/fastapi-projections-service

Repository files navigation

example workflow name codecov

FastAPI projections service

Playing with FastAPI, by creating a very over-simplified investment projections service (with projections calculated by Nutmeg's calculator), deployed on Heroku, as part of GitHub Actions CD pipeline; and Docker image also pushed to GitHub packages.

Projections service usage documentation

  1. Swagger UI
  2. Redoc

Dev tooling and QA measures used

Tests

  1. Unit and integration tests: Executed on Push and PRs, before Docker image is built. Code coverage measured by Codecov.
  2. End to end test: Executed on Push and PRs, after Docker image is built, and before it is pushed to GitHub packages; and then once again after Docker image is tagged and pushed to Heroku and service deployed.
  3. OWASP API security scan: Executed on Push and PRs, after end-to-end test has run.

Dependency updates

PRs opened for dependency updates by Dependabot Bot and those PRs auto-merged after successful CI checks by Mergify.

Static code analysis

Codeql and OSSAR scans, via GitHub Actions, on Push and PRs.

Pre commit checks

Following checks/scans made by Pre-commit: Pylint, Flake8, Black, Mypy and isort.

CI and CD

GitHub Actions and Heroku