Installing this project will require some kind of system install of Python3 to install Poetry. Assume Python3 is the default system version. Then, run one of the following commands to install Poetry:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
Further information available here.
Run install commands from the project root directory (i.e. the directory containing this doc)
poetry install
poetry run mypy --install-types
Run all commands from the root directory
poetry run uvicorn REPLACE_ME.api.main:app --reload --port=8000
This will run the api on localhost:8000
by default but this protects against envs. The path /docs
can be used to inspect datatypes
poetry run pytest
poetry run coverage run -m pytest && poetry run coverage report -m
poetry run mypy .
Given that writing type stubs for all the types is time consuming, consider running the following command instead:
poetry run mypy . --ignore-missing-imports