Go to file
2024-12-26 13:24:25 +01:00
requirements Services (#25) 2024-12-22 23:46:13 +00:00
src Move to uv - it is the hot new thing. 2024-12-26 13:24:25 +01:00
.dockerignore Move to uv - it is the hot new thing. 2024-12-26 13:24:25 +01:00
.drone.yml Cleanup. 2024-07-14 23:14:07 +02:00
.env.example Changes to payment models (#32) 2024-08-03 17:55:32 +00:00
.gitignore New WaitingListEntry (#33) 2024-07-31 22:49:46 +00:00
.pre-commit-config.yaml Requirements pinning + some cleanup (#36) 2024-07-31 21:17:00 +00:00
docker-compose.yml Move to uv - it is the hot new thing. 2024-12-26 13:24:25 +01:00
Dockerfile Move to uv - it is the hot new thing. 2024-12-26 13:24:25 +01:00
entrypoint.sh Move to uv - it is the hot new thing. 2024-12-26 13:24:25 +01:00
Justfile Move to uv - it is the hot new thing. 2024-12-26 13:24:25 +01:00
pyproject.toml Move to uv - it is the hot new thing. 2024-12-26 13:24:25 +01:00
README.md Move to uv - it is the hot new thing. 2024-12-26 13:24:25 +01:00
requirements.txt Membership invitations and order emails (#47) 2024-08-14 09:17:29 +00:00
uv.lock Move to uv - it is the hot new thing. 2024-12-26 13:24:25 +01:00

data.coop member system

Development setup

There are two ways to set up the development environment.

  • Using the Docker Compose setup provided in this repository.
  • Using uv in your host OS.

Using Docker Compose

Working with the Docker Compose setup is made easy with the Justfile provided in the repository.

Requirements

Setup

  1. Setup .env file

    An example .env file is provided in the repository. You can copy it to .env file using the following command:

    cp .env.example .env
    

    The default values in the .env file are suitable for the docker-compose setup.

  2. Migrate

    just manage migrate
    
  3. Run the development server

    just run
    

Building and running other things

# Build the containers
just build

# Create a superuser
just manage createsuperuser

# Create Django migrations (after this, maybe you need to change file permissions in volume)
just manage makemigrations

Using uv

Requirements

  • Python 3.12 or higher
  • uv
  • A running PostgreSQL server

Setup

  1. Setup .env file

    An example .env file is provided in the repository. You can copy it to .env file using the following command:

    cp .env.example .env
    

    Edit the .env file and set the values for the environment variables, especially the database variables.

  2. Run migrate

    uv run src/manage.py migrate
    
  3. Run the development server

     uv run src/manage.py runserver
    

Updating requirements

We use uv. That means we have a set of loosely defined dependencies in pyproject.toml and lock dependencies in uv.lock.

To generate uv.lock run:

# Build requirements.txt etc
uv lock

# Build Docker image with new Python requirements
just build

Important notes

  • This project uses django-zen-queries, which will sometimes raise a QueriesDisabledError in your templates. You can find a difference of opinion about that, but you can find a difference of opinion about many things, right?
  • If a linting error annoys you, please feel free to strike back by adding a noqa to the line that has displeased the linter and move on with life.