Skip to content
Open

Raid v2 #1008

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
af76ccf
feat(raid): add RaidRegistrationStatus enum for participant state mac…
maximeroucher Apr 24, 2026
d4865c5
feat(config): add phone and birthday fields to UserDemoFactoryConfig
maximeroucher Apr 24, 2026
8e91e0a
feat(raid): add migration for edition scoping and registration state …
maximeroucher Apr 24, 2026
a632054
feat(raid): add migration for volunteer registration table
maximeroucher Apr 24, 2026
db97d30
feat(raid): rewrite models with edition scoping, state machine, and v…
maximeroucher Apr 24, 2026
61bc941
feat(raid): rewrite schemas for edition-scoped participants and volun…
maximeroucher Apr 24, 2026
0bede2c
feat(raid): rewrite CRUDs with edition scoping and volunteer operations
maximeroucher Apr 24, 2026
6022f4c
feat(raid): add edition-aware FastAPI dependencies for participant/vo…
maximeroucher Apr 24, 2026
290fc23
feat(raid): add validation checker for participant document and field…
maximeroucher Apr 24, 2026
38ed3c6
feat(raid): add factory for seeding raid test data with editions
maximeroucher Apr 24, 2026
66257e7
feat(raid): update payment validation and security file helpers for e…
maximeroucher Apr 24, 2026
ec6040c
feat(raid): rewrite endpoints with edition scoping, state machine, an…
maximeroucher Apr 24, 2026
6e0323e
fix(raid): update security file template to use user relationship fields
maximeroucher Apr 24, 2026
812c81c
test(raid): rewrite tests for edition-scoped registration and volunte…
maximeroucher Apr 24, 2026
5ad6ea1
fix: test and linting
maximeroucher May 17, 2026
77da0f3
refacto(cruds): splitting models from schema
maximeroucher Jun 5, 2026
34444ed
refacto(documents): more readable document progress calculation
maximeroucher Jun 5, 2026
6b63632
fix(format): resolving ruff conflict rule on comma
maximeroucher Jun 5, 2026
c85de9d
fix(migration): reordering after rebase
maximeroucher Jun 5, 2026
0c18cef
fix(raid): cancelled records no longer block re-registration on the o…
maximeroucher Jun 10, 2026
a4e7a1f
fix(raid): cancelled participants and volunteers no longer block edit…
maximeroucher Jun 10, 2026
6f97774
fix: importing at the top of the file
maximeroucher Jun 23, 2026
a3d9371
fix: linter
maximeroucher Jun 23, 2026
49ebe94
feat(raid): expose participants list
maximeroucher Jul 22, 2026
5399155
fix(migration): reorder raid chain to follow Documenso head
maximeroucher Jul 22, 2026
cda594d
ci(test): raise Postgres lock-table sizing for 8 parallel workers
maximeroucher Jul 22, 2026
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
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
--name postgres
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
Expand All @@ -55,6 +56,21 @@ jobs:
- name: Fetch full main branch history # We don't known the the base commit of the PR
run: git fetch origin main --unshallow

# 8 xdist workers each run `create_all` on ~126 tables + ~150 indexes + FKs
# in a single transaction, which brushes past the default max_locks_per_transaction=64.
# Bump lock-table sizing before tests. GHA services can't set command args directly,
# so we exec into the named container, append config, and restart.
- name: Tune Postgres for parallel test workers
run: |
docker exec postgres sh -c "printf 'max_locks_per_transaction = 512\nmax_connections = 200\n' >> /var/lib/postgresql/data/postgresql.conf"
docker restart postgres
for _ in $(seq 1 30); do
if docker exec postgres pg_isready -U hyperion -d hyperion; then exit 0; fi
sleep 1
done
echo "postgres did not become ready after restart" >&2
exit 1

# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v6
Expand Down
4 changes: 3 additions & 1 deletion app/core/schools/schemas_schools.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from uuid import UUID

from pydantic import BaseModel, field_validator
from pydantic import BaseModel, ConfigDict, field_validator

from app.utils import validators

Expand All @@ -17,6 +17,8 @@ class CoreSchoolBase(BaseModel):
class CoreSchool(CoreSchoolBase):
id: UUID

model_config = ConfigDict(from_attributes=True)


class CoreSchoolUpdate(BaseModel):
"""Schema for school update"""
Expand Down
4 changes: 2 additions & 2 deletions app/core/users/factory_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ async def create_core_users(cls, db: AsyncSession):
name=user_info.name,
email=user_info.email,
floor=None,
phone=None,
phone=user_info.phone,
promo=None,
school_id=SchoolType.centrale_lyon.value,
account_type=groups_type.AccountType.student,
birthday=None,
birthday=user_info.birthday,
created_on=datetime.now(tz=UTC),
)
await cruds_users.create_user(db=db, user=user)
Expand Down
3 changes: 3 additions & 0 deletions app/core/utils/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pathlib
import tomllib
from datetime import date
from functools import cached_property
from re import Pattern
from typing import Any, ClassVar
Expand Down Expand Up @@ -98,6 +99,8 @@ class UserDemoFactoryConfig(BaseModel):
email: str
password: str | None # If None, the password will be generated randomly
groups: list[str] = [] # Groups id to which the user will be added
phone: str | None = None
birthday: date | None = None


class Settings(BaseSettings):
Expand Down
Loading
Loading