719 Commits

Author SHA1 Message Date
4fc92cba82 tmp v0.23.0 2025-12-10 22:51:23 +01:00
Claude Brisson
4a4474873e Bump to 0.23 2025-11-30 11:25:46 +01:00
Claude Brisson
dd95c48f0d Fix results display for PAIRGO and RENGO tournaments
For PAIRGO/RENGO, games are team games (w/b are team IDs), not
individual player games. Use pmap (teams map) instead of plmap
(players map) to look up participants.
2025-11-30 11:24:34 +01:00
Claude Brisson
9a379052e5 Add user preference for black vs white display order
- Gear icon in header opens settings modal
- Preference stored in cookie for server-side Velocity rendering
- ViewServlet reads blackFirst cookie into Velocity context
- Velocity conditionals in pairing, results, and result-sheets templates
2025-11-30 10:54:52 +01:00
Claude Brisson
17697845fd Implement avoidSameFamily geographic criterion
When enabled, avoid pairing players from the same club who have
the same family name (surname). Uses existing player.name field.
2025-11-29 22:00:31 +01:00
Claude Brisson
147347fa6e Bump to 0.22 2025-11-29 21:36:52 +01:00
Claude Brisson
617f715923 Fix null teamName in team tournament registration view
Handle case where player is registered but not yet assigned to a team.
2025-11-29 21:31:48 +01:00
Claude Brisson
254bf6893f Local club: half bonus for stranger-vs-stranger different clubs
When local club exists, prefer local-stranger pairings over stranger-stranger:
- Ist vs Ist: full bonus
- Ist vs non-Ist: full bonus
- non-Ist vs non-Ist (different clubs): half bonus
- non-Ist vs non-Ist (same club): no bonus
2025-11-29 18:51:05 +01:00
Claude Brisson
a256b9ad1f Merge feature/local-club-pairing: nuanced local club geographic criteria 2025-11-29 18:14:14 +01:00
Claude Brisson
174b3adb53 Refactor local club geographic criteria with nuanced bonuses
- Fix bug: biggestCountrySize used club instead of country
- Add local club detection (>40% threshold)
- When local club exists (non-legacy mode):
  * Local club members paired together: get FULL different-club bonus
  * Ist vs non-Ist (different clubs): normal bonus
  * Strangers from same visiting club: no bonus (normal same-club)
- Legacy mode unchanged for test compatibility
- Add LocalClubTest for local club behavior verification
2025-11-29 18:13:00 +01:00
Claude Brisson
4788ef7bc9 Add EGF PIN to h9 export
Append EGF PIN at end of player line with | separator (e.g. |12345678)
when the player has a valid 8-character EGF PIN
2025-11-29 16:57:33 +01:00
Claude Brisson
a6881d1276 Add MacMahon 3.9 import support
- Add MacMahon39.kt parser for MM39 tournament format
- Auto-detect MM39 format in tournament import
- Import players, games, bye players, and tournament parameters
- Uses default values for time system and director since MM39 lacks those
2025-11-29 16:52:05 +01:00
Claude Brisson
e063f6c73c Bump to version 0.21 2025-11-29 13:49:20 +01:00
Claude Brisson
576be99952 FFG export: treat zero byoyomi/increment as sudden death
When byoyomi=0 (Japanese/Canadian) or increment=0 (Fischer),
display "Sudden death" instead of absurd "3 periods of 0 minutes"
2025-11-29 13:36:32 +01:00
Claude Brisson
4daa707f3e Normalize country code to UK instead of GB
- CountriesTool: use 'uk' key for United Kingdom
- EGFRatingsHandler: keep UK as-is (no conversion to GB)
- Pairable: convert GB to UK (inverse of previous behavior)
2025-11-29 12:30:15 +01:00
Claude Brisson
cbadb4d6bb Fix race condition in player search index synchronization
players array and index are now updated atomically under write lock.
Index is rebuilt every time since it stores array indices into players.
License status propagation also moved inside write lock.
2025-11-29 12:02:36 +01:00
Claude Brisson
67d8428b85 Fix ratings fetch: don't request brotli compression
OkHttp doesn't support brotli decompression. When we explicitly set
Accept-Encoding header, OkHttp disables its transparent decompression.

Solution: remove explicit Accept-Encoding header and let OkHttp handle
compression automatically (it adds gzip and transparently decompresses).

Also simplified the request headers (removed unused Sec-Fetch-* headers).
2025-11-29 11:23:50 +01:00
Claude Brisson
72f5fe540c Revert "Fix ratings fetch: remove brotli Accept-Encoding header"
This reverts commit 935f53cf65.
2025-11-29 11:10:33 +01:00
Claude Brisson
935f53cf65 Fix ratings fetch: remove brotli Accept-Encoding header
OkHttp doesn't support brotli decompression, so when servers return
brotli-compressed content, it was being read as raw binary garbage.
Removed explicit Accept-Encoding to let OkHttp handle compression
(it automatically adds gzip/deflate which it can decompress).

Also removed unnecessary Sec-Fetch-* headers.
2025-11-29 11:08:48 +01:00
Claude Brisson
09c8e834f6 Fix FFG/EGF export format issues
- FFG .tou name field: use AAMMJJ-ville format (2-digit year, hyphen,
  lowercase city without accents), e.g., "250830-marseille"
- EGF .h country code: use uppercase PC[FR,...] instead of PC[fr,...]
- Unify version numbers: use actual version from properties everywhere
  instead of hardcoded "v0.1"
2025-11-29 10:54:40 +01:00
Claude Brisson
667b3e17da Fix EGF/FFG export name case: Title_Case instead of UPPERCASE
toCapitals() properly capitalizes each word part (e.g., "ACIKGOZ"
-> "Acikgoz", "alen ibrahim" -> "Alen_Ibrahim").

Format: "Last_Name First_Name" with underscores joining multi-part names.
2025-11-29 10:34:06 +01:00
Claude Brisson
4113d76904 Fix stale Lucene reader after ratings index rebuild
The reader and searcher were lazily initialized once, so after
rebuild() created a new index, searches still used the old reader
pointing to outdated document IDs. When those IDs were used to
index into the new players array, wrong entries were returned.

Now reader/searcher are refreshed after each build().
2025-11-29 10:21:31 +01:00
Claude Brisson
662f438cee Update documentation for API, configuration, and model
API.md:
- Add export formats (JSON, XML, EGF, FFG, CSV)
- Document /explain endpoint for pairing analysis
- Add PUT /standings for freezing
- Improve parameter documentation
- Fix typos (regitration -> registration, #tip -> #tid)

configuration.md:
- Add property loading hierarchy
- Document SSL/TLS configuration
- Add OAuth provider configuration
- Add ratings.path property
- Include example configurations

model.md:
- Complete entity diagram with Team, external IDs
- Document all tournament types (PAIRGO, RENGO, TEAM)
- Add TimeSystem types and parameters
- Document all pairing parameters
- List all 39 tiebreak criteria
- Add external database (AGA, EGF, FFG) documentation
2025-11-29 08:05:53 +01:00
Claude Brisson
8ca25ec421 Use nice HTTP headers when querying ratings 2025-11-28 15:35:10 +01:00
Claude Brisson
f2059f7943 Add missing dependency to standalone 2025-08-16 12:21:33 +02:00
Claude Brisson
0cc34a1f84 Do not display pairing action buttons when pairing is empty 2025-07-25 05:19:19 +02:00
Claude Brisson
c3cb5826a3 Explain: fix a color inversion in heat map 2025-07-25 04:59:58 +02:00
Claude Brisson
84ab78c461 Bugfixing explain 2025-07-24 20:38:49 +02:00
Claude Brisson
d47d4fc8cc Beta version of explain page 2025-07-24 19:45:13 +02:00
Claude Brisson
3d06588889 Use a PairingListener class to collect or print weights, avoid computing twice the weights during tests 2025-07-24 15:05:51 +02:00
Claude Brisson
f704f3adb2 Code cleaning: fix previous commit, simplify HistoryHelper creation 2025-07-24 14:14:03 +02:00
Claude Brisson
ecec6556d1 Code cleaning: move history helper creation in tournament class, factorize main score function 2025-07-22 19:08:29 +02:00
Claude Brisson
17bb013feb Display individual standings below team standings 2025-06-11 11:03:58 +02:00
Claude Brisson
be18f159be Fix test 2025-06-10 21:01:25 +02:00
Claude Brisson
a81ed5377c [teams] bugfix and code clanup 2025-06-10 20:53:59 +02:00
Claude Brisson
632b29fb78 More team tournaments debugging 2025-06-10 20:53:59 +02:00
Claude Brisson
ddf904f6d1 Team tournaments debugging 2025-06-10 20:53:54 +02:00
Claude Brisson
47c729e61a Team of individuals: initial display of results page ok 2025-06-10 20:52:23 +02:00
Claude Brisson
0ebe3dfbd7 View team on registration page ; review code of constraints on teams updates 2025-06-10 20:52:23 +02:00
Claude Brisson
0ed9bfb5eb Consistency checks on participations changes ; plus some code cleaning 2025-06-10 20:52:23 +02:00
Claude Brisson
169546ae66 Teams of individual players: Teams composition page ok 2025-06-10 20:52:23 +02:00
Claude Brisson
8f8e23d5b1 Upgrade kotlin to 2.1.21 2025-05-16 23:34:34 +02:00
Claude Brisson
e8fc9c46b3 Fix tests 2025-05-16 22:50:58 +02:00
Claude Brisson
e478a7139e Update changelog and version 2025-05-16 22:30:41 +02:00
Claude Brisson
67e0697b6b Code review 2025-05-16 22:30:05 +02:00
Theo Barollet
21f9741a8b proper legacy mode and compare all pairings with new pairgoth pairings. Toulouse and simpleMM pairings differ 2025-05-16 22:19:55 +02:00
Theo Barollet
af649fc9ee added a threshold in main club proportion after which we don't apply geographic criteria 2025-05-16 22:18:15 +02:00
Quentin Rendu
d91eb5407d Reduce default value of balanceWBweight to 1e3 (was 1e6) 2025-03-06 16:08:18 +01:00
Quentin Rendu
73352ef430 Regenerate test files with balanceWBWeight=1000 2025-03-06 16:07:11 +01:00
Quentin Rendu
7080d7d16e Add debug output for KPMC-Splitbug 2025-03-05 10:12:32 +01:00