8000 chore: Template upgrade · AntoineD/mkdocstrings-python@dbffcbc · GitHub
[go: up one dir, main page]

Skip to content

Commit dbffcbc

Browse files
committed
chore: Template upgrade
1 parent 2de4717 commit dbffcbc

File tree

6 files changed

+32
-11
lines changed

6 files changed

+32
-11
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: 0.15.7
2+
_commit: 0.15.8
33
_src_path: gh:pawamoy/copier-pdm
44
author_email: pawamoy@pm.me
55
author_fullname: Timothée Mazzucotelli

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,29 @@ jobs:
5151
- name: Check for breaking changes in the API
5252
run: pdm run duty check-api
5353

54+
exclude-test-jobs:
55+
runs-on: ubuntu-latest
56+
outputs:
57+
jobs: ${{ steps.exclude-jobs.outputs.jobs }}
58+
steps:
59+
- id: exclude-jobs
60+
run: |
61+
if ${{ github.repository_owner == 'pawamoy-insiders' }}; then
62+
echo 'jobs=[
63+
{"os": "macos-latest"},
64+
{"os": "windows-latest"},
65+
{"python-version": "3.8"},
66+
{"python-version": "3.9"},
67+
{"python-version": "3.10"},
68+
{"python-version": "3.11"}
69+
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
70+
else
71+
echo 'jobs=[]' >> $GITHUB_OUTPUT
72+
fi
73+
5474
tests:
5575

76+
needs: exclude-test-jobs
5677
strategy:
5778
max-parallel: 4
5879
matrix:
@@ -66,6 +87,7 @@ jobs:
6687
- "3.9"
6788
- "3.10"
6889
- "3.11"
90+
exclude: ${{ fromJSON(needs.exclude-test-jobs.outputs.jobs) }}
6991

7092
runs-on: ${{ matrix.os }}
7193

.github/workflows/dists.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
1517
- name: Setup Python
1618
uses: actions/setup-python@v3
1719
- name: Install build

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.DEFAULT_GOAL := help
22
SHELL := bash
3-
4-
DUTY = $(shell [ -n "${VIRTUAL_ENV}" ] || echo pdm run) duty
3+
DUTY := $(if $(VIRTUAL_ENV),,pdm run) duty
54

65
args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
76
check_quality_args = files

docs/css/mkdocstrings.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,15 @@ div.doc-contents:not(.first) {
88
a.external::after,
99
a.autorefs-external::after {
1010
/* https://primer.style/octicons/arrow-up-right-24 */
11-
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="rgb(0, 0, 0)" d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
11+
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
1212
content: ' ';
1313

1414
display: inline-block;
1515
vertical-align: middle;
1616
position: relative;
17-
bottom: 0.1em;
18-
margin-left: 0.2em;
19-
margin-right: 0.1em;
2017

21-
height: 0.7em;
22-
width: 0.7em;
23-
border-radius: 100%;
18+
height: 1em;
19+
width: 1em;
2420
background-color: var(--md-typeset-a-color);
2521
}
2622

scripts/gen_ref_nav.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import mkdocs_gen_files
66

77
nav = mkdocs_gen_files.Nav()
8+
mod_symbol = '<code class="doc-symbol doc-symbol-nav doc-symbol-mod">mod</code>'
89

910
for path in sorted(Path("src").rglob("*.py")):
1011
module_path = path.relative_to("src").with_suffix("")
@@ -20,7 +21,8 @@
2021
elif parts[-1].startswith("_"):
2122
continue
2223

23-
nav[parts] = doc_path.as_posix()
24+
nav_parts = [f"{mod_symbol} {part}" for part in parts]
25+
nav[tuple(nav_parts)] = doc_path.as_posix()
2426

2527
with mkdocs_gen_files.open(full_doc_path, "w") as fd:
2628
ident = ".".join(parts)

0 commit comments

Comments
 (0)
0