fletchscore 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fletchscore-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
- fletchscore-0.1.0/.github/ISSUE_TEMPLATE/config.yml +11 -0
- fletchscore-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +24 -0
- fletchscore-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +30 -0
- fletchscore-0.1.0/.github/workflows/build.yml +204 -0
- fletchscore-0.1.0/.github/workflows/docs.yml +117 -0
- fletchscore-0.1.0/.github/workflows/test.yml +89 -0
- fletchscore-0.1.0/.gitignore +66 -0
- fletchscore-0.1.0/CLAUDE.md +178 -0
- fletchscore-0.1.0/CODE_OF_CONDUCT.md +64 -0
- fletchscore-0.1.0/CONTRIBUTING.md +189 -0
- fletchscore-0.1.0/LICENSE +674 -0
- fletchscore-0.1.0/PKG-INFO +78 -0
- fletchscore-0.1.0/README.md +57 -0
- fletchscore-0.1.0/REMERCIEMENTS.md +31 -0
- fletchscore-0.1.0/SECURITY.md +126 -0
- fletchscore-0.1.0/branding/fletchscore.ico +0 -0
- fletchscore-0.1.0/branding/logo.png +0 -0
- fletchscore-0.1.0/branding/logo.svg +109 -0
- fletchscore-0.1.0/config/README.md +17 -0
- fletchscore-0.1.0/docs/architecture.md +501 -0
- fletchscore-0.1.0/docs/cahier-des-charges/architecture.rst +107 -0
- fletchscore-0.1.0/docs/cahier-des-charges/contexte.rst +58 -0
- fletchscore-0.1.0/docs/cahier-des-charges/index.rst +109 -0
- fletchscore-0.1.0/docs/cahier-des-charges/modele-donnees.rst +255 -0
- fletchscore-0.1.0/docs/cahier-des-charges/perimetre.rst +64 -0
- fletchscore-0.1.0/docs/cahier-des-charges/regles-metier.rst +202 -0
- fletchscore-0.1.0/docs/cahier-des-charges/roadmap.rst +114 -0
- fletchscore-0.1.0/docs/cahier-des-charges/securite.rst +108 -0
- fletchscore-0.1.0/docs/conf.py +34 -0
- fletchscore-0.1.0/docs/index.rst +8 -0
- fletchscore-0.1.0/docs/requirements.txt +4 -0
- fletchscore-0.1.0/docs/roadmap.md +311 -0
- fletchscore-0.1.0/exemples/README.md +41 -0
- fletchscore-0.1.0/exemples/clubs.csv +6 -0
- fletchscore-0.1.0/exemples/competiteurs.csv +11 -0
- fletchscore-0.1.0/exemples/competiteurs_avec_erreurs.csv +7 -0
- fletchscore-0.1.0/fletchscore.spec +86 -0
- fletchscore-0.1.0/pyproject.toml +64 -0
- fletchscore-0.1.0/run_tests.py +17 -0
- fletchscore-0.1.0/scripts/demo_v0_1.py +131 -0
- fletchscore-0.1.0/setup.cfg +4 -0
- fletchscore-0.1.0/src/fletchscore/__init__.py +7 -0
- fletchscore-0.1.0/src/fletchscore/__main__.py +60 -0
- fletchscore-0.1.0/src/fletchscore/_version.py +24 -0
- fletchscore-0.1.0/src/fletchscore/api/__init__.py +0 -0
- fletchscore-0.1.0/src/fletchscore/api/competiteur.py +0 -0
- fletchscore-0.1.0/src/fletchscore/api/organisateur.py +0 -0
- fletchscore-0.1.0/src/fletchscore/gui/__init__.py +0 -0
- fletchscore-0.1.0/src/fletchscore/gui/app.py +210 -0
- fletchscore-0.1.0/src/fletchscore/gui/config.py +83 -0
- fletchscore-0.1.0/src/fletchscore/gui/dialogue_fichier.py +73 -0
- fletchscore-0.1.0/src/fletchscore/gui/ecran_accueil.py +107 -0
- fletchscore-0.1.0/src/fletchscore/gui/ecran_aide.py +86 -0
- fletchscore-0.1.0/src/fletchscore/gui/ecran_classement.py +356 -0
- fletchscore-0.1.0/src/fletchscore/gui/ecran_competiteurs.py +504 -0
- fletchscore-0.1.0/src/fletchscore/gui/ecran_competitions.py +455 -0
- fletchscore-0.1.0/src/fletchscore/gui/ecran_saisie.py +310 -0
- fletchscore-0.1.0/src/fletchscore/gui/robustesse.py +74 -0
- fletchscore-0.1.0/src/fletchscore/io/__init__.py +0 -0
- fletchscore-0.1.0/src/fletchscore/io/export/__init__.py +0 -0
- fletchscore-0.1.0/src/fletchscore/io/export/csv.py +96 -0
- fletchscore-0.1.0/src/fletchscore/io/export/excel.py +160 -0
- fletchscore-0.1.0/src/fletchscore/io/export/pdf.py +185 -0
- fletchscore-0.1.0/src/fletchscore/io/import_csv.py +332 -0
- fletchscore-0.1.0/src/fletchscore/models/__init__.py +57 -0
- fletchscore-0.1.0/src/fletchscore/models/bareme.py +122 -0
- fletchscore-0.1.0/src/fletchscore/models/club.py +10 -0
- fletchscore-0.1.0/src/fletchscore/models/competiteur.py +92 -0
- fletchscore-0.1.0/src/fletchscore/models/competition.py +23 -0
- fletchscore-0.1.0/src/fletchscore/models/demande_rattachement.py +22 -0
- fletchscore-0.1.0/src/fletchscore/models/enums.py +54 -0
- fletchscore-0.1.0/src/fletchscore/models/epreuve.py +13 -0
- fletchscore-0.1.0/src/fletchscore/models/epreuve_template.py +17 -0
- fletchscore-0.1.0/src/fletchscore/models/inscription.py +10 -0
- fletchscore-0.1.0/src/fletchscore/models/score.py +29 -0
- fletchscore-0.1.0/src/fletchscore/models/style.py +33 -0
- fletchscore-0.1.0/src/fletchscore/models/token.py +33 -0
- fletchscore-0.1.0/src/fletchscore/referentiels/__init__.py +0 -0
- fletchscore-0.1.0/src/fletchscore/referentiels/styles.py +40 -0
- fletchscore-0.1.0/src/fletchscore/scoring/__init__.py +17 -0
- fletchscore-0.1.0/src/fletchscore/scoring/classement.py +188 -0
- fletchscore-0.1.0/src/fletchscore/services.py +672 -0
- fletchscore-0.1.0/src/fletchscore/storage/__init__.py +0 -0
- fletchscore-0.1.0/src/fletchscore/storage/db.py +674 -0
- fletchscore-0.1.0/src/fletchscore/storage/migrations/.gitkeep +0 -0
- fletchscore-0.1.0/src/fletchscore/web/index.html +13 -0
- fletchscore-0.1.0/src/fletchscore.egg-info/PKG-INFO +78 -0
- fletchscore-0.1.0/src/fletchscore.egg-info/SOURCES.txt +111 -0
- fletchscore-0.1.0/src/fletchscore.egg-info/dependency_links.txt +1 -0
- fletchscore-0.1.0/src/fletchscore.egg-info/entry_points.txt +2 -0
- fletchscore-0.1.0/src/fletchscore.egg-info/requires.txt +13 -0
- fletchscore-0.1.0/src/fletchscore.egg-info/scm_file_list.json +106 -0
- fletchscore-0.1.0/src/fletchscore.egg-info/scm_version.json +8 -0
- fletchscore-0.1.0/src/fletchscore.egg-info/top_level.txt +1 -0
- fletchscore-0.1.0/tests/__init__.py +0 -0
- fletchscore-0.1.0/tests/test_docs_conf.py +49 -0
- fletchscore-0.1.0/tests/test_export_csv.py +131 -0
- fletchscore-0.1.0/tests/test_export_excel.py +173 -0
- fletchscore-0.1.0/tests/test_export_pdf.py +145 -0
- fletchscore-0.1.0/tests/test_gui_config.py +60 -0
- fletchscore-0.1.0/tests/test_gui_robustesse.py +93 -0
- fletchscore-0.1.0/tests/test_import_csv.py +320 -0
- fletchscore-0.1.0/tests/test_models.py +167 -0
- fletchscore-0.1.0/tests/test_referentiels_styles.py +42 -0
- fletchscore-0.1.0/tests/test_scoring_classement.py +213 -0
- fletchscore-0.1.0/tests/test_scoring_classement_global.py +110 -0
- fletchscore-0.1.0/tests/test_services.py +832 -0
- fletchscore-0.1.0/tests/test_storage.py +402 -0
- fletchscore-0.1.0/tests/test_storage_epreuve_templates.py +45 -0
- fletchscore-0.1.0/tests/test_storage_listes.py +60 -0
- fletchscore-0.1.0/tests/test_storage_ouverture.py +56 -0
- fletchscore-0.1.0/web/assets/club/.gitkeep +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Signaler un bug / Report a bug
|
|
3
|
+
about: Quelque chose ne fonctionne pas comme attendu / Something isn't working as expected
|
|
4
|
+
title: ""
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!--
|
|
10
|
+
Pas besoin de remplir chaque section à la perfection -- un problème bien
|
|
11
|
+
décrit suffit amplement. Supprime ce qui ne s'applique pas.
|
|
12
|
+
|
|
13
|
+
No need to fill every section perfectly -- a well-described problem is
|
|
14
|
+
plenty. Delete whatever doesn't apply.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
**Vue concernée / Which view** -- organisateur (GUI) / compétiteur (web) / import-export / autre
|
|
18
|
+
|
|
19
|
+
**Ce que j'ai fait / What I did**
|
|
20
|
+
|
|
21
|
+
**Ce à quoi je m'attendais / What I expected**
|
|
22
|
+
|
|
23
|
+
**Ce qui s'est passé à la place / What happened instead**
|
|
24
|
+
|
|
25
|
+
**Comment j'ai lancé FletchScore / How I launched FletchScore**
|
|
26
|
+
<!-- pip install, exécutable Windows/Linux, Pydroid... -->
|
|
27
|
+
|
|
28
|
+
**Système et version / Platform and version**
|
|
29
|
+
<!-- Windows/Linux/macOS/Android + version de FletchScore, visible en bas
|
|
30
|
+
de la fenêtre ou dans le terminal au démarrage -->
|
|
31
|
+
|
|
32
|
+
**Journal / Log**
|
|
33
|
+
<!-- Si pertinent, un extrait de logs/fletchscore.log autour du moment du
|
|
34
|
+
problème aide beaucoup. -->
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# blank_issues_enabled reste à true volontairement : CONTRIBUTING.md dit
|
|
2
|
+
# explicitement "pas besoin de formulaire compliqué" -- ces modèles sont
|
|
3
|
+
# des points de départ pratiques, pas une étape obligatoire.
|
|
4
|
+
blank_issues_enabled: true
|
|
5
|
+
contact_links:
|
|
6
|
+
- name: Signaler une faille de sécurité / Report a security vulnerability
|
|
7
|
+
url: https://github.com/MrFanghoDev/fletchscore/security/advisories/new
|
|
8
|
+
about: Ne pas ouvrir d'Issue publique pour ça -- voir SECURITY.md / Don't open a public Issue for this -- see SECURITY.md
|
|
9
|
+
- name: Documentation
|
|
10
|
+
url: https://mrfanghodev.github.io/fletchscore/
|
|
11
|
+
about: Cahier des charges, guide développeur, architecture technique / Project spec, developer guide, technical architecture
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Proposer une idée / Suggest an idea
|
|
3
|
+
about: Une fonctionnalité ou une amélioration à envisager / A feature or improvement to consider
|
|
4
|
+
title: ""
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!--
|
|
10
|
+
Pas besoin d'avoir déjà une solution en tête -- décrire le besoin ou la
|
|
11
|
+
situation suffit largement.
|
|
12
|
+
|
|
13
|
+
No need to have a solution in mind already -- describing the need or
|
|
14
|
+
situation is plenty.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
**Le besoin ou la situation / The need or situation**
|
|
18
|
+
<!-- Qu'est-ce qui te manque, ou qu'est-ce qui est pénible aujourd'hui ? -->
|
|
19
|
+
|
|
20
|
+
**Ce que tu imagines comme solution (optionnel) / What you imagine as a solution (optional)**
|
|
21
|
+
|
|
22
|
+
**Contexte utile / Useful context**
|
|
23
|
+
<!-- Usage club, type de compétition (Indoor, Flint, Field...), taille de
|
|
24
|
+
l'événement... tout ce qui aide à comprendre le besoin réel. -->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Merci pour cette Pull Request ! Quelques lignes sur le *pourquoi* du
|
|
3
|
+
changement aident bien plus qu'une description exhaustive du *quoi* --
|
|
4
|
+
voir CONTRIBUTING.md pour le détail du processus.
|
|
5
|
+
|
|
6
|
+
Thanks for this Pull Request! A few lines on the *why* of the change help
|
|
7
|
+
much more than an exhaustive description of the *what* -- see
|
|
8
|
+
CONTRIBUTING.md for the full process.
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
## Pourquoi ce changement / Why this change
|
|
12
|
+
|
|
13
|
+
## Ce qui change concrètement / What actually changes
|
|
14
|
+
|
|
15
|
+
## Vérifié / Checked
|
|
16
|
+
|
|
17
|
+
- [ ] La suite de tests passe (`python3 run_tests.py`) / Test suite passes
|
|
18
|
+
- [ ] Le code est formaté (`black` + `ruff check --fix`) / Code is formatted
|
|
19
|
+
- [ ] La doc a été mise à jour si pertinent / Docs updated if relevant
|
|
20
|
+
- [ ] Si changement sur la vue compétiteur (web) : vérifié avec un vrai
|
|
21
|
+
rendu (Playwright), pas juste relu / If a change to the competitor
|
|
22
|
+
(web) view: verified with a real render (Playwright), not just reviewed
|
|
23
|
+
|
|
24
|
+
<!--
|
|
25
|
+
Pas grave si une case ne s'applique pas ou si tu n'es pas sûr·e -- dis-le,
|
|
26
|
+
ça se règle facilement en revue.
|
|
27
|
+
|
|
28
|
+
It's fine if a box doesn't apply or you're unsure -- just say so, it's
|
|
29
|
+
easy to sort out during review.
|
|
30
|
+
-->
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
name: Distribution (paquet Python, exécutables)
|
|
2
|
+
|
|
3
|
+
# Un seul workflow pour toute la chaîne de distribution :
|
|
4
|
+
# - construction du paquet Python (sdist + wheel), publié sur TestPyPI à
|
|
5
|
+
# chaque push pertinent, sur PyPI (le vrai) à la publication d'une
|
|
6
|
+
# Release GitHub, et joint à cette même Release en téléchargement direct
|
|
7
|
+
# - construction des exécutables autoporteurs Windows/Linux (PyInstaller),
|
|
8
|
+
# joints à la même Release sur un tag
|
|
9
|
+
#
|
|
10
|
+
# Repris tel quel du modèle FletchTime -- voir CLAUDE.md. macOS absent de
|
|
11
|
+
# la matrice : non vérifiable sans accès à du matériel réel.
|
|
12
|
+
#
|
|
13
|
+
# ATTENTION -- configuration externe liée au NOM DE CE FICHIER : PyPI et
|
|
14
|
+
# TestPyPI valident le Trusted Publisher (OIDC) en comparant le nom exact
|
|
15
|
+
# du fichier workflow qui appelle l'API de publication. Si ce fichier est
|
|
16
|
+
# renommé, il faut mettre à jour le champ "Workflow name" correspondant :
|
|
17
|
+
# - https://pypi.org/manage/account/publishing/ (projet fletchscore)
|
|
18
|
+
# - https://test.pypi.org/manage/account/publishing/ (projet fletchscore)
|
|
19
|
+
#
|
|
20
|
+
# Configuration ponctuelle nécessaire (une seule fois, avant le premier
|
|
21
|
+
# déclenchement de publish-testpypi/publish-pypi -- sinon le job échoue
|
|
22
|
+
# avec une erreur d'authentification OIDC) :
|
|
23
|
+
# PyPI (https://pypi.org) et TestPyPI (https://test.pypi.org -- compte
|
|
24
|
+
# SÉPARÉ, inscription indépendante) : ajoute un "trusted publisher" sur
|
|
25
|
+
# chacun -- PyPI Project Name: fletchscore, Owner: MrFanghoDev,
|
|
26
|
+
# Repository name: fletchscore, Workflow name: build.yml,
|
|
27
|
+
# Environment name: pypi / testpypi respectivement.
|
|
28
|
+
#
|
|
29
|
+
# TODO test de fumée après build des exécutables : reporté (voir
|
|
30
|
+
# CLAUDE.md / docs/roadmap.md) tant que le mode --headless et le
|
|
31
|
+
# comportement de la vue compétiteur (serveur HTTP local) ne sont pas
|
|
32
|
+
# stabilisés côté CLI. En attendant, seule une vérification minimale
|
|
33
|
+
# (`--version` répond) est faite -- pas un vrai test de bout en bout
|
|
34
|
+
# comme celui de FletchTime sur sa page d'accueil.
|
|
35
|
+
|
|
36
|
+
on:
|
|
37
|
+
push:
|
|
38
|
+
branches: [main, master]
|
|
39
|
+
tags:
|
|
40
|
+
- "v*.*.*"
|
|
41
|
+
paths:
|
|
42
|
+
- "src/**"
|
|
43
|
+
- "pyproject.toml"
|
|
44
|
+
- "fletchscore.spec"
|
|
45
|
+
- ".github/workflows/build.yml"
|
|
46
|
+
release:
|
|
47
|
+
types: [published]
|
|
48
|
+
workflow_dispatch:
|
|
49
|
+
|
|
50
|
+
permissions:
|
|
51
|
+
contents: write
|
|
52
|
+
|
|
53
|
+
jobs:
|
|
54
|
+
# -- Paquet Python (sdist + wheel) ----------------------------------------
|
|
55
|
+
|
|
56
|
+
build-package:
|
|
57
|
+
if: github.event_name != 'push' || !contains(github.event.head_commit.message, 'corrections automatiques (black + ruff)')
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v4
|
|
61
|
+
with:
|
|
62
|
+
fetch-depth: 0
|
|
63
|
+
|
|
64
|
+
- uses: actions/setup-python@v5
|
|
65
|
+
with:
|
|
66
|
+
python-version: "3.12"
|
|
67
|
+
|
|
68
|
+
- name: Installer les outils de build
|
|
69
|
+
run: pip install build
|
|
70
|
+
|
|
71
|
+
- name: Construire la distribution (sdist + wheel)
|
|
72
|
+
run: python -m build
|
|
73
|
+
|
|
74
|
+
- uses: actions/upload-artifact@v4
|
|
75
|
+
with:
|
|
76
|
+
name: dist
|
|
77
|
+
path: dist/
|
|
78
|
+
|
|
79
|
+
publish-testpypi:
|
|
80
|
+
needs: build-package
|
|
81
|
+
if: github.event_name != 'release' && !startsWith(github.ref, 'refs/tags/v')
|
|
82
|
+
runs-on: ubuntu-latest
|
|
83
|
+
environment:
|
|
84
|
+
name: testpypi
|
|
85
|
+
url: https://test.pypi.org/project/fletchscore/
|
|
86
|
+
permissions:
|
|
87
|
+
id-token: write
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/download-artifact@v4
|
|
90
|
+
with:
|
|
91
|
+
name: dist
|
|
92
|
+
path: dist/
|
|
93
|
+
|
|
94
|
+
- name: Publier sur TestPyPI
|
|
95
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
96
|
+
with:
|
|
97
|
+
repository-url: https://test.pypi.org/legacy/
|
|
98
|
+
|
|
99
|
+
publish-pypi:
|
|
100
|
+
needs: build-package
|
|
101
|
+
if: github.event_name == 'release'
|
|
102
|
+
runs-on: ubuntu-latest
|
|
103
|
+
environment:
|
|
104
|
+
name: pypi
|
|
105
|
+
url: https://pypi.org/project/fletchscore/
|
|
106
|
+
permissions:
|
|
107
|
+
id-token: write
|
|
108
|
+
steps:
|
|
109
|
+
- uses: actions/download-artifact@v4
|
|
110
|
+
with:
|
|
111
|
+
name: dist
|
|
112
|
+
path: dist/
|
|
113
|
+
|
|
114
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
115
|
+
|
|
116
|
+
# -- Exécutables autoporteurs (PyInstaller) -------------------------------
|
|
117
|
+
|
|
118
|
+
build-executables:
|
|
119
|
+
if: github.event_name != 'release' && (github.event_name != 'push' || !contains(github.event.head_commit.message, 'corrections automatiques (black + ruff)'))
|
|
120
|
+
strategy:
|
|
121
|
+
fail-fast: false
|
|
122
|
+
matrix:
|
|
123
|
+
include:
|
|
124
|
+
- os: windows-latest
|
|
125
|
+
archive_name: FletchScore-${{ (startsWith(github.ref, 'refs/tags/v') && github.ref_name) || 'dev' }}-windows.zip
|
|
126
|
+
|
|
127
|
+
- os: ubuntu-latest
|
|
128
|
+
archive_name: FletchScore-${{ (startsWith(github.ref, 'refs/tags/v') && github.ref_name) || 'dev' }}-linux.tar.gz
|
|
129
|
+
|
|
130
|
+
runs-on: ${{ matrix.os }}
|
|
131
|
+
|
|
132
|
+
steps:
|
|
133
|
+
- uses: actions/checkout@v4
|
|
134
|
+
with:
|
|
135
|
+
fetch-depth: 0
|
|
136
|
+
|
|
137
|
+
- uses: actions/setup-python@v5
|
|
138
|
+
with:
|
|
139
|
+
python-version: "3.12"
|
|
140
|
+
|
|
141
|
+
- name: Installer les dépendances
|
|
142
|
+
run: |
|
|
143
|
+
python -m pip install --upgrade pip
|
|
144
|
+
pip install pyinstaller customtkinter openpyxl
|
|
145
|
+
# Installe aussi le paquet lui-même : déclenche setuptools_scm et
|
|
146
|
+
# génère src/fletchscore/_version.py avec la version dérivée du
|
|
147
|
+
# tag -- sans elle, PyInstaller retombe sur le repli "dev" même
|
|
148
|
+
# sur un vrai tag de release.
|
|
149
|
+
pip install -e .
|
|
150
|
+
|
|
151
|
+
- name: Construire l'exécutable (--onedir, voir fletchscore.spec)
|
|
152
|
+
run: |
|
|
153
|
+
pyinstaller fletchscore.spec
|
|
154
|
+
|
|
155
|
+
- name: Vérifier le contenu de dist
|
|
156
|
+
shell: bash
|
|
157
|
+
run: |
|
|
158
|
+
echo "Runner : $RUNNER_OS"
|
|
159
|
+
pwd
|
|
160
|
+
ls -R dist
|
|
161
|
+
|
|
162
|
+
- name: Test minimal -- l'exécutable répond à --version (Linux)
|
|
163
|
+
if: runner.os != 'Windows'
|
|
164
|
+
shell: bash
|
|
165
|
+
run: ./dist/FletchScore/FletchScore --version
|
|
166
|
+
|
|
167
|
+
- name: Test minimal -- l'exécutable répond à --version (Windows)
|
|
168
|
+
if: runner.os == 'Windows'
|
|
169
|
+
shell: pwsh
|
|
170
|
+
run: .\dist\FletchScore\FletchScore.exe --version
|
|
171
|
+
|
|
172
|
+
- name: Créer l'archive Windows
|
|
173
|
+
if: runner.os == 'Windows'
|
|
174
|
+
shell: pwsh
|
|
175
|
+
run: |
|
|
176
|
+
Compress-Archive `
|
|
177
|
+
-Path dist/FletchScore/* `
|
|
178
|
+
-DestinationPath dist/${{ matrix.archive_name }}
|
|
179
|
+
|
|
180
|
+
- name: Créer l'archive Linux
|
|
181
|
+
if: runner.os != 'Windows'
|
|
182
|
+
shell: bash
|
|
183
|
+
run: |
|
|
184
|
+
cd dist
|
|
185
|
+
tar -czf ${{ matrix.archive_name }} FletchScore
|
|
186
|
+
|
|
187
|
+
- uses: actions/upload-artifact@v4
|
|
188
|
+
with:
|
|
189
|
+
name: ${{ matrix.archive_name }}
|
|
190
|
+
path: dist/${{ matrix.archive_name }}
|
|
191
|
+
|
|
192
|
+
archive-on-release:
|
|
193
|
+
needs: [build-executables, build-package]
|
|
194
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
195
|
+
runs-on: ubuntu-latest
|
|
196
|
+
steps:
|
|
197
|
+
- uses: actions/download-artifact@v4
|
|
198
|
+
with:
|
|
199
|
+
path: artifacts
|
|
200
|
+
|
|
201
|
+
- name: Joindre les exécutables et le paquet Python à la Release GitHub
|
|
202
|
+
uses: softprops/action-gh-release@v2
|
|
203
|
+
with:
|
|
204
|
+
files: artifacts/*/*
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
name: Documentation (construction, publication, archivage)
|
|
2
|
+
|
|
3
|
+
# Un seul workflow pour tout le cycle de vie de la documentation Sphinx :
|
|
4
|
+
# - construction à chaque push touchant à la doc ou au code (docs/, src/)
|
|
5
|
+
# -- attrape une erreur de construction tôt, sans attendre un tag
|
|
6
|
+
# - publication sur GitHub Pages UNIQUEMENT sur un tag ou un lancement
|
|
7
|
+
# manuel -- jamais sur un simple push de branche : GitHub Pages ignore
|
|
8
|
+
# silencieusement un second déploiement pour un même SHA de commit
|
|
9
|
+
# (confirmé par leur support côté FletchTime), ce qui rendait le
|
|
10
|
+
# déploiement d'un tag inopérant s'il avait déjà été déployé juste avant
|
|
11
|
+
# via un simple push de branche vers main
|
|
12
|
+
# - archivage (.tar.gz joint à la Release GitHub) uniquement sur un tag
|
|
13
|
+
#
|
|
14
|
+
# Repris tel quel du modèle FletchTime (voir CLAUDE.md) -- même bug de
|
|
15
|
+
# dédup SHA déjà rencontré et corrigé côté FletchTime, pas de raison de le
|
|
16
|
+
# revivre ici.
|
|
17
|
+
#
|
|
18
|
+
# Configuration ponctuelle nécessaire (une seule fois, sur GitHub) :
|
|
19
|
+
# Settings -> Pages -> Source: "GitHub Actions"
|
|
20
|
+
|
|
21
|
+
on:
|
|
22
|
+
push:
|
|
23
|
+
branches: [main, master]
|
|
24
|
+
tags:
|
|
25
|
+
- "v*.*.*"
|
|
26
|
+
paths:
|
|
27
|
+
- "docs/**"
|
|
28
|
+
- "src/**"
|
|
29
|
+
- ".github/workflows/docs.yml"
|
|
30
|
+
workflow_dispatch:
|
|
31
|
+
|
|
32
|
+
permissions:
|
|
33
|
+
contents: write
|
|
34
|
+
pages: write
|
|
35
|
+
id-token: write
|
|
36
|
+
|
|
37
|
+
concurrency:
|
|
38
|
+
group: "pages"
|
|
39
|
+
cancel-in-progress: true
|
|
40
|
+
|
|
41
|
+
jobs:
|
|
42
|
+
build:
|
|
43
|
+
# Ignore les commits du bot de formatage automatique (voir test.yml) --
|
|
44
|
+
# sans ça, ce commit déclenche un second run sur un commit décalé d'un
|
|
45
|
+
# cran par rapport au tag qu'on vient de poser.
|
|
46
|
+
if: github.event_name != 'push' || !contains(github.event.head_commit.message, 'corrections automatiques (black + ruff)')
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
with:
|
|
51
|
+
fetch-depth: 0 # historique complet (tags compris) -- nécessaire à
|
|
52
|
+
# setuptools_scm pour déterminer la version
|
|
53
|
+
|
|
54
|
+
- uses: actions/setup-python@v5
|
|
55
|
+
with:
|
|
56
|
+
python-version: "3.12"
|
|
57
|
+
|
|
58
|
+
- name: Installer le paquet et les dépendances de la doc
|
|
59
|
+
run: |
|
|
60
|
+
pip install -e .
|
|
61
|
+
pip install -r docs/requirements.txt
|
|
62
|
+
|
|
63
|
+
- name: Diagnostic -- ref déclencheur et version calculée
|
|
64
|
+
run: |
|
|
65
|
+
echo "Événement : ${{ github.event_name }}"
|
|
66
|
+
echo "Ref déclencheur : ${{ github.ref }}"
|
|
67
|
+
echo "SHA du commit : ${{ github.sha }}"
|
|
68
|
+
echo "Version calculée par setuptools_scm :"
|
|
69
|
+
python -c "from importlib.metadata import version; print(version('fletchscore'))"
|
|
70
|
+
echo "Sortie de 'git describe' pour comparaison :"
|
|
71
|
+
git describe --tags --long --always || echo "(aucun tag trouvé)"
|
|
72
|
+
|
|
73
|
+
- name: Construire la doc HTML
|
|
74
|
+
run: sphinx-build -b html docs docs/_build/html
|
|
75
|
+
|
|
76
|
+
- uses: actions/upload-pages-artifact@v3
|
|
77
|
+
with:
|
|
78
|
+
path: docs/_build/html
|
|
79
|
+
|
|
80
|
+
- name: Créer l'archive de la doc (pour la Release, si on est sur un tag)
|
|
81
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
82
|
+
env:
|
|
83
|
+
ARCHIVE_NAME: FletchScore-${{ github.ref_name }}-docs.tar.gz
|
|
84
|
+
run: tar -czf "$ARCHIVE_NAME" -C docs/_build/html .
|
|
85
|
+
|
|
86
|
+
- uses: actions/upload-artifact@v4
|
|
87
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
88
|
+
with:
|
|
89
|
+
name: docs-archive
|
|
90
|
+
path: FletchScore-*-docs.tar.gz
|
|
91
|
+
|
|
92
|
+
deploy-pages:
|
|
93
|
+
needs: build
|
|
94
|
+
# UNIQUEMENT sur un tag ou un lancement manuel -- voir l'explication
|
|
95
|
+
# du bug de dédup SHA en tête de fichier.
|
|
96
|
+
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
environment:
|
|
99
|
+
name: github-pages
|
|
100
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
101
|
+
steps:
|
|
102
|
+
- id: deployment
|
|
103
|
+
uses: actions/deploy-pages@v4
|
|
104
|
+
|
|
105
|
+
archive-on-release:
|
|
106
|
+
needs: build
|
|
107
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
108
|
+
runs-on: ubuntu-latest
|
|
109
|
+
steps:
|
|
110
|
+
- uses: actions/download-artifact@v4
|
|
111
|
+
with:
|
|
112
|
+
name: docs-archive
|
|
113
|
+
|
|
114
|
+
- name: Joindre l'archive à la Release GitHub
|
|
115
|
+
uses: softprops/action-gh-release@v2
|
|
116
|
+
with:
|
|
117
|
+
files: FletchScore-*-docs.tar.gz
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: Tests (lint + tests)
|
|
2
|
+
|
|
3
|
+
# Qualité continue : formatage/lint (Black + Ruff) puis suite de tests, à
|
|
4
|
+
# chaque push et pull request.
|
|
5
|
+
#
|
|
6
|
+
# - Sur un push direct (main/master) : Black et Ruff corrigent
|
|
7
|
+
# automatiquement, et la correction est recommitée si besoin -- pratique
|
|
8
|
+
# pour un projet à un seul mainteneur qui n'a pas toujours lancé les
|
|
9
|
+
# formatteurs en local avant de pousser.
|
|
10
|
+
# - Sur une pull request : Black/Ruff tournent en mode vérification
|
|
11
|
+
# seulement (`--check`) et font échouer le job si le code n'est pas
|
|
12
|
+
# conforme, plutôt que de commiter directement sur la branche de la PR.
|
|
13
|
+
#
|
|
14
|
+
# Repris tel quel du modèle FletchTime -- voir CLAUDE.md.
|
|
15
|
+
|
|
16
|
+
on:
|
|
17
|
+
push:
|
|
18
|
+
branches: [main, master]
|
|
19
|
+
pull_request:
|
|
20
|
+
workflow_dispatch:
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: write
|
|
24
|
+
|
|
25
|
+
env:
|
|
26
|
+
LINT_PATHS: src tests run_tests.py
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
lint:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
|
|
34
|
+
- uses: actions/setup-python@v5
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.12"
|
|
37
|
+
|
|
38
|
+
- name: Installer Black et Ruff
|
|
39
|
+
run: pip install black ruff
|
|
40
|
+
|
|
41
|
+
- name: Black -- correction automatique (push direct)
|
|
42
|
+
if: github.event_name == 'push'
|
|
43
|
+
run: black ${{ env.LINT_PATHS }}
|
|
44
|
+
|
|
45
|
+
- name: Ruff -- correction automatique (push direct)
|
|
46
|
+
if: github.event_name == 'push'
|
|
47
|
+
run: ruff check --fix ${{ env.LINT_PATHS }}
|
|
48
|
+
|
|
49
|
+
- name: Commit des corrections automatiques, si nécessaire
|
|
50
|
+
if: github.event_name == 'push'
|
|
51
|
+
uses: stefanzweifel/git-auto-commit-action@v5
|
|
52
|
+
with:
|
|
53
|
+
commit_message: "style: corrections automatiques (black + ruff)"
|
|
54
|
+
commit_user_name: "github-actions[bot]"
|
|
55
|
+
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
|
56
|
+
|
|
57
|
+
- name: Black -- vérification seule (pull request)
|
|
58
|
+
if: github.event_name == 'pull_request'
|
|
59
|
+
run: black --check --diff ${{ env.LINT_PATHS }}
|
|
60
|
+
|
|
61
|
+
- name: Ruff -- vérification seule (pull request)
|
|
62
|
+
if: github.event_name == 'pull_request'
|
|
63
|
+
run: ruff check ${{ env.LINT_PATHS }}
|
|
64
|
+
|
|
65
|
+
test:
|
|
66
|
+
needs: lint
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@v4
|
|
70
|
+
with:
|
|
71
|
+
ref: ${{ github.head_ref || github.ref }}
|
|
72
|
+
|
|
73
|
+
- uses: actions/setup-python@v5
|
|
74
|
+
with:
|
|
75
|
+
python-version: "3.12"
|
|
76
|
+
|
|
77
|
+
- name: Installer le paquet et ses dépendances
|
|
78
|
+
# Sans cette étape, seuls les tests qui ne dépendent que de la
|
|
79
|
+
# stdlib passaient -- tout ce qui a besoin d'une vraie dépendance
|
|
80
|
+
# (openpyxl, fpdf2, customtkinter) échouait, ou était compté
|
|
81
|
+
# "skipped" à tort en pensant que c'était l'environnement de dev
|
|
82
|
+
# local qui manquait de réseau, alors que la CI ne l'installait
|
|
83
|
+
# simplement jamais non plus. Bug réel remonté par l'utilisateur.
|
|
84
|
+
run: pip install -e ".[dev]"
|
|
85
|
+
|
|
86
|
+
- name: Lancer la suite de tests
|
|
87
|
+
env:
|
|
88
|
+
PYTHONPATH: src
|
|
89
|
+
run: python -m unittest discover -s tests -v
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
.mypy_cache/
|
|
7
|
+
|
|
8
|
+
# Généré par setuptools_scm à la construction (voir pyproject.toml,
|
|
9
|
+
# write_to) -- jamais committé, régénéré à chaque `pip install -e .` /
|
|
10
|
+
# `python -m build` / etc.
|
|
11
|
+
src/fletchscore/_version.py
|
|
12
|
+
|
|
13
|
+
# Artefacts de build (wheel, PyInstaller) -- jamais versionnés, régénérés
|
|
14
|
+
# à la demande via `python -m build` ou `pyinstaller fletchscore.spec`.
|
|
15
|
+
build/
|
|
16
|
+
dist/
|
|
17
|
+
|
|
18
|
+
# Environnements virtuels
|
|
19
|
+
.venv/
|
|
20
|
+
venv/
|
|
21
|
+
|
|
22
|
+
# Sphinx
|
|
23
|
+
docs/_build/
|
|
24
|
+
|
|
25
|
+
# Mot de passe de contrôle organisateur -- contient un vrai secret,
|
|
26
|
+
# jamais versionné.
|
|
27
|
+
config/auth.toml
|
|
28
|
+
|
|
29
|
+
# Préférences de la fenêtre graphique (thème...) -- propres à la machine/
|
|
30
|
+
# personne qui lance la fenêtre, pas un réglage de club à partager.
|
|
31
|
+
config/gui.toml
|
|
32
|
+
|
|
33
|
+
# Base de données locale -- contient des données personnelles réelles de
|
|
34
|
+
# compétiteurs (id fédéral, nom, date de naissance) : ne doit jamais être
|
|
35
|
+
# committée, ni en développement ni en test.
|
|
36
|
+
*.db
|
|
37
|
+
*.sqlite
|
|
38
|
+
*.sqlite3
|
|
39
|
+
|
|
40
|
+
# Exports générés (Excel/PDF/CSV) -- peuvent contenir des données réelles
|
|
41
|
+
# de compétition.
|
|
42
|
+
exports/
|
|
43
|
+
*.xlsx
|
|
44
|
+
*.pdf
|
|
45
|
+
!docs/**/*.pdf
|
|
46
|
+
|
|
47
|
+
# Assets propres à un club (logo...) -- jamais versionnés dans le dépôt
|
|
48
|
+
# public partagé avec la FFTL, voir docs/architecture.md. Réservé pour
|
|
49
|
+
# une éventuelle personnalisation de la vue compétiteur / des exports ;
|
|
50
|
+
# vide pour l'instant si la fonctionnalité n'existe pas encore.
|
|
51
|
+
web/assets/club/*
|
|
52
|
+
!web/assets/club/.gitkeep
|
|
53
|
+
|
|
54
|
+
# Filet de sécurité : les dossiers de données du club ne doivent jamais se
|
|
55
|
+
# retrouver DANS le paquet lui-même (src/fletchscore/web/), seulement à la
|
|
56
|
+
# racine du dépôt (web/assets/, voir plus haut) -- ce chemin ne devrait
|
|
57
|
+
# normalement jamais exister, mais autant s'en protéger si un lancement
|
|
58
|
+
# particulier (ex. Pydroid dans un état inhabituel) le recréait quand même.
|
|
59
|
+
src/fletchscore/web/assets/
|
|
60
|
+
|
|
61
|
+
# OS / éditeurs
|
|
62
|
+
.DS_Store
|
|
63
|
+
Thumbs.db
|
|
64
|
+
*.swp
|
|
65
|
+
.vscode/
|
|
66
|
+
.idea/
|