Skip to content

natkam/koop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koop

Requirements

  • Python >= 3.9
  • Docker >= 20.10
  • docker-compose >= 1.29
  • Make
  • (useful in BE development) poetry >= 1.1.5

Setup

  1. Create a .env file in the main project directory:
    SECRET_KEY=CHANGE_ME
    DEBUG=True
    
    POSTGRES_DB=koop
    POSTGRES_USER=koop
    POSTGRES_PASSWORD=CHANGE_ME
    POSTGRES_HOST=db
    POSTGRES_PORT=5432
  2. Before first running the project:
    docker-compose build
  3. Start the project:
    docker-compose up

Development

We use:

  • black for Python code formatting,
  • prettier for front-end code formatting,
  • ESlint for enforcing JS code quality rules.

All these are added as pre-commit hooks. Before you start committing, install pre-commit in your local environment and activate the hooks.

pre-commit is one of the dev-dependencies of the project, so if you use poetry for local development, just run:

poetry install

Then activate the hooks:

pre-commit install

Although it is not enforced by a pre-commit hook, it is strongly recommended to use type annotations and often run mypy over the backend code (the containers have to be running for the make command to work):

make mypy
# or, when you're in the `backend/` directory:
make -C .. mypy

Tests

We use Django's unit test framework, at least for now. The following command executes ./manage.py test in the backend container (so the containers have to be running):

make test
# or, when you're in the `backend/` directory:
make -C .. test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages