Skip to content

Commit 69f9025

Browse files
committed
Cruft update
1 parent f38b29d commit 69f9025

File tree

5 files changed

+37
-27
lines changed

5 files changed

+37
-27
lines changed

.cruft.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/getpelican/cookiecutter-pelican-plugin",
3-
"commit": "84fcf4f1645af2a8e1c22d4b68e3438ca28bf31f",
3+
"commit": "4aa8104df7e76fa2dcbf583dcec8052e81d915ef",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {

.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.7
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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ classifiers = [
1515
"License :: OSI Approved :: GNU Affero General Public License v3",
1616
"Operating System :: OS Independent",
1717
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.8",
19-
"Programming Language :: Python :: 3.9",
2018
"Programming Language :: Python :: 3.10",
2119
"Programming Language :: Python :: 3.11",
2220
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
22+
"Programming Language :: Python :: 3.14",
2323
"Topic :: Internet :: WWW/HTTP",
2424
"Topic :: Software Development :: Libraries :: Python Modules",
2525
]
@@ -32,21 +32,21 @@ dependencies = [
3232
]
3333

3434
[project.urls]
35-
Homepage = "https://github.com/pelican-plugins/avatar"
35+
"Homepage" = "https://github.com/pelican-plugins/avatar"
3636
"Issue Tracker" = "https://github.com/pelican-plugins/avatar/issues"
37-
Funding = "https://donate.getpelican.com/"
37+
"Changelog" = "https://github.com/pelican-plugins/avatar/blob/main/CHANGELOG.md"
38+
"Funding" = "https://donate.getpelican.com/"
3839

3940
[project.optional-dependencies]
4041
markdown = ["markdown>=3.4"]
4142

42-
[tool.pdm]
43-
44-
[tool.pdm.dev-dependencies]
43+
[dependency-groups]
4544
lint = [
4645
"invoke>=2.2",
47-
"ruff>=0.6.7,<0.7.0",
46+
"ruff>=0.14.2,<1.0.0",
4847
]
4948
test = [
49+
"invoke>=2.2",
5050
"markdown>=3.4",
5151
"pytest>=7.0",
5252
"pytest-cov>=4.0",
@@ -60,7 +60,7 @@ source-includes = [
6060
"avatar-example.png",
6161
]
6262
includes = ["pelican/"]
63-
excludes = ["tasks.py"]
63+
excludes = ["**/.DS_Store"]
6464

6565
[tool.autopub]
6666
project-name = "Avatar"

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 = "avatar"
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)