From cb6722dcf552a9e7f0f7cbd2f473117dd00e20b3 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Sat, 11 Jan 2025 13:12:40 +0100 Subject: [PATCH 1/2] Bump pre-commit hooks, pytest-cov Except pylint Apply hooks fixes --- .pre-commit-config.yaml | 6 +++--- CHANGELOG.md | 2 +- CONTRIBUTING.md | 2 +- pyproject.toml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ac0aec..32a68b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: isort args: ["--profile", "black"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.13.0 + rev: v1.14.1 hooks: - id: mypy args: @@ -31,7 +31,7 @@ repos: hooks: - id: pylint - repo: https://github.com/asottile/pyupgrade - rev: v3.19.0 + rev: v3.19.1 hooks: - id: pyupgrade args: [--py39-plus] @@ -53,6 +53,6 @@ repos: - "--project" - "clients/python/duniterpy" - repo: https://github.com/executablebooks/mdformat - rev: 0.7.18 + rev: 0.7.21 hooks: - id: mdformat diff --git a/CHANGELOG.md b/CHANGELOG.md index 46d10b6..4917fd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -334,7 +334,7 @@ ______________________________________________________________________ ### CI/CD -- #66, !93 Migrate to [Poetry](https://python-poetry.org/) (build and development environment) +- #66, !93 Migrate to [Poetry](https://python-poetry.org/) (build and development environment) ______________________________________________________________________ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aae54bc..cbf8ed1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -76,7 +76,7 @@ Check out #169 for more details. We are using [`pytest` framework](https://docs.pytest.org/). -- Run all tests with: +- Run all tests with: ```bash duniterpy> poetry run pytest diff --git a/pyproject.toml b/pyproject.toml index d4a4d1d..308bac9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ mnemonic = "^0.20" [tool.poetry.group.test.dependencies] pytest = "^8.3.3" -pytest-cov = "^5.0.0" +pytest-cov = "^6.0.0" pytest-sugar = "^1.0.0" pytest-clarity = "^1.0.1" -- GitLab From 99e53d76119b3fb91c225e51cd25b585a6a40343 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Thu, 16 Jan 2025 10:30:54 +0100 Subject: [PATCH 2/2] Upgrade pyproject.toml to Poetry v2 format (#215) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Migrate from [tool.poetry] to [project] https://python-poetry.org/blog/announcing-poetry-2.0.0 https://python-poetry.org/docs/faq/#migrate-pep621-new-static Use dynamic Poetry classifiers and dependencies, more convenient but less generic to pyproject.toml project Use full names Remove s_b from the authors, I couldn’t find a commit from him with shortlog His activity: https://forum.duniter.org/t//528 --- pyproject.toml | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 308bac9..955bc13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,31 +1,38 @@ -[tool] -[tool.poetry] +[project] name = "duniterpy" version = "1.2.0" description = "Python library for developers of Duniter clients" -authors = ["inso <insomniak.fr@gmail.com>", "canercandan", "s_b"] -maintainers = ["vit <vit@free.fr>", "Moul <moul@moul.re>"] +license = { text = "GPL-3.0-or-later" } readme = "README.md" -license = "GPL-3.0-or-later" +requires-python = ">=3.9,<4.0" +authors = [ + { name = "inso", email = "insomniak.fr@gmail.com"}, + { name = "canercandan"}, +] +maintainers = [ + { name = "vit, Vincent Texier", email = "vit@free.fr"}, + { name = "Moul, Maël Azimi", email = "moul@moul.re"} +] +keywords = ["g1", "duniter", "cryptocurrency", "librecurrency", "library"] +dynamic = ["classifiers", "dependencies"] + +[tool.urls] repository = "https://git.duniter.org/clients/python/duniterpy" documentation = "https://clients.pages.duniter.org/python/duniterpy/index.html" -urls = { Changelog = "https://git.duniter.org/clients/python/duniterpy/-/blob/main/CHANGELOG.md" } -keywords = ["g1", "duniter", "cryptocurrency", "librecurrency", "library"] -include = ["examples/*.py"] +"changelog" = "https://git.duniter.org/clients/python/duniterpy/-/blob/main/CHANGELOG.md" + +[tool.poetry] +requires-poetry = ">=2.0" +include = [{path="examples/*.py", format=["sdist", "wheel"]}] classifiers = [ "Development Status :: 5 - Production/Stable", "Natural Language :: English", "Operating System :: OS Independent", - "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", "Intended Audience :: Developers", ] -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" - [tool.poetry.dependencies] -python = "^3.9.0" graphql-core = "^3.2.3" websocket-client = "^1.5.2" jsonschema = "^4.17.3" @@ -48,6 +55,10 @@ optional = true sphinx = "^6.2.1" sphinx_rtd_theme = "^1.2.0" +[build-system] +requires = ["poetry-core>=2.0.0,<3.0.0"] +build-backend = "poetry.core.masonry.api" + [tool.isort] profile = "black" src_paths = ["duniterpy", "tests", "examples"] -- GitLab