Skip to content

Commit a83b9c4

Browse files
committed
chore: Apply upstream template changes via Cruft
1 parent c40fa01 commit a83b9c4

5 files changed

Lines changed: 38 additions & 27 deletions

File tree

.cruft.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/getpelican/cookiecutter-pelican-plugin",
3-
"commit": "94970ab900aed538f451686a2eb51188dbfd1a28",
3+
"commit": "d683335f82b19e1ed2c92abf4aa6d07678e5d273",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {
@@ -20,7 +20,8 @@
2020
"tests_exist": true,
2121
"python_version": ">=3.8.1,<4.0",
2222
"pelican_version": ">=4.5",
23-
"_template": "https://github.com/getpelican/cookiecutter-pelican-plugin"
23+
"_template": "https://github.com/getpelican/cookiecutter-pelican-plugin",
24+
"_commit": "d683335f82b19e1ed2c92abf4aa6d07678e5d273"
2425
}
2526
},
2627
"directory": null

.github/workflows/main.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
21+
with:
22+
persist-credentials: false
2123

2224
- name: Set up Python ${{ matrix.python-version }} & PDM
2325
uses: pdm-project/setup-pdm@v4
@@ -37,7 +39,9 @@ jobs:
3739
runs-on: ubuntu-latest
3840

3941
steps:
40-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@v5
43+
with:
44+
persist-credentials: false
4145

4246
- name: Validate links in Markdown files
4347
uses: JustinBeckwith/linkinator-action@v1
@@ -48,7 +52,7 @@ jobs:
4852
- name: Set up Python & PDM
4953
uses: pdm-project/setup-pdm@v4
5054
with:
51-
python-version: "3.10"
55+
python-version: "3.11"
5256

5357
- name: Install dependencies
5458
run: pdm install
@@ -68,18 +72,17 @@ jobs:
6872
id-token: write
6973

7074
steps:
71-
- uses: actions/checkout@v4
75+
- uses: actions/checkout@v5
7276

7377
- name: Set up Python
74-
uses: actions/setup-python@v5
78+
uses: actions/setup-python@v6
7579
with:
76-
python-version: "3.10"
80+
python-version: "3.11"
7781

7882
- name: Check release
7983
id: check_release
8084
run: |
81-
python -m pip install autopub httpx
82-
python -m pip install https://github.com/scikit-build/github-release/archive/master.zip
85+
python -m pip install autopub[github]
8386
autopub check
8487
8588
- name: Publish

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ci:
55
# See https://pre-commit.com/hooks.html for info on hooks
66
repos:
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v4.6.0
8+
rev: v6.0.0
99
hooks:
1010
- id: check-added-large-files
1111
- id: check-ast
@@ -21,8 +21,8 @@ repos:
2121
- id: trailing-whitespace
2222

2323
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: v0.6.1
24+
rev: v0.14.2
2525
hooks:
26-
- id: ruff
26+
- id: ruff-check
2727
- id: ruff-format
2828
args: ["--check"]

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ classifiers = [
2727
"License :: OSI Approved :: MIT License",
2828
"Operating System :: OS Independent",
2929
"Programming Language :: Python :: 3",
30-
"Programming Language :: Python :: 3.8",
31-
"Programming Language :: Python :: 3.9",
3230
"Programming Language :: Python :: 3.10",
3331
"Programming Language :: Python :: 3.11",
3432
"Programming Language :: Python :: 3.12",
33+
"Programming Language :: Python :: 3.13",
34+
"Programming Language :: Python :: 3.14",
3535
"Topic :: Internet :: WWW/HTTP",
3636
"Topic :: Software Development :: Libraries :: Python Modules",
3737
]
@@ -42,21 +42,21 @@ dependencies = [
4242
]
4343

4444
[project.urls]
45-
Homepage = "https://github.com/pelican-plugins/minify"
45+
"Homepage" = "https://github.com/pelican-plugins/minify"
4646
"Issue Tracker" = "https://github.com/pelican-plugins/minify/issues"
47-
Funding = "https://donate.getpelican.com/"
47+
"Changelog" = "https://github.com/pelican-plugins/minify/blob/main/CHANGELOG.md"
48+
"Funding" = "https://donate.getpelican.com/"
4849

4950
[project.optional-dependencies]
5051
markdown = ["markdown>=3.4"]
5152

52-
[tool.pdm]
53-
54-
[tool.pdm.dev-dependencies]
53+
[dependency-groups]
5554
lint = [
5655
"invoke>=2.2",
57-
"ruff>=0.6.0,<0.7.0",
56+
"ruff>=0.14.2,<1.0.0",
5857
]
5958
test = [
59+
"invoke>=2.2",
6060
"markdown>=3.4",
6161
"pytest>=7.0",
6262
"pytest-cov>=4.0",

tasks.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
from invoke import task
88

99
logger = logging.getLogger(__name__)
10+
level = logging.INFO
11+
logger.setLevel(level)
12+
console_handler = logging.StreamHandler()
13+
console_handler.setLevel(level)
14+
logger.addHandler(console_handler)
1015

1116
PKG_NAME = "minify"
1217
PKG_PATH = Path(f"pelican/plugins/{PKG_NAME}")
@@ -47,20 +52,22 @@ def format(c, check=False, diff=False):
4752

4853

4954
@task
50-
def ruff(c, fix=False, diff=False):
55+
def ruff(c, concise=False, fix=False, diff=False):
5156
"""Run Ruff to ensure code meets project standards."""
52-
diff_flag, fix_flag = "", ""
57+
concise_flag, fix_flag, diff_flag = "", "", ""
58+
if concise:
59+
concise_flag = "--output-format=concise"
5360
if fix:
5461
fix_flag = "--fix"
5562
if diff:
5663
diff_flag = "--diff"
57-
c.run(f"{CMD_PREFIX}ruff check {diff_flag} {fix_flag} .", pty=PTY)
64+
c.run(f"{CMD_PREFIX}ruff check {concise_flag} {diff_flag} {fix_flag} .", pty=PTY)
5865

5966

6067
@task
61-
def lint(c, fix=False, diff=False):
68+
def lint(c, concise=False, fix=False, diff=False):
6269
"""Check code style via linting tools."""
63-
ruff(c, fix=fix, diff=diff)
70+
ruff(c, concise=concise, fix=fix, diff=diff)
6471
format(c, check=(not fix), diff=diff)
6572

6673

0 commit comments

Comments
 (0)