Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install system dependencies
run: |
Expand All @@ -52,9 +54,8 @@ jobs:

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip freeze
uv sync
uv pip freeze

- name: Run tests
run: python -Wall manage.py test -v 2 --settings=settings_ci
run: uv run python -Wall manage.py test -v 2 --settings=settings_ci
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ deploy-latest.sh
.DS_Store
*~
media/*
.venv
venv*
celerybeat-*
env.sh
Expand Down
20 changes: 12 additions & 8 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,36 @@ Helios is an end-to-end verifiable voting system that provides secure, transpare
- **Database**: PostgreSQL 9.5+
- **Task Queue**: Celery with RabbitMQ
- **Crypto**: pycryptodome
- **Package Manager**: uv

## Common Commands

```bash
# Install dependencies
uv sync

# Run development server
python manage.py runserver
uv run python manage.py runserver

# Run all tests
python manage.py test -v 2
uv run python manage.py test -v 2

# Run tests for a specific app
python manage.py test helios -v 2
python manage.py test helios_auth -v 2
uv run python manage.py test helios -v 2
uv run python manage.py test helios_auth -v 2

# Run a specific test class
python manage.py test helios.tests.ElectionModelTests -v 2
uv run python manage.py test helios.tests.ElectionModelTests -v 2

# Database migrations
python manage.py makemigrations
python manage.py migrate
uv run python manage.py makemigrations
uv run python manage.py migrate

# Reset database (drops and recreates)
./reset.sh

# Start Celery worker (for background tasks)
celery --app helios worker --events --beat --concurrency 1
uv run celery --app helios worker --events --beat --concurrency 1
```

## Project Structure
Expand Down
20 changes: 7 additions & 13 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@

## Python Setup

* Install Python 3.12 including dev and venv packages
* Install Python 3.13 including dev packages

```
sudo apt install python3 python3-dev python3-venv python3-pip
sudo apt install python3 python3-dev
```

* Create a virtualenv
* Install uv (modern Python package manager)

```
python3 -m venv venv
curl -LsSf https://astral.sh/uv/install.sh | sh
```

* You'll also need Postgres dev libraries. For example on Ubuntu:
Expand All @@ -32,16 +32,10 @@ python3 -m venv venv
sudo apt install libpq-dev
```

* Activate virtual environment
* Install dependencies (uv creates a virtual environment automatically)

```
source venv/bin/activate
```

* Install requirements

```
pip install -r requirements.txt
uv sync
```

## Database Setup
Expand All @@ -57,7 +51,7 @@ pip install -r requirements.txt
* Start server

```
python manage.py runserver
uv run python manage.py runserver
```

## Google Auth Configuration
Expand Down
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[project]
name = "helios-server"
version = "4.0.0"
description = "Helios is an end-to-end verifiable voting system"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.13"
dependencies = [
"django==5.2.9",
"django-webtest>=1.9.11",
"gunicorn==22.0.0",
"dj-database-url==2.2.0",
"psycopg2-binary==2.9.10",
"celery==5.6.1",
"django-picklefield==3.2",
"django-anymail==11.0.1",
"python-dateutil==2.9.0",
"bleach==6.1.0",
"django-csp==3.8",
"validate-email==1.3",
"pycryptodome==3.23.0",
"python3-openid==3.2.0",
"django-ses==4.1.0",
"google-auth>=2.38.0",
"google-auth-oauthlib>=1.2.0",
"requests>=2.31.0",
"requests-oauthlib>=1.3.1",
"rollbar==1.3.0",
"django-auth-ldap==4.8.0",
"python-ldap==3.4.5",
]

[dependency-groups]
dev = [
"pytest>=8.0.0",
]

[tool.uv]
package = false
30 changes: 0 additions & 30 deletions requirements.txt

This file was deleted.

Loading