https://github.com/lstedmanfalls/fibonacci
Python app that generates fibonacci sequence based on user input - Docker, Terraform AWS infra, CircleCI
https://github.com/lstedmanfalls/fibonacci
autoscaling-groups black circlci ec2 ecr ecs fastapi poetry pre-commit pytest terraform vpc
Last synced: 4 months ago
JSON representation
Python app that generates fibonacci sequence based on user input - Docker, Terraform AWS infra, CircleCI
- Host: GitHub
- URL: https://github.com/lstedmanfalls/fibonacci
- Owner: Lstedmanfalls
- Created: 2024-01-16T01:59:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-22T15:38:38.000Z (over 1 year ago)
- Last Synced: 2025-01-12T10:08:17.167Z (6 months ago)
- Topics: autoscaling-groups, black, circlci, ec2, ecr, ecs, fastapi, poetry, pre-commit, pytest, terraform, vpc
- Language: Python
- Homepage:
- Size: 76.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Local Development
### To run locally:
1) Make sure you have pipx and poetry installed
- `pip install pipx`
- `pipx install poetry`
1) Create a virtual environment (use python3 instead of python if on a mac)
- `python -m venv venv`
2) Activate the environment
- `source venv/Scripts/activate`
2) Install all dependencies, including dev
- `poetry install --with dev`
3) Start the application server
- `docker compose up`
4) To view the openapi docs
- Go to 127.0.0.1/docs
5) To deactivate the environment
- `deactivate`**Note, you must have the venv activated when you commit in order for the pre-commit tests to run
### To manually run all tests:
- `poetry run pytest`### To run test coverage report:
- `poetry run pytest --cov`### To manually run linter on all files:
`poetry run pylint $(git ls-files '*.py')`### To manually run formatter on all files:
- `poetry run black .`## Poetry-managed packages
- To add a new dependency
`poetry add `
- To add a new dev dependency
`poetry add --group dev`
- To remove a dependency
`poetry remove `
- To remove a dev dependency
`poetry remove --group dev`
- To sync poetry lock
`poetry lock`