pymox-kit 1.0.3__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.
@@ -0,0 +1,2 @@
1
+ GH_TOKEN=ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXX
2
+ PYPI_TOKEN=pypi-XXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -0,0 +1,57 @@
1
+ name: Semantic Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ # tags:
8
+ # - 'v*' # Pour ne publier PyPI que les tag numérotés faits à la main
9
+
10
+ jobs:
11
+ build-and-publish:
12
+ name: Run semantic-release
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v3
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - name: Set up Python
22
+ uses: actions/setup-python@v4
23
+ with:
24
+ python-version: "3.10"
25
+
26
+ - name: Install dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ pip install python-semantic-release build twine setuptools_scm
30
+
31
+ - name: Run semantic-release
32
+ env:
33
+ GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE }}
34
+ PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
35
+ run: |
36
+ semantic-release version
37
+ semantic-release publish
38
+
39
+ - name: Re-checkout after tagging
40
+ run: |
41
+ git fetch --tags
42
+ git checkout $(git describe --tags --abbrev=0)
43
+
44
+ - name: Clean dist folder
45
+ run: rm -rf dist/
46
+
47
+ - name: Build the package
48
+ # env:
49
+ # SETUPTOOLS_SCM_PRETEND_VERSION: ${{ steps.get_tag.outputs.tag }}
50
+ run: python -m build
51
+
52
+ - name: Publish to PyPI
53
+ # if: success() # ou if: steps.semantic-release.outcome == 'success'
54
+ env:
55
+ TWINE_USERNAME: __token__
56
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
57
+ run: twine upload dist/*
@@ -0,0 +1,32 @@
1
+ .env
2
+ # Byte-compiled / optimized / DLL files
3
+ **/__pycache__
4
+ **/.pytest_cache
5
+
6
+ # Jupyter Notebook
7
+ .ipynb_checkpoints
8
+
9
+ # virtual envs
10
+ **/.venv/
11
+
12
+ # GitHub
13
+ # **/.github/
14
+
15
+ # VSCode
16
+ **/.vscode/
17
+
18
+ # Coverage
19
+ **/.coverage
20
+
21
+ # truc bizarre
22
+ **/.DS_Store
23
+
24
+ # site construit
25
+ site/
26
+ _build/
27
+ dist/
28
+ src/*.egg-info/
29
+
30
+ pws.txt
31
+ src/gc7/_version.py
32
+ CHANGE.LOG
@@ -0,0 +1,86 @@
1
+ ---
2
+ description: Repository Information Overview
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # GC7 Information
7
+
8
+ ## Summary
9
+ GC7 is a Python utility toolkit for PyMoX developers (PY-thon - MO-jo - Flet-X). The project is set up as a Python package that can be published to PyPI using semantic versioning. It uses GitHub Actions for automated releases and follows conventional commits for version management.
10
+
11
+ ## Structure
12
+ - **src/gc7/**: Main package source code
13
+ - **.github/workflows/**: CI/CD pipeline configurations
14
+ - **.venv/**: Python virtual environment
15
+ - **.zencoder/**: Configuration for Zencoder
16
+
17
+ ## Language & Runtime
18
+ **Language**: Python
19
+ **Version**: Python 3.10+
20
+ **Build System**: setuptools
21
+ **Package Manager**: pip
22
+
23
+ ## Dependencies
24
+ **Main Dependencies**:
25
+ - setuptools_scm: For version management
26
+ - python-dotenv: For environment variable loading
27
+
28
+ **Development Dependencies**:
29
+ - python-semantic-release: For automated versioning and releases
30
+ - build: For building Python packages
31
+ - twine: For publishing to PyPI
32
+
33
+ ## Build & Installation
34
+ ```bash
35
+ python -m venv .venv
36
+ .\.venv\Scripts\activate
37
+ pip install -r requirements.txt
38
+
39
+ # Build package
40
+ python -m build
41
+
42
+ # Check distribution
43
+ twine check dist/* --verbose
44
+
45
+ # Upload to PyPI
46
+ twine upload dist/* --verbose
47
+ ```
48
+
49
+ ## Version Management
50
+ **Tool**: python-semantic-release
51
+ **Configuration**: pyproject.toml
52
+ **Version Source**: Git tags
53
+ **Commands**:
54
+ ```bash
55
+ # Check if a new version would be generated
56
+ semantic-release --noop version
57
+
58
+ # Create a new version locally
59
+ semantic-release version --commit --tag --no-push
60
+
61
+ # Publish a new version
62
+ semantic-release publish
63
+ ```
64
+
65
+ ## CI/CD
66
+ **Platform**: GitHub Actions
67
+ **Workflow**: .github/workflows/publish.yml
68
+ **Trigger**: Push to main branch
69
+ **Process**:
70
+ 1. Checkout code
71
+ 2. Set up Python 3.10
72
+ 3. Install dependencies
73
+ 4. Run semantic-release to version and publish
74
+
75
+ ## Environment Variables
76
+ **Required**:
77
+ - GH_TOKEN: GitHub token for releases
78
+ - PYPI_TOKEN: PyPI token for package publishing
79
+
80
+ ## Project Configuration
81
+ **Package Structure**:
82
+ - Dynamic versioning using setuptools_scm
83
+ - Source code in src/gc7/
84
+ - Requires Python 3.10+
85
+ - Uses conventional commits for version management
86
+ - Current version: v1.1.9 (as of 2025-08-02)
@@ -0,0 +1,37 @@
1
+ # CHANGELOG
2
+
3
+ <!-- version list -->
4
+
5
+ ## v1.0.0 (2025-08-03)
6
+
7
+ - Initial Release
8
+
9
+ ## v1.0.0 (2025-08-03)
10
+
11
+ - Initial Release
12
+
13
+ ## v1.0.4 (2025-08-03)
14
+
15
+ ### Bug Fixes
16
+
17
+ - Set local dev for tokens()
18
+ ([`3183e15`](https://github.com/PyMoX-fr/GC7/commit/3183e15b25687c51da31870827091a5e81f756ff))
19
+
20
+
21
+ ## v1.0.3 (2025-08-03)
22
+
23
+
24
+ ## v1.0.2 (2025-08-03)
25
+
26
+
27
+ ## v1.0.1 (2025-08-03)
28
+
29
+ ### Bug Fixes
30
+
31
+ - Set hello()
32
+ ([`03efc80`](https://github.com/PyMoX-fr/GC7/commit/03efc8032804e20feadba5fd246e07c1bc133b4b))
33
+
34
+
35
+ ## v1.0.0 (2025-08-03)
36
+
37
+ - Initial Release
@@ -0,0 +1,96 @@
1
+ Metadata-Version: 2.4
2
+ Name: pymox_kit
3
+ Version: 1.0.3
4
+ Summary: Un module avec plein d'outils utiles pour devs en PyMoX (PY-thon - MO-jo - Flet-X)
5
+ Author-email: GrCOTE7 <GrCOTE7@gmail.com>
6
+ License-Expression: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: python-dotenv
12
+ Requires-Dist: setuptools_scm
13
+
14
+ # PyMoX - Kit
15
+
16
+ Trousse à outils utiles pour devs en PyMoX (PY-thon - MO-jo - Flet-X)
17
+
18
+ ---
19
+
20
+ ## Rapide mémo
21
+
22
+ ```bash
23
+ py -m venv .venv
24
+ .\.venv\Scripts\activate
25
+ pip install -r requirements.txt
26
+
27
+ py -m build
28
+ twine check dist/*
29
+ twine upload dist/* --verbose
30
+
31
+ git log --oneline
32
+
33
+ semantic-release version
34
+ semantic-release version --print
35
+
36
+ semantic-release publish
37
+
38
+ semantic-release --noop version
39
+ Cela te dira si une version serait générée.
40
+
41
+ semantic-release version --commit --tag --no-push
42
+
43
+ Cela va :
44
+ Lire les commits
45
+ Calculer la prochaine version (ex: 0.2.0)
46
+ Modifier __version__ dans gc7/__init__.py
47
+ Créer un commit et un tag localement
48
+
49
+ Remove-Item -Recurse -Force dist, src/gc7/gc7.egg-info
50
+
51
+ git commit --allow-empty -m "feat: add dummy feature for version bump"
52
+ git commit --allow-empty -m "fix: déclenchement de la release 1.0.1"
53
+ git push origin main
54
+
55
+ voir conventional commits: https://www.conventionalcommits.org/en/v1.0.0/
56
+
57
+ En cas de volonté de revenir sur une version précédente (Problème avec PyPI: Interdit de reculer):
58
+ git revert <hash du commit> (pour ramener la main du dépôt GH)
59
+ dans le __ini__.py, mettre : __version__='x.y.z' (> au dernier de PyPI)
60
+ refaire le build + renvoi:
61
+ py -m build
62
+ twine upload dist/*
63
+
64
+ Désinstaller tous les packages de l'env global :
65
+ pip freeze | ForEach-Object { pip uninstall -y $_ }
66
+
67
+ # 1. Crée une branche temporaire pour garder les fichiers
68
+ git checkout --orphan temp_branch
69
+
70
+ # 2. Ajoute tous les fichiers à cette nouvelle branche
71
+ git add .
72
+
73
+ # 3. Fais un commit initial
74
+ git commit -m "Initial commit"
75
+
76
+ # 4. Supprime l'ancienne branche main
77
+ git branch -D main
78
+
79
+ # 5. Renomme la branche temporaire en main
80
+ git branch -m main
81
+
82
+ # 6. Force le push vers GitHub (⚠️ cela écrase l’historique distant)
83
+ git push -f origin main
84
+
85
+ git log main --decorate --oneline
86
+
87
+ ---
88
+
89
+ from pymox_tools1 import greetings as gt
90
+ from pymox_tools1 import tokens as tk
91
+
92
+ if __name__ == "__main__":
93
+ tk.tokens()
94
+ print(gt.hello(), "\n" + gt.bye())
95
+
96
+ ```
@@ -0,0 +1,83 @@
1
+ # PyMoX - Kit
2
+
3
+ Trousse à outils utiles pour devs en PyMoX (PY-thon - MO-jo - Flet-X)
4
+
5
+ ---
6
+
7
+ ## Rapide mémo
8
+
9
+ ```bash
10
+ py -m venv .venv
11
+ .\.venv\Scripts\activate
12
+ pip install -r requirements.txt
13
+
14
+ py -m build
15
+ twine check dist/*
16
+ twine upload dist/* --verbose
17
+
18
+ git log --oneline
19
+
20
+ semantic-release version
21
+ semantic-release version --print
22
+
23
+ semantic-release publish
24
+
25
+ semantic-release --noop version
26
+ Cela te dira si une version serait générée.
27
+
28
+ semantic-release version --commit --tag --no-push
29
+
30
+ Cela va :
31
+ Lire les commits
32
+ Calculer la prochaine version (ex: 0.2.0)
33
+ Modifier __version__ dans gc7/__init__.py
34
+ Créer un commit et un tag localement
35
+
36
+ Remove-Item -Recurse -Force dist, src/gc7/gc7.egg-info
37
+
38
+ git commit --allow-empty -m "feat: add dummy feature for version bump"
39
+ git commit --allow-empty -m "fix: déclenchement de la release 1.0.1"
40
+ git push origin main
41
+
42
+ voir conventional commits: https://www.conventionalcommits.org/en/v1.0.0/
43
+
44
+ En cas de volonté de revenir sur une version précédente (Problème avec PyPI: Interdit de reculer):
45
+ git revert <hash du commit> (pour ramener la main du dépôt GH)
46
+ dans le __ini__.py, mettre : __version__='x.y.z' (> au dernier de PyPI)
47
+ refaire le build + renvoi:
48
+ py -m build
49
+ twine upload dist/*
50
+
51
+ Désinstaller tous les packages de l'env global :
52
+ pip freeze | ForEach-Object { pip uninstall -y $_ }
53
+
54
+ # 1. Crée une branche temporaire pour garder les fichiers
55
+ git checkout --orphan temp_branch
56
+
57
+ # 2. Ajoute tous les fichiers à cette nouvelle branche
58
+ git add .
59
+
60
+ # 3. Fais un commit initial
61
+ git commit -m "Initial commit"
62
+
63
+ # 4. Supprime l'ancienne branche main
64
+ git branch -D main
65
+
66
+ # 5. Renomme la branche temporaire en main
67
+ git branch -m main
68
+
69
+ # 6. Force le push vers GitHub (⚠️ cela écrase l’historique distant)
70
+ git push -f origin main
71
+
72
+ git log main --decorate --oneline
73
+
74
+ ---
75
+
76
+ from pymox_tools1 import greetings as gt
77
+ from pymox_tools1 import tokens as tk
78
+
79
+ if __name__ == "__main__":
80
+ tk.tokens()
81
+ print(gt.hello(), "\n" + gt.bye())
82
+
83
+ ```
@@ -0,0 +1,71 @@
1
+ [project]
2
+ name = "pymox_kit"
3
+ dynamic = ["version"]
4
+ # version = "v0.1.2" # sera géré automatiquement par semantic-release
5
+ # version = "0.0.6" # valeur placeholder, ignorée par semantic-release
6
+ description = "Un module avec plein d'outils utiles pour devs en PyMoX (PY-thon - MO-jo - Flet-X)"
7
+ authors = [{ name = "GrCOTE7", email = "GrCOTE7@gmail.com" }]
8
+ # readme = {file = "README.md", encoding = "utf-8"}
9
+ readme = "README.md"
10
+ # readme = {file = "README.md", content-type = "text/markdown", encoding = "utf-8"}
11
+ license = "MIT"
12
+ classifiers = [
13
+ "Programming Language :: Python :: 3",
14
+ "Operating System :: OS Independent",
15
+ ]
16
+ dependencies = [
17
+ # Ajoute ici tes dépendances, ex:
18
+ # "requests >=2.0.0"
19
+ "python-dotenv",
20
+ "setuptools_scm"
21
+ ]
22
+ requires-python = ">=3.10"
23
+
24
+ [build-system]
25
+ requires = ["setuptools>=77.0.0", "setuptools_scm", "wheel"]
26
+ # requires = ["setuptools>=61.0", "setuptools_scm>=7.0"]
27
+ build-backend = "setuptools.build_meta"
28
+
29
+ [tool.semantic_release]
30
+ tag_format = "v{version}"
31
+ version_variable = "src/pymox_kit/__init__.py:__version__"
32
+ repository = "https://github.com/PyMoX-fr/Kit"
33
+ hvcs = "github"
34
+ github_token = "env:GH_TOKEN"
35
+
36
+ pypi_token = "env:PYPI_TOKEN"
37
+ version_source = "tag"
38
+ build_command = "python -m build"
39
+ log_level = "DEBUG"
40
+
41
+
42
+ upload_sdist = true # publie également le source distribution sur PyPI
43
+ upload_wheel = true # publie également le wheel sur PyPI
44
+ verify_release_commit = true
45
+
46
+ # commit_version_number = true
47
+ # commit_message = "chore(release): version {version}"
48
+
49
+ branch = "main" # branch de travail
50
+ # commit_parser = "conventional" # essayer emoji
51
+ # commit_parser = "semantic_release.commit_parser.emoji:parse_commit_message:"
52
+
53
+
54
+ upload_to_repository = true # active la publication sur PyPI
55
+ upload_to_pypi = true # active la publication sur PyPI
56
+
57
+ # [tool.semantic_release.changelog.default_templates]
58
+ # changelog_file = "CHANGELOG.md"
59
+
60
+ [tool.setuptools]
61
+ package-dir = { "" = "src" }
62
+ packages = ["pymox_kit"] # dossier Python
63
+
64
+ [tool.setuptools.package-data]
65
+ "*" = ["*.txt", "*.json"] # si tu as des fichiers à inclure
66
+
67
+ [tool.setuptools_scm]
68
+ version_scheme = "release-branch-semver" # empêche les suffixes .devX ou .dirty
69
+ # local_scheme = "no-local-version"
70
+ tag_regex = "^v?(?P<version>[0-9]+(\\.[0-9]+)+)$"
71
+ # write_to = "src/pymox_kit/_version.py"
Binary file
@@ -0,0 +1,20 @@
1
+ mkdir test-semantic
2
+ cd test-semantic
3
+ python -m venv .venv
4
+ .venv\Scripts\activate # ou source .venv/bin/activate sur Unix
5
+ pip install python-semantic-release build
6
+
7
+ mkdir testpkg
8
+ echo '__version__ = "0.1.0"' > testpkg/__init__.py
9
+
10
+ echo '''
11
+ [tool.semantic_release]
12
+ version_variable = "testpkg/__init__.py:__version__"
13
+ build_command = "python -m build"
14
+ upload_to_pypi = false
15
+ log_level = "DEBUG"
16
+ ''' > pyproject.toml
17
+
18
+ git init
19
+ git add .
20
+ git commit -m "feat: initial commit"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
@@ -0,0 +1,22 @@
1
+ ### 📦 Version SemVer : MAJOR.MINOR.PATCH
2
+
3
+ | Type de changement | Préfixe anglais | Traduction française | Incrément |
4
+ |-----------------------------|---------------------------|----------------------------------------------------|---------------------------------|
5
+ | 🧨 Rupture de compatibilité | `BREAKING CHANGE:` ou `!` | Changement majeur (rupture API, suppression, etc.) | **MAJOR** (ex: `1.2.3 → 2.0.0`) |
6
+ | ✨ Nouvelle fonctionnalité | `feat:` | Fonctionnalité (ajout sans rupture) | **MINOR** (ex: `1.2.3 → 1.3.0`) |
7
+ | 🐛 Correction de bug | `fix:` | Correction (bug, typo, etc.) | **PATCH** (ex: `1.2.3 → 1.2.4`) |
8
+
9
+
10
+ ### 🧠 Autres types de commits (ne changent pas la version)
11
+
12
+ | Préfixe anglais | Traduction française | Impact sur version |
13
+ |-----------------|--------------------------------|-------------------------------------------------------------|
14
+ | `docs:` | Documentation | Aucun |
15
+ | `style:` | Formatage (indentation, etc.) | Aucun |
16
+ | `refactor:` | Refactorisation | Aucun |
17
+ | `perf:` | Optimisation de performance | Aucun |
18
+ | `test:` | Ajout ou modification de tests | Aucun |
19
+ | `chore:` | Tâches diverses | Aucun |
20
+ | `ci:` | Intégration continue | Aucun |
21
+ | `build:` | Configuration de build | Aucun |
22
+ | `revert:` | Annulation d’un commit | Aucun (sauf si le commit annulé était un `feat:` ou `fix:`) |
@@ -0,0 +1,28 @@
1
+ import os
2
+ from dotenv import dotenv_values, load_dotenv
3
+
4
+ # Charge les variables du fichier .env
5
+ env_file_values = dotenv_values(".env") # dict sans override
6
+ load_dotenv(override=False) # ne modifie pas l'environnement
7
+
8
+ # Variables d'environnement actuelles
9
+ env_runtime_values = {
10
+ "GH_TOKEN": os.getenv("GH_TOKEN"),
11
+ "PYPI_TOKEN": os.getenv("PYPI_TOKEN"),
12
+ }
13
+
14
+ # Comparaison
15
+ print("\n🔍 Comparaison des clés GH_TOKEN et PYPI_TOKEN\n")
16
+
17
+ for key in ["GH_TOKEN", "PYPI_TOKEN"]:
18
+ file_val = env_file_values.get(key)
19
+ env_val = env_runtime_values.get(key)
20
+
21
+ if file_val == env_val:
22
+ print(f"✅ {key} est identique dans .env et l'environnement")
23
+ else:
24
+ print(f"❌ {key} est différent !")
25
+ print(f" .env : {file_val}")
26
+ print(f" environnement : {env_val}")
27
+
28
+ print("\n" + "-" * 60)
@@ -0,0 +1,6 @@
1
+ # convert_readme.py
2
+ with open("README.md", "r", encoding="cp1252", errors="replace") as f:
3
+ content = f.read()
4
+
5
+ with open("README2.md", "w", encoding="utf-8") as f:
6
+ f.write(content)
@@ -0,0 +1,10 @@
1
+ def hello():
2
+ return f"Salut les gens 123 !"
3
+
4
+
5
+ def bye():
6
+ return f"Bye-bye les gens !"
7
+
8
+
9
+ if __name__ == "__main__":
10
+ print(hello(), "\n" + bye())
@@ -0,0 +1,25 @@
1
+ def tokens():
2
+ from setuptools_scm import get_version
3
+
4
+ print("\nDernière version pymox_kit: " + get_version() + "\n" + ("-" * 71))
5
+ from dotenv import load_dotenv
6
+ import os
7
+
8
+ load_dotenv() # Charge les variables depuis .env
9
+ # load_dotenv(override=True)
10
+
11
+ gh_token = os.getenv("GH_TOKEN")
12
+ pypi_token = os.getenv("PYPI_TOKEN")
13
+
14
+ print(f"GH_TOKEN: {gh_token}\n\nPYPI_TOKEN: {pypi_token}\n")
15
+
16
+ return f"Salut les gens 1 !"
17
+
18
+
19
+ if __name__ == "__main__":
20
+
21
+ tokens()
22
+
23
+ # import greetings as gt # en direct
24
+ # from pymox_kit import greetings as gt
25
+ # print(gt.hello(), "\n" + gt.bye())
@@ -0,0 +1,96 @@
1
+ Metadata-Version: 2.4
2
+ Name: pymox_kit
3
+ Version: 1.0.3
4
+ Summary: Un module avec plein d'outils utiles pour devs en PyMoX (PY-thon - MO-jo - Flet-X)
5
+ Author-email: GrCOTE7 <GrCOTE7@gmail.com>
6
+ License-Expression: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: python-dotenv
12
+ Requires-Dist: setuptools_scm
13
+
14
+ # PyMoX - Kit
15
+
16
+ Trousse à outils utiles pour devs en PyMoX (PY-thon - MO-jo - Flet-X)
17
+
18
+ ---
19
+
20
+ ## Rapide mémo
21
+
22
+ ```bash
23
+ py -m venv .venv
24
+ .\.venv\Scripts\activate
25
+ pip install -r requirements.txt
26
+
27
+ py -m build
28
+ twine check dist/*
29
+ twine upload dist/* --verbose
30
+
31
+ git log --oneline
32
+
33
+ semantic-release version
34
+ semantic-release version --print
35
+
36
+ semantic-release publish
37
+
38
+ semantic-release --noop version
39
+ Cela te dira si une version serait générée.
40
+
41
+ semantic-release version --commit --tag --no-push
42
+
43
+ Cela va :
44
+ Lire les commits
45
+ Calculer la prochaine version (ex: 0.2.0)
46
+ Modifier __version__ dans gc7/__init__.py
47
+ Créer un commit et un tag localement
48
+
49
+ Remove-Item -Recurse -Force dist, src/gc7/gc7.egg-info
50
+
51
+ git commit --allow-empty -m "feat: add dummy feature for version bump"
52
+ git commit --allow-empty -m "fix: déclenchement de la release 1.0.1"
53
+ git push origin main
54
+
55
+ voir conventional commits: https://www.conventionalcommits.org/en/v1.0.0/
56
+
57
+ En cas de volonté de revenir sur une version précédente (Problème avec PyPI: Interdit de reculer):
58
+ git revert <hash du commit> (pour ramener la main du dépôt GH)
59
+ dans le __ini__.py, mettre : __version__='x.y.z' (> au dernier de PyPI)
60
+ refaire le build + renvoi:
61
+ py -m build
62
+ twine upload dist/*
63
+
64
+ Désinstaller tous les packages de l'env global :
65
+ pip freeze | ForEach-Object { pip uninstall -y $_ }
66
+
67
+ # 1. Crée une branche temporaire pour garder les fichiers
68
+ git checkout --orphan temp_branch
69
+
70
+ # 2. Ajoute tous les fichiers à cette nouvelle branche
71
+ git add .
72
+
73
+ # 3. Fais un commit initial
74
+ git commit -m "Initial commit"
75
+
76
+ # 4. Supprime l'ancienne branche main
77
+ git branch -D main
78
+
79
+ # 5. Renomme la branche temporaire en main
80
+ git branch -m main
81
+
82
+ # 6. Force le push vers GitHub (⚠️ cela écrase l’historique distant)
83
+ git push -f origin main
84
+
85
+ git log main --decorate --oneline
86
+
87
+ ---
88
+
89
+ from pymox_tools1 import greetings as gt
90
+ from pymox_tools1 import tokens as tk
91
+
92
+ if __name__ == "__main__":
93
+ tk.tokens()
94
+ print(gt.hello(), "\n" + gt.bye())
95
+
96
+ ```
@@ -0,0 +1,21 @@
1
+ .env_example
2
+ .gitignore
3
+ CHANGELOG.md
4
+ README.md
5
+ pyproject.toml
6
+ requirements.txt
7
+ set_semantic.sh
8
+ teste_write_version.py
9
+ .github/workflows/publish.yml
10
+ .zencoder/rules/repo.md
11
+ src/pymox_kit/__init__.py
12
+ src/pymox_kit/commits_semantic.md
13
+ src/pymox_kit/compare_keys.py
14
+ src/pymox_kit/convert_readme.py
15
+ src/pymox_kit/greetings.py
16
+ src/pymox_kit/tokens.py
17
+ src/pymox_kit.egg-info/PKG-INFO
18
+ src/pymox_kit.egg-info/SOURCES.txt
19
+ src/pymox_kit.egg-info/dependency_links.txt
20
+ src/pymox_kit.egg-info/requires.txt
21
+ src/pymox_kit.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ python-dotenv
2
+ setuptools_scm
@@ -0,0 +1 @@
1
+ pymox_kit
@@ -0,0 +1,10 @@
1
+ import re
2
+
3
+ with open("gc7/__init__.py", "r+") as f:
4
+ content = f.read()
5
+ content = re.sub(
6
+ r'__version__\s*=\s*["\'].*?["\']', '__version__ = "1.1.0"', content
7
+ )
8
+ f.seek(0)
9
+ f.write(content)
10
+ f.truncate()