Skip to content

Commit cc41416

Browse files
committed
chore: Template upgrade
1 parent 52e0318 commit cc41416

File tree

15 files changed

+171
-49
lines changed

15 files changed

+171
-49
lines changed

.copier-answers.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier.
2-
_commit: 1.8.4
2+
_commit: 1.11.1
33
_src_path: gh:pawamoy/copier-uv
44
author_email: dev@pawamoy.fr
55
author_fullname: Timothée Mazzucotelli
@@ -8,7 +8,6 @@ copyright_date: '2025'
88
copyright_holder: Timothée Mazzucotelli
99
copyright_holder_email: dev@pawamoy.fr
1010
copyright_license: ISC
11-
insiders: false
1211
project_description: MkDocs plugin to generate an /llms.txt file.
1312
project_name: mkdocs-llmstxt
1413
python_package_command_line_name: ''

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### For reviewers
2+
<!-- Help reviewers by letting them know whether AI was used to create this PR. -->
3+
4+
- [ ] I did not use AI
5+
- [ ] I used AI and thoroughly reviewed every code/docs change
6+
7+
### Description of the change
8+
<!-- Quick sentence for small changes, longer description for more impacting changes. -->
9+
10+
### Relevant resources
11+
<!-- Link to any relevant GitHub issue, PR or discussion, section in online docs, etc. -->
12+
13+
-
14+
-
15+
-

.github/workflows/ci.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@ name: ci
22

33
on:
44
push:
5+
branches:
6+
- main
7+
- test-me-*
58
pull_request:
69
branches:
710
- main
811

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
916
defaults:
1017
run:
1118
shell: bash
@@ -14,13 +21,30 @@ env:
1421
LANG: en_US.utf-8
1522
LC_ALL: en_US.utf-8
1623
PYTHONIOENCODING: UTF-8
24+
PYTHONWARNDEFAULTENCODING: "1"
1725
PYTHON_VERSIONS: ""
1826

1927
jobs:
2028

2129
quality:
30+
strategy:
31+
matrix:
32+
os:
33+
- ubuntu-latest
34+
- macos-latest
35+
- windows-latest
36+
python-version:
37+
- "3.10"
38+
- "3.14"
39+
include:
40+
- os: ubuntu-latest
41+
python-version: "3.11"
42+
- os: ubuntu-latest
43+
python-version: "3.12"
44+
- os: ubuntu-latest
45+
python-version: "3.13"
2246

23-
runs-on: ubuntu-latest
47+
runs-on: ${{ matrix.os }}
2448

2549
steps:
2650
- name: Checkout
@@ -33,9 +57,9 @@ jobs:
3357
uses: r-lib/actions/setup-pandoc@v2
3458

3559
- name: Setup Python
36-
uses: actions/setup-python@v5
60+
uses: actions/setup-python@v6
3761
with:
38-
python-version: "3.12"
62+
python-version: ${{ matrix.python-version }}
3963

4064
- name: Setup uv
4165
uses: astral-sh/setup-uv@v5
@@ -60,6 +84,7 @@ jobs:
6084

6185
- name: Store objects inventory for tests
6286
uses: actions/upload-artifact@v4
87+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' }}
6388
with:
6489
name: objects.inv
6590
path: site/objects.inv
@@ -75,12 +100,12 @@ jobs:
75100
- macos-latest
76101
- windows-latest
77102
python-version:
78-
- "3.9"
79103
- "3.10"
80104
- "3.11"
81105
- "3.12"
82106
- "3.13"
83107
- "3.14"
108+
- "3.15"
84109
resolution:
85110
- highest
86111
- lowest-direct
@@ -90,7 +115,7 @@ jobs:
90115
- os: windows-latest
91116
resolution: lowest-direct
92117
runs-on: ${{ matrix.os }}
93-
continue-on-error: ${{ matrix.python-version == '3.14' }}
118+
continue-on-error: true
94119

95120
steps:
96121
- name: Checkout
@@ -103,7 +128,7 @@ jobs:
103128
uses: r-lib/actions/setup-pandoc@v2
104129

