allocine 0.0.12__tar.gz → 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.
Files changed (66) hide show
  1. allocine-0.1.0/.github/ISSUE_TEMPLATE.md +15 -0
  2. allocine-0.1.0/.github/dependabot.yml +6 -0
  3. allocine-0.1.0/.github/workflows/ci.yml +68 -0
  4. allocine-0.1.0/.github/workflows/release.yml +74 -0
  5. allocine-0.1.0/.gitignore +112 -0
  6. allocine-0.1.0/.pre-commit-config.yaml +19 -0
  7. allocine-0.1.0/.vscode/extensions.json +7 -0
  8. allocine-0.1.0/.vscode/settings.json +17 -0
  9. allocine-0.1.0/LICENSE +22 -0
  10. allocine-0.1.0/Makefile +6 -0
  11. allocine-0.1.0/PKG-INFO +214 -0
  12. {allocine-0.0.12 → allocine-0.1.0}/README.md +66 -51
  13. allocine-0.1.0/allocine/__init__.py +56 -0
  14. allocine-0.1.0/allocine/api.py +132 -0
  15. allocine-0.1.0/allocine/cache.py +134 -0
  16. allocine-0.1.0/allocine/cli.py +153 -0
  17. allocine-0.1.0/allocine/client.py +241 -0
  18. allocine-0.1.0/allocine/models.py +233 -0
  19. allocine-0.1.0/allocine/nationalities.py +448 -0
  20. allocine-0.1.0/allocine/schedules.py +162 -0
  21. allocine-0.1.0/allocine.egg-info/PKG-INFO +214 -0
  22. allocine-0.1.0/allocine.egg-info/SOURCES.txt +53 -0
  23. allocine-0.1.0/allocine.egg-info/entry_points.txt +2 -0
  24. allocine-0.1.0/allocine.egg-info/requires.txt +18 -0
  25. allocine-0.1.0/allocine.egg-info/scm_file_list.json +49 -0
  26. allocine-0.1.0/allocine.egg-info/scm_version.json +8 -0
  27. allocine-0.1.0/cinema.jpg +0 -0
  28. allocine-0.1.0/demo.gif +0 -0
  29. allocine-0.1.0/demo.tape +95 -0
  30. allocine-0.1.0/pyproject.toml +69 -0
  31. allocine-0.1.0/pytest.ini +6 -0
  32. allocine-0.1.0/setup.cfg +4 -0
  33. allocine-0.1.0/snapshot_theater_id.png +0 -0
  34. allocine-0.1.0/tests/__snapshots__/test_allocine/test_get_showtimes_clamps_past_from_date_to_today.json +449 -0
  35. allocine-0.1.0/tests/__snapshots__/test_allocine/test_get_showtimes_defaults_to_today.json +529 -0
  36. allocine-0.1.0/tests/__snapshots__/test_allocine/test_get_showtimes_fetches_inclusive_date_range.json +976 -0
  37. allocine-0.1.0/tests/__snapshots__/test_allocine/test_get_theater.json +7 -0
  38. allocine-0.1.0/tests/__snapshots__/test_allocine/test_get_theater_falls_back_to_page_metadata.json +7 -0
  39. allocine-0.1.0/tests/__snapshots__/test_allocine/test_search_theaters.json +19 -0
  40. allocine-0.1.0/tests/cassettes/get_showtimes_clamps_past_from_date_to_today.json +14961 -0
  41. allocine-0.1.0/tests/cassettes/get_showtimes_defaults_to_today.json +17196 -0
  42. allocine-0.1.0/tests/cassettes/get_showtimes_fetches_inclusive_date_range.json +32152 -0
  43. allocine-0.1.0/tests/cassettes/get_showtimes_treats_not_found_as_empty_without_retry.json +85 -0
  44. allocine-0.1.0/tests/cassettes/get_theater.json +38467 -0
  45. allocine-0.1.0/tests/cassettes/get_theater_falls_back_to_page_metadata.json +207 -0
  46. allocine-0.1.0/tests/cassettes/search_theaters.json +177 -0
  47. allocine-0.1.0/tests/conftest.py +59 -0
  48. allocine-0.1.0/tests/smoke_test.py +12 -0
  49. allocine-0.1.0/tests/test_allocine.py +79 -0
  50. allocine-0.1.0/tests/test_cache.py +79 -0
  51. {allocine-0.0.12 → allocine-0.1.0}/tests/test_programoscope.py +43 -54
  52. allocine-0.1.0/uv.lock +1043 -0
  53. allocine-0.0.12/PKG-INFO +0 -15
  54. allocine-0.0.12/allocine/__init__.py +0 -649
  55. allocine-0.0.12/allocine/nationalities.py +0 -446
  56. allocine-0.0.12/allocine.egg-info/PKG-INFO +0 -15
  57. allocine-0.0.12/allocine.egg-info/SOURCES.txt +0 -15
  58. allocine-0.0.12/allocine.egg-info/requires.txt +0 -5
  59. allocine-0.0.12/requirements.txt +0 -5
  60. allocine-0.0.12/seances.py +0 -146
  61. allocine-0.0.12/setup.cfg +0 -10
  62. allocine-0.0.12/setup.py +0 -55
  63. allocine-0.0.12/tests/test_allocine.py +0 -25
  64. {allocine-0.0.12 → allocine-0.1.0}/MANIFEST.in +0 -0
  65. {allocine-0.0.12 → allocine-0.1.0}/allocine.egg-info/dependency_links.txt +0 -0
  66. {allocine-0.0.12 → allocine-0.1.0}/allocine.egg-info/top_level.txt +0 -0
