-
Ensure the bug was not already reported by searching on GitHub under Issues.
-
If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
-
Open a new GitHub pull request with the patch.
-
Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability of this codebase and will generally not be accepted.
Thanks! Read on for technical details below to get your environment ready to build.
Assuming you have cloned this repository to your local machine, you can follow these guidelines to make contributions.
First, please install pyenv https://github.com/pyenv/pyenv to manage your python environment.
Install the version of python as mentioned in this repo.
pyenv install $(cat .python-version)python -m venv .venvThis will create a directory .venv with python binaries and then you will be able to install packages for that isolated environment.
Next, activate the environment.
source .venv/bin/activateTo check that it worked correctly;
which python pipYou should see paths that use the .venv/bin in your current working directory.
This project uses flit to manage our project's dependencies.
Install dependencies, including flit.
./scripts/install.sh
pyenv rehash./scripts/format.sh./scripts/test.sh./scripts/run-dependencies.shWe are using alembic to facilitate migrations with PostgreSQL. As this template stands, we are using the default user postgres and database postgres. We suggest you use your own user, password, and database for production.
To create your migrations locally (from a virtualenv!):
# create the migration
alembic revision --autogenerate -m "initial setup"
# apply the migration
alembic upgrade head
# view history
alembic current -vvv
alembic history -vvvTo create your migrations on a cloudsql instance:
First install and configure cloud_sql_proxy by following this guide.
cloud_sql_proxy -instances=${PROJECT_ID}:${REGION}:${DB_INSTANCE_NAME}=tcp:5432 -dir=/tmp/cloudsql
# then simply upgrade to head
./scripts/alembic-upgrade-head.shIf you want to directly connect to the remote database, while the proxy is running in one session, run the following command in another shell session:
psql "sslmode=disable host=localhost user=USERNAME dbname=DATABASENAME"