105130
- name: Setup Python
106-
uses: actions/setup-python@v5
131+
uses: actions/setup-python@v6
107132
with:
108133
python-version: ${{ matrix.python-version }}
109134
allow-prereleases: true

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
fetch-depth: 0
1616
fetch-tags: true
1717
- name: Setup Python
18-
uses: actions/setup-python@v5
18+
uses: actions/setup-python@v6
1919
with:
20-
python-version: "3.12"
20+
python-version: "3.13"
2121
- name: Setup uv
2222
uses: astral-sh/setup-uv@v5
2323
- name: Prepare release notes
@@ -26,3 +26,4 @@ jobs:
2626
uses: softprops/action-gh-release@v2
2727
with:
2828
body_path: release-notes.md
29+

.github/workflows/sponsors.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Update sponsors
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
update-readme:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Update README and create PR
19+
uses: pawamoy/readme-insert@main
20+
with:
21+
markup-url: https://pawamoy.github.io/sponsors.txt
22+
start-marker: '<!-- sponsors-start -->'
23+
end-marker: '<!-- sponsors-end -->'
24+
commit-message: 'chore: Update sponsors section in README'
25+
pr-title: 'chore: Update sponsors section in README'
26+
pr-body: 'This PR updates the sponsors section in the README file.'

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
# the `make` command will point at the `scripts/make` shell script.
33
# This Makefile is just here to allow auto-completion in the terminal.
44