@@ -0,0 +1,15 @@
1
+ * allocine version:
2
+ * Python version:
3
+ * Operating System:
4
+
5
+ ### Description
6
+
7
+ Describe what you were trying to get done.
8
+ Tell us what happened, what went wrong, and what you expected to happen.
9
+
10
+ ### What I Did
11
+
12
+ ```
13
+ Paste the command(s) you ran and the output.
14
+ If there was a crash, please include the traceback here.
15
+ ```
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
@@ -0,0 +1,68 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ quality:
13
+ name: Quality checks
14
+ runs-on: ubuntu-latest
15
+ timeout-minutes: 10
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
19
+ with:
20
+ fetch-depth: 0
21
+ persist-credentials: false
22
+
23
+ - name: Install uv and Python
24
+ uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
25
+ with:
26
+ enable-cache: true
27
+ python-version: "3.14"
28
+ version: "0.12.19"
29
+
30
+ - name: Install the project
31
+ run: uv sync --locked --extra dev
32
+
33
+ - name: Lint
34
+ run: uv run ruff check .
35
+
36
+ - name: Check formatting
37
+ run: uv run ruff format --check .
38
+
39
+ - name: Type-check
40
+ run: uv run ty check
41
+
42
+ test:
43
+ name: Test (Python ${{ matrix.python-version }})
44
+ runs-on: ubuntu-latest
45
+ timeout-minutes: 10
46
+ strategy:
47
+ fail-fast: false
48
+ matrix:
49
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
50
+ steps:
51
+ - name: Checkout
52
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
53
+ with:
54
+ fetch-depth: 0
55
+ persist-credentials: false
56
+
57
+ - name: Install uv and Python
58
+ uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
59
+ with:
60
+ enable-cache: true
61
+ python-version: ${{ matrix.python-version }}
62
+ version: "0.12.19"
63
+
64
+ - name: Install the project
65
+ run: uv sync --locked --extra dev
66
+
67
+ - name: Run tests
68
+ run: uv run pytest
@@ -0,0 +1,74 @@
1
+ name: Publish release to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "[0-9]+.[0-9]+.[0-9]+"
7
+ - "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
8
+ - "[0-9]+.[0-9]+.[0-9]+[ab][0-9]+"
9
+
10
+ jobs:
11
+ build:
12
+ name: Build distributions
13
+ runs-on: ubuntu-latest
14
+ timeout-minutes: 10
15
+ permissions:
16
+ contents: read
17
+ env:
18
+ RELEASE_TAG: ${{ github.ref_name }}
19
+ steps:
20
+ - name: Checkout
21
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
+ with:
23
+ fetch-depth: 0
24
+ persist-credentials: false
25
+
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
28
+ with:
29
+ enable-cache: false
30
+ version: "0.12.19"
31
+
32
+ - name: Build distributions
33
+ run: uv build --no-sources
34
+
35
+ - name: Smoke-test wheel
36
+ run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
37
+
38
+ - name: Smoke-test source distribution
39
+ run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
40
+
41
+ - name: Upload distributions
42
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
43
+ with:
44
+ name: distributions
45
+ path: dist/
46
+
47
+ publish:
48
+ name: Publish to PyPI
49
+ needs: build
50
+ runs-on: ubuntu-latest
51
+ timeout-minutes: 10
52
+ environment:
53
+ name: pypi
54
+ url: https://pypi.org/project/allocine/
55
+ permissions:
56
+ id-token: write
57
+ steps:
58
+ - name: Install uv
59
+ uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
60
+ with:
61
+ enable-cache: false
62
+ version: "0.12.19"
63
+
64
+ - name: Download distributions
65
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
66
+ with:
67
+ name: distributions
68
+ path: dist/
69
+
70
+ - name: Generate PEP 740 attestations
71
+ uses: astral-sh/attest-action@f589a42a7efb6fe400b4f400de60b4bc90390027 # v0.0.6
72
+
73
+ - name: Publish distributions
74
+ run: uv publish
@@ -0,0 +1,112 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+
50
+ # Translations
51
+ *.mo
52
+ *.pot
53
+
54
+ # Django stuff:
55
+ *.log
56
+ local_settings.py
57
+ db.sqlite3
58
+
59
+ # Flask stuff:
60
+ instance/
61
+ .webassets-cache
62
+
63
+ # Scrapy stuff:
64
+ .scrapy
65
+
66
+ # Sphinx documentation
67
+ docs/_build/
68
+
69
+ # PyBuilder
70
+ target/
71
+
72
+ # Jupyter Notebook
73
+ .ipynb_checkpoints
74
+
75
+ # pyenv
76
+ .python-version
77
+
78
+ # celery beat schedule file
79
+ celerybeat-schedule
80
+
81
+ # SageMath parsed files
82
+ *.sage.py
83
+
84
+ # Environments
85
+ .env
86
+ .venv
87
+ env/
88
+ venv/
89
+ ENV/
90
+ env.bak/
91
+ venv.bak/
92
+
93
+ # Spyder project settings
94
+ .spyderproject
95
+ .spyproject
96
+
97
+ # Rope project settings
98
+ .ropeproject
99
+
100
+ # mkdocs documentation
101
+ /site
102
+
103
+ # mypy
104
+ .mypy_cache/
105
+
106
+ # Ruff
107
+ .ruff_cache/
108
+
109
+ # VS Code workspace configuration
110
+ .vscode/*
111
+ !.vscode/extensions.json
112
+ !.vscode/settings.json
@@ -0,0 +1,19 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: ruff-check
5
+ name: ruff check
6
+ entry: .venv/bin/ruff check --fix
7
+ language: system
8
+ types_or: [python, pyi]
9
+ - id: ruff-format
10
+ name: ruff format
11
+ entry: .venv/bin/ruff format
12
+ language: system
13
+ types_or: [python, pyi]
14
+ - id: ty-check
15
+ name: ty check
16
+ entry: .venv/bin/ty check
17
+ language: system
18
+ pass_filenames: false
19
+ always_run: true
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "astral-sh.ty",
4
+ "charliermarsh.ruff",
5
+ "ms-python.python"
6
+ ]
7
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
3
+ "python.languageServer": "None",
4
+ "ruff.configurationPreference": "filesystemFirst",
5
+ "ruff.interpreter": ["${workspaceFolder}/.venv/bin/python"],
6
+ "ruff.nativeServer": "on",
7
+ "ty.diagnosticMode": "workspace",
8
+ "ty.interpreter": ["${workspaceFolder}/.venv/bin/python"],
9
+ "[python]": {
10
+ "editor.codeActionsOnSave": {
11
+ "source.fixAll.ruff": "explicit",
12
+ "source.organizeImports.ruff": "explicit"
13
+ },
14
+ "editor.defaultFormatter": "charliermarsh.ruff",
15
+ "editor.formatOnSave": true
16
+ }
17
+ }
allocine-0.1.0/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018, Thibault Ducret
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,6 @@
1
+ .PHONY: check
2
+
3
+ check:
4
+ .venv/bin/ruff check --fix .
5
+ .venv/bin/ruff format .
6
+ .venv/bin/ty check
@@ -0,0 +1,214 @@
1
+ Metadata-Version: 2.4
2
+ Name: allocine
3
+ Version: 0.1.0
4
+ Summary: Non official Python wrapper for allocine.fr
5
+ Author-email: Thibault Ducret <hello@tducret.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/tducret/allocine-python
8
+ Keywords: allocine,api,parser,parsing,python-wrapper,scraper,scraping
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Requires-Python: >=3.10
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: backoff>=2.2.1
15
+ Requires-Dist: click>=8.5.0
16
+ Requires-Dist: diskcache<6,>=5.6
17
+ Requires-Dist: httpx2>=2.13.1
18
+ Requires-Dist: jmespath>=1.1.0
19
+ Requires-Dist: parsel>=1.10.0
20
+ Requires-Dist: platformdirs>=4.3
21
+ Requires-Dist: rich>=14.2.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: freezegun>=1.5.5; extra == "dev"
24
+ Requires-Dist: pre-commit>=4.6.2; extra == "dev"
25
+ Requires-Dist: pytest>=9.1.1; extra == "dev"
26
+ Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
27
+ Requires-Dist: ruff>=0.16.9; extra == "dev"
28
+ Requires-Dist: syrupy>=6.1.1; extra == "dev"
29
+ Requires-Dist: ty>=0.0.84; extra == "dev"
30
+ Requires-Dist: vcrpy>=8.3.0; extra == "dev"
31
+ Dynamic: license-file
32
+
33
+ # Allociné
34
+
35
+ [![PyPI](https://img.shields.io/pypi/v/allocine.svg)](https://pypi.org/project/allocine/)
36
+ ![License](https://img.shields.io/github/license/tducret/allocine-python.svg)
37
+
38
+ ![Cinéma](cinema.jpg)
39
+
40
+ ## Description
41
+
42
+ **Avec cet outil, vous récupérez les horaires des séances ciné directement dans le terminal**.
43
+
44
+ ## Prérequis
45
+
46
+ - Python 3.10 ou une version ultérieure
47
+ - [uv](https://docs.astral.sh/uv/)
48
+
49
+ ## Installation
50
+
51
+ ```bash
52
+ uv tool install --upgrade allocine
53
+ ```
54
+
55
+ ## Utilisation en ligne de commande
56
+
57
+ Commencez par rechercher l’identifiant de votre cinéma sur [allocine.fr](https://www.allocine.fr/).
58
+
59
+ Recherchez votre cinéma et relevez son identifiant dans l’URL. Dans cet exemple, il s’agit de `P0645`.
60
+
61
+ ![Identifiant du cinéma](snapshot_theater_id.png)
62
+
63
+ ![Capture terminal](demo.gif)
64
+
65
+ #### Aide
66
+
67
+ ```bash
68
+ seances --help
69
+ Usage: seances [OPTIONS] ID_CINEMA
70
+
71
+ Les séances de votre cinéma dans le terminal, avec ID_CINEMA : identifiant
72
+ du cinéma sur Allociné, ex: C0159 pour l’UGC Ciné Cité Les Halles. Se
73
+ trouve dans l’url :
74
+ http://allocine.fr/seance/salle_gen_csalle=<ID_CINEMA>.html
75
+
76
+ Options:
77
+ -j, --jour TEXT jour des séances souhaitées (au format DD/MM/YYYY ou +1
78
+ pour demain), par défaut : aujourd’hui
79
+ -s, --semaine affiche les séance pour les 7 prochains jours
80
+ -e, --entrelignes ajoute une ligne entre chaque film pour améliorer la
81
+ lisibilité
82
+ --help Show this message and exit.
83
+ ```
84
+
85
+ #### Utilisation simple
86
+
87
+ ```bash
88
+ seances P2235
89
+
90
+ 27/12/2018
91
+ ┌──────────────────────────────────────────────────────────┬──────┬───────┬───────┬───────┬───────┐
92
+ │ Astérix - Le Secret de la Potion Magique... (VF) - 01h25 │ 4.1* │ 10:15 │ │ │ │
93
+ │ L’Empereur de Paris (VF) - 01h50 │ 3.4* │ │ │ 17:15 │ │
94
+ │ Ma mère est folle (VF) - 01h35 │ 3.0* │ │ 14:15 │ │ │
95
+ │ Marche ou crève (VF) - 01h25 │ 3.6* │ │ │ │ 20:15 │
96
+ └──────────────────────────────────────────────────────────┴──────┴───────┴───────┴───────┴───────┘
97
+ ```
98
+
99
+ #### Pour demain, avec des interlignes
100
+
101
+ ```bash
102
+ seances P2235 -j+1 --entrelignes
103
+
104
+ 28/12/2018
105
+ ┌────────────────────────────────────────────────────┬──────┬───────┬───────┬───────┐
106
+ │ Casse-noisette et les quatre royaumes (VF) - 01h39 │ 3.1* │ │ │ 20:15 │
107
+ ├────────────────────────────────────────────────────┼──────┼───────┼───────┼───────┤
108
+ │ Ma mère est folle (VF) - 01h35 │ 3.0* │ │ 17:15 │ │
109
+ ├────────────────────────────────────────────────────┼──────┼───────┼───────┼───────┤
110
+ │ Marche ou crève (VF) - 01h25 │ 3.6* │ 14:15 │ │ │
111
+ └────────────────────────────────────────────────────┴──────┴───────┴───────┴───────┘
112
+ ```
113
+
114
+ #### Pour une date précise
115
+
116
+ ```bash
117
+ seances P2235 --jour 29/12/2018
118
+ ```
119
+
120
+ #### Pour toute la semaine
121
+
122
+ ```bash
123
+ seances P2235 --semaine
124
+ ```
125
+
126
+ ## Utilisation de la bibliothèque
127
+
128
+ ```python
129
+ from allocine import Allocine
130
+
131
+ with Allocine() as allocine:
132
+ showtimes = allocine.get_showtimes("P2235")
133
+
134
+ for showtime in showtimes:
135
+ print(showtime)
136
+ ```
137
+
138
+ Exemple de sortie :
139
+
140
+ ```bash
141
+ 27/12/2018 10:15 : Astérix - Le Secret de la Potion Magique [244560] (VF) (01h25)
142
+ 27/12/2018 14:15 : Ma mère est folle [260370] (VF) (01h35)
143
+ 27/12/2018 17:15 : L’Empereur de Paris [258914] (VF) (01h50)
144
+ 27/12/2018 20:15 : Marche ou crève [258052] (VF) (01h25)
145
+ 28/12/2018 14:15 : Marche ou crève [258052] (VF) (01h25)
146
+ 28/12/2018 17:15 : Ma mère est folle [260370] (VF) (01h35)
147
+ 28/12/2018 20:15 : Casse-noisette et les quatre royaumes [245656] (VF) (01h39)
148
+ 29/12/2018 14:15 : Astérix - Le Secret de la Potion Magique [244560] (VF) (01h25)
149
+ [...]
150
+ ```
151
+
152
+ Le cache est activé par défaut. Les réponses sont enregistrées dans le répertoire de cache utilisateur du système :
153
+
154
+ - macOS: `~/Library/Caches/allocine`
155
+ - Linux: `${XDG_CACHE_HOME:-~/.cache}/allocine`
156
+ - Windows: `%LOCALAPPDATA%\\allocine\\Cache`
157
+
158
+ Videz le cache en ligne de commande (aucun identifiant de cinéma n’est nécessaire) :
159
+
160
+ ```bash
161
+ seances --clear-cache
162
+ ```
163
+
164
+ ## Développement
165
+
166
+ Créez l’environnement virtuel et installez le paquet avec ses dépendances de développement :
167
+
168
+ ```bash
169
+ uv sync --extra dev
170
+ ```
171
+
172
+ Installez les hooks pre-commit une première fois, puis utilisez `make check` pour analyser, formater et vérifier les types
173
+ de l’ensemble du code :
174
+
175
+ ```bash
176
+ uv run pre-commit install
177
+ make check
178
+ ```
179
+
180
+ Exécutez chaque vérification sans modifier les fichiers :
181
+
182
+ ```bash
183
+ uv run ruff check .
184
+ uv run ruff format --check .
185
+ uv run ty check
186
+ ```
187
+
188
+ Exécutez manuellement tous les hooks pre-commit avec :
189
+
190
+ ```bash
191
+ uv run pre-commit run --all-files
192
+ ```
193
+
194
+ Les utilisateurs de VS Code doivent accepter les recommandations d’extensions de l’espace de travail afin d’activer les
195
+ diagnostics Ruff et ty en temps réel, ainsi que le formatage Ruff à l’enregistrement.
196
+
197
+ ## Publication
198
+
199
+ Le workflow de publication publie sur PyPI les tags de version tels que `0.0.13` grâce à Trusted Publishing, sans
200
+ stocker de jeton d’API. Avant la première publication :
201
+
202
+ 1. Créez un environnement GitHub nommé `pypi`. Il est recommandé d’exiger une approbation avant tout déploiement.
203
+ 2. Dans les paramètres de publication PyPI du projet `allocine`, ajoutez un Trusted Publisher GitHub avec le
204
+ propriétaire `tducret`, le dépôt `allocine-python`, le workflow `release.yml` et l’environnement `pypi`.
205
+
206
+ Le tag Git définit la version du paquet ; aucun fichier de version ne doit être mis à jour. Ajoutez le tag au commit à
207
+ publier. Le workflow rejette les distributions dont la version ne correspond pas au tag et effectue un test rapide du
208
+ wheel et de la distribution source avant leur publication :
209
+
210
+ ```bash
211
+ VERSION=0.0.13
212
+ git tag -a ${VERSION} -m ${VERSION}
213
+ git push origin ${VERSION}
214
+ ```