Documentation is currently a work in progress.
To get started with development, you will need to create a Postgres database:
createdb blog # Creates PostgreSQL database locally
createuser blog -P # Create a user and prompt for password
Next, export the following environment variables with the information you just entered for the database.
export DJANGO_SECRET_KEY=$(uuidgen) # Generates a UUID for a secret key
export POSTGRES_HOST='localhost' # The address of your postgres server
export POSTGRES_PORT='5432' # Default postgres port 5432
export POSTGRES_DB_NAME='blog' # Database name (created in last step)
export POSTGRES_USER='blog' # Database user (created in last step)
export POSTGRES_PASSWORD='' # Database password (created in last step)
Start a new virtual environment of your choice, or use
python3 -m venv env/
source env/bin/activate
Install dependencies
pip install --upgrade pip
pip install -r requirements/development.txt
Install dependencies (note: the testing dependencies are included in the development dependencies)
pip install -r requirements/development.txt
nox -s test
nox -s lint
To make future contributions more smooth, all pull requests must retain a 100% code coverage. All code should be tested, formatted, and linted. If all sessions pass, the pull request can be considered for merging.
Formatting before a pull request:
nox -s format
nox # Fix any errors, broken tests, or missing coverage before submitting a PR