You have a choice between local (host-based) or docker-based development.
For development on your local machine (not using containers)
make dev_install
This will install pip, poetry, trunk and it's child tools, and the pre-commit hooks, and also set up a poetry environment for the backend.
It will also create an environment file at .env
.
The correct version is installed in the docker containers, however it can be tricky to get that version in your local environment, so use:
pip install git+https://github.com/climatepolicyradar/[email protected]
The only dependencies for docker-based development should be docker and docker-compose.
Firstly, copy the sample environment file:
cp .env.example .env
Then run the following command:
make start
make show_logs
This will build and bring up the containers, run database migrations and populate the database with initial data.
The backend will be at http://localhost:8888
Auto-generated docs will be at http://localhost:8888/api/docs
CI uses docker, so ensure all containers are built with the latest dependencies, and all tests pass:
make build
make test
Missing code might be
- ignored by
.gitignore
and cannot be seen or found by CI - ignored by
.dockerignore
and cannot be seen or found by the containers