Skip to content
Open
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
16 changes: 16 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ Install Weasyprint https://doc.courtbouillon.org/weasyprint/stable/first_steps.h
- Linux: `python3 compy.py`
- Windows: `python3.exe compy.py`
- Navigate your browser to `localhost:5000`
- The admin interface is at `localhost:5000/admin?auth=XXXXXX` where `XXXXXX` are the first 6
characters of your `FLASK_SECRET_KEY` from `.env`

## Test data

A generator for a realistic sample competition (30 athletes, 3 days: CWT, STA, DYN,
results and cards for past days, DNS entries, open results for today) lives in
`tools/generate_test_data.py`:

- `python3 tools/generate_test_data.py test_competition.xlsx`
- Start the server and open the admin page
- Set a competition name, save, choose the generated file and press "Refresh data"

Alternatively a pre-seeded `compy.sqlite` with the competition "Compy Test Open 2026"
(including `test_competition.xlsx`) may already be present, in which case you can simply
load it from "Load competition" on the Settings tab.

## Want to help?

Expand Down
34 changes: 34 additions & 0 deletions compy_constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#
# ━━━━━━━━━━━━━
# ┏┓┏┓┳┳┓┏┓┓┏
# ┃ ┃┃┃┃┃┃┃┗┫
# ┗┛┗┛┛ ┗┣┛┗┛
# ━━━━━━━━━━━━━
#
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#
# Competition organization tool
# for freediving competitions.
#
# Copyright 2023 - Arno Mayrhofer
#
# Licensed under the GNU AGPL
#
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#
# Authors:
#
# - Arno Mayrhofer
#
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

"""Shared domain constants for Compy."""

INVALID_DATE = "0000-00-00"
INVALID_TIME = "99:99"
POOL_DISCIPLINES = ["STA", "DNF", "DYN", "DYNB"]
DEPTH_DISCIPLINES = ["FIM", "CNF", "CWT", "CWTB"]
DISCIPLINES = DEPTH_DISCIPLINES + POOL_DISCIPLINES
FEDERATIONS = ["aida", "cmas"]
Loading