From 2f1dcb42de2528c0362c99b8c3b7f909b37e47d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Motheu?= <66940960+loicatNGT@users.noreply.github.com> Date: Wed, 9 Apr 2025 13:55:35 +0200 Subject: [PATCH 1/2] chore: upgrade poetry version 2.1 --- .python-version | 2 +- poetry.lock | 60 +++++++++++++++---------------- pyproject.toml | 24 ++++++------- src/python_template/__init__.py | 0 src/{ => python_template}/main.py | 0 5 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 src/python_template/__init__.py rename src/{ => python_template}/main.py (100%) diff --git a/.python-version b/.python-version index 04e2079..faedad4 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.12.8 +3.13.3 \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index cc7812f..3bb6fcf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.2 and should not be changed by hand. [[package]] name = "cfgv" @@ -39,31 +39,31 @@ files = [ [[package]] name = "filelock" -version = "3.16.1" +version = "3.18.0" description = "A platform independent file lock." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, - {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, + {file = "filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de"}, + {file = "filelock-3.18.0.tar.gz", hash = "sha256:adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2"}, ] [package.extras] -docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4.1)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] +docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] typing = ["typing-extensions (>=4.12.2) ; python_version < \"3.11\""] [[package]] name = "identify" -version = "2.6.3" +version = "2.6.9" description = "File identification library for Python" optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "identify-2.6.3-py2.py3-none-any.whl", hash = "sha256:9edba65473324c2ea9684b1f944fe3191db3345e50b6d04571d10ed164f8d7bd"}, - {file = "identify-2.6.3.tar.gz", hash = "sha256:62f5dae9b5fef52c84cc188514e9ea4f3f636b1d8799ab5ebc475471f9e47a02"}, + {file = "identify-2.6.9-py2.py3-none-any.whl", hash = "sha256:c98b4322da415a8e5a70ff6e51fbc2d2932c015532d77e9f8537b4ba7813b150"}, + {file = "identify-2.6.9.tar.gz", hash = "sha256:d40dfe3142a1421d8518e3d3985ef5ac42890683e32306ad614a29490abeb6bf"}, ] [package.extras] @@ -71,14 +71,14 @@ license = ["ukkonen"] [[package]] name = "iniconfig" -version = "2.0.0" +version = "2.1.0" description = "brain-dead simple config-ini parsing" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, + {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, + {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, ] [[package]] @@ -191,20 +191,20 @@ files = [ [[package]] name = "platformdirs" -version = "4.3.6" +version = "4.3.7" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, - {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, + {file = "platformdirs-4.3.7-py3-none-any.whl", hash = "sha256:a03875334331946f13c549dbd8f4bac7a13a50a895a0eb1e8c6a8ace80d40a94"}, + {file = "platformdirs-4.3.7.tar.gz", hash = "sha256:eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351"}, ] [package.extras] -docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] -type = ["mypy (>=1.11.2)"] +docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.4)", "pytest-cov (>=6)", "pytest-mock (>=3.14)"] +type = ["mypy (>=1.14.1)"] [[package]] name = "pluggy" @@ -355,26 +355,26 @@ files = [ [[package]] name = "typing-extensions" -version = "4.12.2" +version = "4.13.1" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, - {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, + {file = "typing_extensions-4.13.1-py3-none-any.whl", hash = "sha256:4b6cf02909eb5495cfbc3f6e8fd49217e6cc7944e145cdda8caa3734777f9e69"}, + {file = "typing_extensions-4.13.1.tar.gz", hash = "sha256:98795af00fb9640edec5b8e31fc647597b4691f099ad75f469a2616be1a76dff"}, ] [[package]] name = "virtualenv" -version = "20.28.0" +version = "20.30.0" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "virtualenv-20.28.0-py3-none-any.whl", hash = "sha256:23eae1b4516ecd610481eda647f3a7c09aea295055337331bb4e6892ecce47b0"}, - {file = "virtualenv-20.28.0.tar.gz", hash = "sha256:2c9c3262bb8e7b87ea801d715fae4495e6032450c71d2309be9550e7364049aa"}, + {file = "virtualenv-20.30.0-py3-none-any.whl", hash = "sha256:e34302959180fca3af42d1800df014b35019490b119eba981af27f2fa486e5d6"}, + {file = "virtualenv-20.30.0.tar.gz", hash = "sha256:800863162bcaa5450a6e4d721049730e7f2dae07720e0902b0e4040bd6f9ada8"}, ] [package.dependencies] @@ -384,7 +384,7 @@ platformdirs = ">=3.9.1,<5" [package.extras] docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2,!=7.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] -test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8) ; platform_python_implementation == \"PyPy\" or platform_python_implementation == \"CPython\" and sys_platform == \"win32\" and python_version >= \"3.13\"", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10) ; platform_python_implementation == \"CPython\""] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8) ; platform_python_implementation == \"PyPy\" or platform_python_implementation == \"GraalVM\" or platform_python_implementation == \"CPython\" and sys_platform == \"win32\" and python_version >= \"3.13\"", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10) ; platform_python_implementation == \"CPython\""] [[package]] name = "win32-setctime" @@ -404,5 +404,5 @@ dev = ["black (>=19.3b0) ; python_version >= \"3.6\"", "pytest (>=4.6.2)"] [metadata] lock-version = "2.1" -python-versions = "^3.12" -content-hash = "e6039898f63c865dc8777cda928c8e2efc4933fb1d2994ba8e4df2f7bc179c4e" +python-versions = ">=3.13,<4.0" +content-hash = "1ddcc90f1ad2f3457a540fe2e6265c4b8dc41aff6ca4a9571e59db4eb4753131" diff --git a/pyproject.toml b/pyproject.toml index 275c4f0..de255d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,14 @@ -[tool.poetry] +[project] name = "python-template" version = "0.7.0" description = "Used to templatize python projects." -authors = ["Loïc Motheu "] +authors = [{ name = "Loïc Motheu", email = "lmotheu@gmail.com" }] readme = "README.md" +requires-python = ">=3.13,<4.0" package-mode = false - -[tool.poetry.dependencies] -python = "^3.12" -loguru = "^0.7.3" +dependencies = [ + "loguru (>=0.7.3,<0.8.0)" +] [tool.poetry.group.dev.dependencies] mypy = "^1.15.0" @@ -16,27 +16,27 @@ pre-commit = "^4.2.0" pytest = "^8.3.5" ruff = "^0.11.4" -[tool.ruff] +[project.ruff] src = ["src"] line-length = 120 indent-width = 4 -[tool.ruff.format] +[project.ruff.format] quote-style = "double" indent-style = "space" skip-magic-trailing-comma = false line-ending = "auto" -[tool.ruff.lint] +[project.ruff.lint] select = ["ALL"] ignore = ["D203", "COM812", "ISC001", "D213", "FA102"] fixable = ["ALL"] unfixable = [] exclude = ["tests/*"] -[tool.mypy] +[project.mypy] exclude = "tests/*" [build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" \ No newline at end of file +requires = ["poetry-core>=2.0.0,<3.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/src/python_template/__init__.py b/src/python_template/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/main.py b/src/python_template/main.py similarity index 100% rename from src/main.py rename to src/python_template/main.py From 5f0bf873d2c3672f45348c3490db4c301aa82950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Motheu?= <66940960+loicatNGT@users.noreply.github.com> Date: Wed, 9 Apr 2025 13:57:32 +0200 Subject: [PATCH 2/2] ci: adapt to latest python version --- .github/actions/setup-env/action.yml | 2 +- .github/workflows/config.yml | 4 ++-- README.md | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-env/action.yml b/.github/actions/setup-env/action.yml index f04186c..160e348 100644 --- a/.github/actions/setup-env/action.yml +++ b/.github/actions/setup-env/action.yml @@ -5,7 +5,7 @@ inputs: python-version: description: "Python version to use" required: false - default: "3.12" + default: "3.13" cache-key-suffix: description: "Additional suffix for cache key" required: false diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index ad260c9..223bec2 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -5,7 +5,7 @@ on: outputs: python-version: description: "Python version to use" - value: "3.12" + value: "3.13" poetry-cache-path: description: "Poetry cache paths" value: | @@ -19,7 +19,7 @@ jobs: config: runs-on: ubuntu-latest outputs: - python-version: "3.12" + python-version: "3.13" poetry-cache-path: | ~/.cache/pypoetry ~/.poetry diff --git a/README.md b/README.md index 78754e3..b5ec841 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ The main CI workflow is defined in `.github/workflows/main.yml`. This project includes the following dependencies: - **Core Dependencies**: - - `python`: ^3.12 (switch the `.python-version` file to your liking) + - `python`: ^3.13 (switch the `.python-version` file to your liking) - `loguru`: ^0.7.3 (useful logging package) - **Development Dependencies**: @@ -104,7 +104,7 @@ pyenv install --list Download & install a specific Python version: ```bash -pyenv install 3.12.8 +pyenv install 3.13.3 ``` List the global Python version set by your system: @@ -122,13 +122,13 @@ pyenv local Set the global Python version for your system: ```bash -pyenv global 3.12.8 +pyenv global 3.13.3 ``` Set the local Python version for your project: ```bash -pyenv local 3.12.8 +pyenv local 3.13.3 ``` Feel free to utilize Pyenv and modify the `.python-version` file to your preference.