5+
default: help
6+
@echo
7+
@echo 'Enable direnv in your shell to use the `make` command: `direnv allow`'
8+
@echo 'Or use `python scripts/make ARGS` to run the commands/tasks directly.'
9+
10+
.DEFAULT_GOAL: default
11+
512
actions = \
613
allrun \
714
changelog \

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![ci](https://github.com/pawamoy/mkdocs-llmstxt/workflows/ci/badge.svg)](https://github.com/pawamoy/mkdocs-llmstxt/actions?query=workflow%3Aci)
44
[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://pawamoy.github.io/mkdocs-llmstxt/)
55
[![pypi version](https://img.shields.io/pypi/v/mkdocs-llmstxt.svg)](https://pypi.org/project/mkdocs-llmstxt/)
6-
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#mkdocs-llmstxt:gitter.im)
6+
[![gitter](https://img.shields.io/badge/matrix-chat-4DB798.svg?style=flat)](https://app.gitter.im/#/room/#mkdocs-llmstxt:gitter.im)
77

88
MkDocs plugin to generate an [/llms.txt file](https://llmstxt.org/).
99

@@ -67,11 +67,11 @@ plugins:
6767

6868
Use `base_url` to point `llms.txt` to documentation in a specific directory. For example, when using [Read the Docs](https://github.com/readthedocs/), use `base_url` to indicate the path to the hosted docs built for a specific language or version.
6969

70-
The resulting `llms.txt` uses `base_url` when it is specified, instead of the canonical `site_url`.
70+
The resulting `llms.txt` uses `base_url` when it is specified, instead of the canonical `site_url`.
7171

7272
```yaml title="mkdocs.yml"
7373
plugins:
74-
- llmstxt:
74+
- llmstxt:
7575
base_url: https://productname.hostname.io/en/0.1.34
7676
```
7777

@@ -131,3 +131,8 @@ def preprocess(soup: BeautifulSoup, output: str) -> None:
131131
The `output` argument lets you modify the soup *depending on which file is being generated*.
132132

133133
Have a look at [our own cleaning function](https://pawamoy.github.io/mkdocs-llmstxt/reference/api/#mkdocs_llmstxt.autoclean) to get inspiration.
134+
135+
## Sponsors
136+
137+
<!-- sponsors-start -->
138+
<!-- sponsors-end -->

config/pytest.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ testpaths =
1010
# action:message_regex:warning_class:module_regex:line
1111
filterwarnings =
1212
error
13+
default::EncodingWarning
14+
error::EncodingWarning:mkdocs_llmstxt
1315
# TODO: remove once pytest-xdist 4 is released
1416
ignore:.*rsyncdir:DeprecationWarning:xdist

docs/.overrides/main.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{% extends "base.html" %}
22

33
{% block announce %}
4-
4+
<strong>Fund this project</strong> through
5+
<a href="https://github.com/sponsors/pawamoy"><strong>sponsorship</strong></a>
6+
<span class="twemoji heart pulse">
7+
{% include ".icons/octicons/heart-fill-16.svg" %}
8+
</span> &mdash;
59
Follow
610
<strong>@pawamoy</strong> on
711
<a rel="me" href="https://fosstodon.org/@pawamoy">

duties.py

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
WINDOWS = os.name == "nt"
2626
PTY = not WINDOWS and not CI
2727
MULTIRUN = os.environ.get("MULTIRUN", "0") == "1"
28+
PY_VERSION = f"{sys.version_info.major}{sys.version_info.minor}"
29+
PY_DEV = "314"
2830

2931

3032
def pyprefix(title: str) -> str:
@@ -68,7 +70,7 @@ def check(ctx: Context) -> None:
6870
"""Check it all!"""
6971

7072

71-
@duty
73+
@duty(nofail=PY_VERSION == PY_DEV)
7274
def check_quality(ctx: Context) -> None:
7375
"""Check the code quality."""
7476
ctx.run(
@@ -77,7 +79,7 @@ def check_quality(ctx: Context) -> None:
7779
)
7880

7981

80-
@duty
82+
@duty(nofail=PY_VERSION == PY_DEV)
8183
def check_docs(ctx: Context) -> None:
8284
"""Check if the documentation builds correctly."""
8385
Path("htmlcov").mkdir(parents=True, exist_ok=True)
@@ -89,7 +91,7 @@ def check_docs(ctx: Context) -> None:
8991
)
9092

9193

92-
@duty
94+
@duty(nofail=PY_VERSION == PY_DEV)
9395
def check_types(ctx: Context) -> None:
9496
"""Check that the code is correctly typed."""
9597
os.environ["FORCE_COLOR"] = "1"
@@ -99,7 +101,7 @@ def check_types(ctx: Context) -> None:
99101
)
100102

101103

102-
@duty
104+
@duty(nofail=PY_VERSION == PY_DEV)
103105
def check_api(ctx: Context, *cli_args: str) -> None:
104106
"""Check for API breaking changes."""
105107
ctx.run(
@@ -132,7 +134,7 @@ def docs_deploy(ctx: Context) -> None:
132134
with material_insiders() as insiders:
133135
if not insiders:
134136
ctx.run(lambda: False, title="Not deploying docs without Material for MkDocs Insiders!")
135-
ctx.run(tools.mkdocs.gh_deploy(), title="Deploying documentation")
137+
ctx.run(tools.mkdocs.gh_deploy(force=True), title="Deploying documentation")
136138

137139

138140
@duty
@@ -179,7 +181,7 @@ def release(ctx: Context, version: str = "") -> None:
179181
ctx.run("false", title="A version must be provided")
180182
ctx.run("git add pyproject.toml CHANGELOG.md", title="Staging files", pty=PTY)
181183
ctx.run(["git", "commit", "-m", f"chore: Prepare release {version}"], title="Committing changes", pty=PTY)
182-
ctx.run(f"git tag {version}", title="Tagging commit", pty=PTY)
184+
ctx.run(f"git tag -m '' -a {version}", title="Tagging commit", pty=PTY)
183185
ctx.run("git push", title="Pushing commits", pty=False)
184186
ctx.run("git push --tags", title="Pushing tags", pty=False)
185187

@@ -192,20 +194,15 @@ def coverage(ctx: Context) -> None:
192194
ctx.run(tools.coverage.html(rcfile="config/coverage.ini"))
193195

194196

195-
@duty
196-
def test(ctx: Context, *cli_args: str, match: str = "") -> None: # noqa: PT028
197-
"""Run the test suite.
198-
199-
Parameters:
200-
match: A pytest expression to filter selected tests.
201-
"""
202-
py_version = f"{sys.version_info.major}{sys.version_info.minor}"
203-
os.environ["COVERAGE_FILE"] = f".coverage.{py_version}"
197+
@duty(nofail=PY_VERSION == PY_DEV)
198+
def test(ctx: Context, *cli_args: str) -> None:
199+
"""Run the test suite."""
200+
os.environ["COVERAGE_FILE"] = f".coverage.{PY_VERSION}"
201+
os.environ["PYTHONWARNDEFAULTENCODING"] = "1"
204202
ctx.run(
205203
tools.pytest(
206204
"tests",
207205
config_file="config/pytest.ini",
208-
select=match,
209206
color="yes",
210207
).add_args("-n", "auto", *cli_args),
211208
title=pyprefix("Running tests"),

0 commit comments

Comments
 (0)