From 3f98f045cf1410e40491534d50ebe1ebf0a4b460 Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Sun, 18 Jun 2023 21:52:47 +0200 Subject: [PATCH 1/5] Improve ignores files --- .dockerignore | 1 + .gitignore | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.dockerignore b/.dockerignore index cf08cd0..c29dbbb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,6 +8,7 @@ **/.gitignore **/.project **/.pytest_cache +**/.ruff_cache **/.settings **/.toolstarget **/.venv diff --git a/.gitignore b/.gitignore index fd33233..060e790 100644 --- a/.gitignore +++ b/.gitignore @@ -119,6 +119,9 @@ venv.bak/ # Rope project settings .ropeproject +# Ruff +**/.ruff_cache + # mkdocs documentation /site From 6c9b0d77c02f5dd3f8eae7913730e20f1439dd0d Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Sun, 18 Jun 2023 21:52:55 +0200 Subject: [PATCH 2/5] Improve readme --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index b36e1e1..e4eea5f 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,31 @@ Outil en ligne de commande pour les tâches récurrentes du projet Geotribu. [![📦 Build & 🚀 Release](https://github.com/geotribu/cli/actions/workflows/build_release.yml/badge.svg)](https://github.com/geotribu/cli/actions/workflows/build_release.yml) [![📚 Documentation](https://github.com/geotribu/cli/actions/workflows/documentation.yml/badge.svg)](https://github.com/geotribu/cli/actions/workflows/documentation.yml) [![codecov](https://codecov.io/gh/geotribu/cli/branch/main/graph/badge.svg?token=YRLQ6OPFRL)](https://codecov.io/gh/geotribu/cli) + +[![PyPi version badge](https://badgen.net/pypi/v/geotribu)](https://pypi.org/project/geotribu/) +[![PyPI - Downloads](https://img.shields.io/pypi/dm/geotribu)](https://pypi.org/project/geotribu/) +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/geotribu)](https://pypi.org/project/geotribu/) + +## Installer + +Via _pip_ : + +```sh +pip install geotribu +``` + +Via Docker : + +```sh +docker pull ghcr.io/geotribu/cli +``` + +Via un exécutable pré-compilé : [télécharger pour son système d'exploitation](./releases/latest). + +## Utiliser + +```sh +geotribu --help +``` + +Pour plus d'informations, [consulter la documentation](https://cli.geotribu.fr/). From 215dfa452e898d9d5447364d8f39a9b1bfd37082 Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Sun, 18 Jun 2023 22:05:13 +0200 Subject: [PATCH 3/5] Shorten binaries names --- builder/pyinstaller_build_macos.py | 4 +--- builder/pyinstaller_build_ubuntu.py | 9 +++------ builder/pyinstaller_build_windows.py | 10 ++-------- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/builder/pyinstaller_build_macos.py b/builder/pyinstaller_build_macos.py index cff2c7c..1d2f85f 100644 --- a/builder/pyinstaller_build_macos.py +++ b/builder/pyinstaller_build_macos.py @@ -32,12 +32,10 @@ PyInstaller.__main__.run( [ "--log-level={}".format(getenv("PYINSTALLER_LOG_LEVEL", "WARN")), - "--name={}_{}_MacOS{}_Python{}-{}".format( + "--name={}_{}_MacOS{}".format( __about__.__title_clean__, __about__.__version__.replace(".", "-"), mac_os_version, - platform.python_version_tuple()[0], - platform.python_version_tuple()[1], ), "--noconfirm", "--noupx", diff --git a/builder/pyinstaller_build_ubuntu.py b/builder/pyinstaller_build_ubuntu.py index ab7e55c..ac7009a 100644 --- a/builder/pyinstaller_build_ubuntu.py +++ b/builder/pyinstaller_build_ubuntu.py @@ -9,7 +9,6 @@ # ################################## # Standard library -import platform import sys from os import getenv from pathlib import Path @@ -30,14 +29,12 @@ PyInstaller.__main__.run( [ "--log-level={}".format(getenv("PYINSTALLER_LOG_LEVEL", "WARN")), - "--name={}_{}_{}{}_{}_Python{}".format( + "--name={}_{}_{}{}.bin".format( __about__.__title_clean__, - __about__.__version__, + __about__.__version__.replace(".", "-"), distro.name(), distro.version(), - platform.architecture()[0], - platform.python_version(), - ).replace(".", "-"), + ), "--noconfirm", "--noupx", "--onefile", diff --git a/builder/pyinstaller_build_windows.py b/builder/pyinstaller_build_windows.py index cf82871..1ed410f 100644 --- a/builder/pyinstaller_build_windows.py +++ b/builder/pyinstaller_build_windows.py @@ -36,14 +36,8 @@ ), "--log-level={}".format(getenv("PYINSTALLER_LOG_LEVEL", "WARN")), "--manifest={}".format((package_folder / "../builder/manifest.xml").resolve()), - "--name={}_{}_{}{}_Python{}-{}".format( - __about__.__title_clean__, - __about__.__version__.replace(".", "-"), - platform.system(), - platform.architecture()[0], - platform.python_version_tuple()[0], - platform.python_version_tuple()[1], - ), + f"--name={__about__.__title_clean__}_{__about__.__version__.replace('.', '-')}_" + f"{platform.system()}{platform.architecture()[0]}", "--noconfirm", "--noupx", "--onefile", From dc1127284f70f9d03512cf9377f671843d2c0231 Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Sun, 18 Jun 2023 22:13:33 +0200 Subject: [PATCH 4/5] Test packaging on PR when builder/ is modified --- .github/workflows/build_release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 501240f..a9c6be8 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -7,7 +7,7 @@ on: paths: - ".github/workflows/build_release.yml" - - "builder/**/*" + - "builder/" - "geotribu_cli/**/*.py" - "requirements/base.txt" @@ -18,6 +18,8 @@ on: branches: [main] paths: - ".github/workflows/build_release.yml" + - "builder/" + - "requirements/packaging.txt" # Globals env: From c0ddba4f7dbf50c7f02172d917727bc20662c208 Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 18 Jun 2023 22:52:58 +0200 Subject: [PATCH 5/5] Fix hyperlink --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4eea5f..98c8b90 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Via Docker : docker pull ghcr.io/geotribu/cli ``` -Via un exécutable pré-compilé : [télécharger pour son système d'exploitation](./releases/latest). +Via un exécutable pré-compilé : [télécharger pour son système d'exploitation](https://github.com/geotribu/cli/releases/latest). ## Utiliser