Skip to content

Commit 0a3d7d4

Browse files
committed
chore: Template upgrade
1 parent 187b4b8 commit 0a3d7d4

File tree

13 files changed

+103
-59
lines changed

13 files changed

+103
-59
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier.
2-
_commit: 1.7.1
2+
_commit: 1.8.6
33
_src_path: gh:pawamoy/copier-uv
44
author_email: dev@pawamoy.fr
55
author_fullname: Timothée Mazzucotelli

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 \

docs/css/mkdocstrings.css

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,49 @@ a.autorefs-external::after {
2424
a.external:hover::after,
2525
a.autorefs-external:hover::after {
2626
background-color: var(--md-accent-fg-color);
27-
}
27+
}
28+
29+
/* Tree-like output for backlinks. */
30+
.doc-backlink-list {
31+
--tree-clr: var(--md-default-fg-color);
32+
--tree-font-size: 1rem;
33+
--tree-item-height: 1;
34+
--tree-offset: 1rem;
35+
--tree-thickness: 1px;
36+
--tree-style: solid;
37+
display: grid;
38+
list-style: none !important;
39+
}
40+
41+
.doc-backlink-list li > span:first-child {
42+
text-indent: .3rem;
43+
}
44+
.doc-backlink-list li {
45+
padding-inline-start: var(--tree-offset);
46+
border-left: var(--tree-thickness) var(--tree-style) var(--tree-clr);
47+
position: relative;
48+
margin-left: 0 !important;
49+
50+
&:last-child {
51+
border-color: transparent;
52+
}
53+
&::before{
54+
content: '';
55+
position: absolute;
56+
top: calc(var(--tree-item-height) / 2 * -1 * var(--tree-font-size) + var(--tree-thickness));
57+
left: calc(var(--tree-thickness) * -1);
58+
width: calc(var(--tree-offset) + var(--tree-thickness) * 2);
59+
height: calc(var(--tree-item-height) * var(--tree-font-size));
60+
border-left: var(--tree-thickness) var(--tree-style) var(--tree-clr);
61+
border-bottom: var(--tree-thickness) var(--tree-style) var(--tree-clr);
62+
}
63+
&::after{
64+
content: '';
65+
position: absolute;
66+
border-radius: 50%;
67+
background-color: var(--tree-clr);
68+
top: calc(var(--tree-item-height) / 2 * 1rem);
69+
left: var(--tree-offset) ;
70+
translate: calc(var(--tree-thickness) * -1) calc(var(--tree-thickness) * -1);
71+
}
72+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
title: API reference
3+
hide:
4+
- navigation
5+
---
6+
17
# ::: griffe_pydantic
28
options:
39
show_submodules: true

duties.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def coverage(ctx: Context) -> None:
237237

238238

239239
@duty
240-
def test(ctx: Context, *cli_args: str, match: str = "") -> None:
240+
def test(ctx: Context, *cli_args: str, match: str = "") -> None: # noqa: PT028
241241
"""Run the test suite.
242242
243243
Parameters:

mkdocs.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ nav:
1919
- Changelog: changelog.md
2020
- Credits: credits.md
2121
- License: license.md
22-
- API reference: reference/griffe_pydantic.md
22+
- API reference: reference/api.md
2323
- Development:
2424
- Contributing: contributing.md
2525
- Code of Conduct: code_of_conduct.md
@@ -106,6 +106,7 @@ markdown_extensions:
106106

107107
plugins:
108108
- search
109+
- autorefs
109110
- markdown-exec
110111
- section-index
111112
- coverage
@@ -118,6 +119,7 @@ plugins:
118119
- https://mkdocstrings.github.io/griffe/objects.inv
119120
- https://docs.pydantic.dev/latest/objects.inv
120121
options:
122+
backlinks: tree
121123
docstring_options:
122124
ignore_init_summary: true
123125
docstring_section_style: list
@@ -135,11 +137,12 @@ plugins:
135137
signature_crossrefs: true
136138
summary: true
137139
- llmstxt:
138-
files:
139-
- output: llms-full.txt
140-
inputs:
140+
full_output: llms-full.txt
141+
sections:
142+
Usage:
141143
- index.md
142-
- reference/**.md
144+
API:
145+
- reference/api.md
143146
- git-revision-date-localized:
144147
enabled: !ENV [DEPLOY, false]
145148
enable_creation_date: true

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ getter = "scripts.get_version:get_version"
5252

5353
[tool.pdm.build]
5454
# Include as much as possible in the source distribution, to help redistributors.
55-
excludes = ["**/.pytest_cache"]
55+
excludes = ["**/.pytest_cache", "**/.mypy_cache"]
5656
source-includes = [
5757
"config",
5858
"docs",
@@ -98,11 +98,11 @@ ci = [
9898
"mkdocs>=1.6",
9999
"mkdocs-coverage>=1.0",
100100
"mkdocs-git-revision-date-localized-plugin>=1.2",
101-
"mkdocs-llmstxt>=0.1",
101+
"mkdocs-llmstxt>=0.2",
102102
"mkdocs-material>=9.5",
103103
"mkdocs-minify-plugin>=0.8",
104-
"mkdocstrings[python]>=0.28",
105104
"mkdocs-section-index>=0.3",
105+
"mkdocstrings[python]>=0.29",
106106
# YORE: EOL 3.10: Remove line.
107107
"tomli>=2.0; python_version < '3.11'",
108108
]

scripts/gen_api_ref.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

scripts/get_version.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
from contextlib import suppress
55
from pathlib import Path
66

7-
from pdm.backend.hooks.version import SCMVersion, Version, default_version_formatter, get_version_from_scm
7+
from pdm.backend.hooks.version import ( # ty: ignore[unresolved-import]
8+
SCMVersion,
9+
Version,
10+
default_version_formatter,
11+
get_version_from_scm,
12+
)
813

914
_root = Path(__file__).parent.parent
1015
_changelog = _root / "CHANGELOG.md"

scripts/insiders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,6 @@ def load_json(url: str) -> str | list | dict:
168168
ongoing_goals = [goal for goal in goals.values() if not goal.complete]
169169
unreleased_features = sorted(
170170
(ft for ft in feature_list(ongoing_goals) if ft.since),
171-
key=lambda ft: cast(date, ft.since),
171+
key=lambda ft: cast("date", ft.since),
172172
reverse=True,
173173
)

0 commit comments

Comments
 (0)