BC Registries notify services.
Following the instructions of the Development Readme to setup your local development environment.
- Follow the instructions to checkout the project from GitHub.
- Open the notify-api directory in VS Code to treat it as a project (or WSL projec). To prevent version clashes, set up a virtual environment to install the Python packages used by this project.
- Run
make setup
to set up the virtual environment and install libraries. - Next run
pip install .
to set up the environment for running tests.
You also need to set up the variables used for environment-specific settings:
- Copy the dotenv template file to somewhere above the source code and rename to
.env
. You will need to fill in missing values.
To prepare your local database:
- In the root project folder:
docker-compose up -d
- In your
venv
environment:alembic db upgrade
- Start the flask server with
(uvicorn main:app --reload --port 5000)
- View the OpenAPI Docs.
- Run
make flake8
orflake8 src/auth_api tests
. - Run
make pylint
orpylint --rcfile=setup.cfg --disable=C0301,W0511 src/auth_api test
- Tests are run from the Status bar at the bottom of the workbench in VS Code or
pytest
command. - Next run
make coverage
to generate the coverage report, which appears in the htmlcov directory.
View the document.