Skip to content

Fix import/scoring bugs, split PDF module, modernize admin UI#1

Open
JanciP wants to merge 1 commit into
Azrael3000:mainfrom
JanciP:fix-bugs-and-ui
Open

Fix import/scoring bugs, split PDF module, modernize admin UI#1
JanciP wants to merge 1 commit into
Azrael3000:mainfrom
JanciP:fix-bugs-and-ui

Conversation

@JanciP

@JanciP JanciP commented Jul 7, 2026

Copy link
Copy Markdown

Bug fixes:

  • Fix Excel import INSERT with 11 placeholders for 10 columns in refresh()
  • Remove leftover breakpoint() in getNationalRecordsAida that froze the server
  • Fix setRegistration call passing warn as change_type in refresh()
  • Fix formatDiveTime computing minutes with % instead of //
  • Fix undefined names: 'name' in changeCompName, 'log' in updateStartList, 'lane_df' in dropUnusedColumns, 'self.NR' in getNationalRecordsAida
  • Add missing sqlite3 import in compy_data.py
  • Fix broken @Property @staticmethod combination on CompyData.version
  • Fix storeResults crash on starts without a recorded result
  • Remove dead comp_type == "CMAS" branch in computePoints (never matched)
  • Fix clubs never importing from Excel ('club' vs 'Club' key check)
  • Add missing 'content:' in lane list PDF page counter
  • Remove os.chdir side effect in getSavedCompetitions that broke relative database paths
  • Sync schemas with code: judge.salt, competition.publish_results, competition_athlete.eligible_national, break.block (--init_db now produces a working database)

Refactoring:

  • Extract PDF generation (start/lane/result lists) into compy_pdf.py
  • Extract shared constants into compy_constants.py
  • Make weasyprint import lazy so the app runs without it (PDF export degrades gracefully, helps macOS setups missing pango)
  • Replace system pip-freeze requirements.txt with actual dependencies
  • Remove debug print()s and test.html dumps, replace deprecated utcnow

UI:

  • Modernize admin page with a light theme matching the judge/results color system (tab bar, cards, striped tables, styled forms)
  • Fix invalid font-family "sans" in judge/results stylesheets
  • Restyle 404 page

Tooling:

  • Add tools/generate_test_data.py: generates an AIDA-style competition Excel file (30 athletes, 3 days, CWT/STA/DYN, results + DNS entries)
  • Document test data workflow and admin URL in Readme

Bug fixes:
- Fix Excel import INSERT with 11 placeholders for 10 columns in refresh()
- Remove leftover breakpoint() in getNationalRecordsAida that froze the server
- Fix setRegistration call passing warn as change_type in refresh()
- Fix formatDiveTime computing minutes with % instead of //
- Fix undefined names: 'name' in changeCompName, 'log' in updateStartList,
  'lane_df' in dropUnusedColumns, 'self.NR' in getNationalRecordsAida
- Add missing sqlite3 import in compy_data.py
- Fix broken @Property @staticmethod combination on CompyData.version
- Fix storeResults crash on starts without a recorded result
- Remove dead comp_type == "CMAS" branch in computePoints (never matched)
- Fix clubs never importing from Excel ('club' vs 'Club' key check)
- Add missing 'content:' in lane list PDF page counter
- Remove os.chdir side effect in getSavedCompetitions that broke
  relative database paths
- Sync schemas with code: judge.salt, competition.publish_results,
  competition_athlete.eligible_national, break.block (--init_db now
  produces a working database)

Refactoring:
- Extract PDF generation (start/lane/result lists) into compy_pdf.py
- Extract shared constants into compy_constants.py
- Make weasyprint import lazy so the app runs without it (PDF export
  degrades gracefully, helps macOS setups missing pango)
- Replace system pip-freeze requirements.txt with actual dependencies
- Remove debug print()s and test.html dumps, replace deprecated utcnow

UI:
- Modernize admin page with a light theme matching the judge/results
  color system (tab bar, cards, striped tables, styled forms)
- Fix invalid font-family "sans" in judge/results stylesheets
- Restyle 404 page

Tooling:
- Add tools/generate_test_data.py: generates an AIDA-style competition
  Excel file (30 athletes, 3 days, CWT/STA/DYN, results + DNS entries)
- Document test data workflow and admin URL in Readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant