From b5c03dcc149257f3f62d3c8e5274274706a8d295 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Fri, 15 Dec 2023 12:22:14 +0100 Subject: [PATCH 1/5] Update dev dependencies and pre-commit hooks --- .pre-commit-config.yaml | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a5fafc..bf99e63 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: # See https://pre-commit.com/hooks.html for info on hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-added-large-files - id: check-ast @@ -21,11 +21,11 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.12.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.287 + rev: v0.1.8 hooks: - id: ruff diff --git a/pyproject.toml b/pyproject.toml index 25dd25e..9122b68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ markdown = ["markdown>=3.4"] lint = [ "black>=23.7.0", "invoke>=2.2.0", - "ruff>=0.0.280", + "ruff>=0.1.8", ] test = [ "markdown>=3.4", From c82cb0014ff68f47413e6a694b7beff38e466014 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Fri, 15 Dec 2023 12:22:50 +0100 Subject: [PATCH 2/5] Add Python 3.12 to CI test matrix --- .github/workflows/main.yml | 2 +- pyproject.toml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46123f4..4142087 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/pyproject.toml b/pyproject.toml index 9122b68..2b08e41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,9 +19,11 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules", ] + requires-python = ">=3.8.1,<4.0" dependencies = [ "pelican>=4.5", From a4bdb61c5b763b0d56a2a66afe566e9904692909 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Fri, 15 Dec 2023 12:23:31 +0100 Subject: [PATCH 3/5] Remove unneeded `target-version` pyproject setting It seems this is already imputed from the `requires-python` setting. --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2b08e41..db9cdae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,8 +93,6 @@ ignore = [ "PLW2901", # `for` loop variable overwritten by assignment target ] -target-version = "py38" - [tool.ruff.per-file-ignores] "**/test_mau_reader.py" = ["D103", "E501"] From 6c6f7b47d841efda0f3bdde721a643aa5dff53bf Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Fri, 15 Dec 2023 12:24:15 +0100 Subject: [PATCH 4/5] Switch build system from Hatchling to PDM --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index db9cdae..213e8b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,5 +102,5 @@ force-sort-within-sections = true known-first-party = ["pelican"] [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["pdm-backend"] +build-backend = "pdm.backend" From 7b442911c56c410f263a2a4a91cbd3fdf435c3c0 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Mon, 15 Apr 2024 15:04:23 +0200 Subject: [PATCH 5/5] Ensure plugin is included in built package --- pyproject.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 213e8b7..4b7cfd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,8 @@ Funding = "https://donate.getpelican.com/" [project.optional-dependencies] markdown = ["markdown>=3.4"] +[tool.pdm] + [tool.pdm.dev-dependencies] lint = [ "black>=23.7.0", @@ -52,6 +54,14 @@ test = [ "pytest-sugar>=0.9.7", ] +[tool.pdm.build] +source-includes = [ + "CHANGELOG.md", + "CONTRIBUTING.md", +] +includes = ["pelican/"] +excludes = ["tasks.py"] + [tool.autopub] project-name = "Mau Reader" git-username = "botpub"