Skip to content

Commit 3d2b1ca

Browse files
committed
Merge branch 'main' of github.com:pawamoy/copier-uv
2 parents bbe3319 + cdbc61b commit 3d2b1ca

File tree

5 files changed

+23
-37
lines changed

5 files changed

+23
-37
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88
<!-- insertion marker -->
9+
## [1.6.1](https://github.com/mkdocstrings/handler-template/releases/tag/1.6.1) - 2025-11-27
10+
11+
<small>[Compare with 1.6.0](https://github.com/mkdocstrings/handler-template/compare/1.6.0...1.6.01)</small>
12+
13+
### Merge upstream
14+
15+
#### Code Refactoring
16+
17+
- Stop using mkdocs-material-insiders ([0d015fe](https://github.com/pawamoy/copier-uv/commit/0d015fe2510c0c0ba1ac3c9b51132d127a733569) by Timothée Mazzucotelli).
18+
919
## [1.6.0](https://github.com/mkdocstrings/handler-template/releases/tag/1.6.0) - 2025-11-10
1020

1121
<small>[Compare with 1.5.1](https://github.com/mkdocstrings/handler-template/compare/1.5.1...1.6.0)</small>

project/duties.py.jinja

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@ from __future__ import annotations
55
import os
66
import re
77
import sys
8-
from contextlib import contextmanager
9-
from importlib.metadata import version as pkgversion
108
from pathlib import Path
119
from typing import TYPE_CHECKING
1210

1311
from duty import duty, tools
1412

1513
if TYPE_CHECKING:
16-
from collections.abc import Iterator
17-
1814
from duty.context import Context
1915

2016

@@ -36,18 +32,6 @@ def pyprefix(title: str) -> str:
3632
return title
3733

3834

39-
@contextmanager
40-
def material_insiders() -> Iterator[bool]:
41-
if "+insiders" in pkgversion("mkdocs-material"):
42-
os.environ["MATERIAL_INSIDERS"] = "true"
43-
try:
44-
yield True
45-
finally:
46-
os.environ.pop("MATERIAL_INSIDERS")
47-
else:
48-
yield False
49-
50-
5135
def _get_changelog_version() -> str:
5236
changelog_version_re = re.compile(r"^## \[(\d+\.\d+\.\d+)\].*$")
5337
with Path(__file__).parent.joinpath("CHANGELOG.md").open("r", encoding="utf8") as file:
@@ -84,11 +68,10 @@ def check_docs(ctx: Context) -> None:
8468
"""Check if the documentation builds correctly."""
8569
Path("htmlcov").mkdir(parents=True, exist_ok=True)
8670
Path("htmlcov/index.html").touch(exist_ok=True)
87-
with material_insiders():
88-
ctx.run(
89-
tools.mkdocs.build(strict=True, verbose=True),
90-
title=pyprefix("Building documentation"),
91-
)
71+
ctx.run(
72+
tools.mkdocs.build(strict=True, verbose=True),
73+
title=pyprefix("Building documentation"),
74+
)
9275

9376

9477
@duty(nofail=PY_VERSION == PY_DEV)
@@ -120,22 +103,18 @@ def docs(ctx: Context, *cli_args: str, host: str = "127.0.0.1", port: int = 8000
120103
host: The host to serve the docs from.
121104
port: The port to serve the docs on.
122105
"""
123-
with material_insiders():
124-
ctx.run(
125-
tools.mkdocs.serve(dev_addr=f"{host}:{port}").add_args(*cli_args),
126-
title="Serving documentation",
127-
capture=False,
128-
)
106+
ctx.run(
107+
tools.mkdocs.serve(dev_addr=f"{host}:{port}").add_args(*cli_args),
108+
title="Serving documentation",
109+
capture=False,
110+
)
129111

130112

131113
@duty
132114
def docs_deploy(ctx: Context) -> None:
133115
"""Deploy the documentation to GitHub pages."""
134116
os.environ["DEPLOY"] = "true"
135-
with material_insiders() as insiders:
136-
if not insiders:
137-
ctx.run(lambda: False, title="Not deploying docs without Material for MkDocs Insiders!")
138-
ctx.run(tools.mkdocs.gh_deploy(force=True), title="Deploying documentation")
117+
ctx.run(tools.mkdocs.gh_deploy(force=True), title="Deploying documentation")
139118

140119

141120
@duty

project/mkdocs.yml.jinja

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,7 @@ plugins:
159159
type: timeago
160160
- minify:
161161
minify_html: !ENV [DEPLOY, false]
162-
- group:
163-
enabled: !ENV [MATERIAL_INSIDERS, false]
164-
plugins:
165-
- typeset
162+
- typeset
166163

167164
extra:
168165
social:

tests/reset_history.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ else
99
fi
1010
git add -A
1111
git commit -m "feat: Initial commit"
12-
git tag 0.1.0
12+
git tag -m "" -a 0.1.0
1313
git push origin main -f --tags

tests/test_project.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ EOF
3636
cat .copier-answers.yml
3737
git add -A .
3838
git commit -am "feat: Initial commit"
39-
git tag 0.1.0
39+
git tag -m "" -a 0.1.0
4040
echo
4141
echo ">>> Printing help"
4242
make help

0 commit comments

Comments
 (0)