Skip to content

Commit 77f0d47

Browse files
committed
Merge branch 'main' into end-to-end-tests
2 parents 22f4de1 + d67215c commit 77f0d47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1487
-407
lines changed

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 1.1.4
2+
_commit: 1.2.0
33
_src_path: gh:mkdocstrings/handler-template
44
author_email: [email protected]
55
author_fullname: Timothée Mazzucotelli

.github/workflows/ci.yml

+18-11
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@ jobs:
2929
- name: Fetch all tags
3030
run: git fetch --depth=1 --tags
3131

32-
- name: Set up Python
32+
- name: Setup Python
3333
uses: actions/setup-python@v5
3434
with:
35-
python-version: "3.11"
35+
python-version: "3.12"
3636

37-
- name: Install uv
38-
run: pip install uv
37+
- name: Setup uv
38+
uses: astral-sh/setup-uv@v3
39+
with:
40+
enable-cache: true
41+
cache-dependency-glob: pyproject.toml
3942

4043
- name: Install dependencies
4144
run: make setup
@@ -63,11 +66,11 @@ jobs:
6366
echo 'jobs=[
6467
{"os": "macos-latest"},
6568
{"os": "windows-latest"},
66-
{"python-version": "3.9"},
6769
{"python-version": "3.10"},
6870
{"python-version": "3.11"},
6971
{"python-version": "3.12"},
70-
{"python-version": "3.13"}
72+
{"python-version": "3.13"},
73+
{"python-version": "3.14"}
7174
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
7275
else
7376
echo 'jobs=[
@@ -87,31 +90,35 @@ jobs:
8790
- macos-latest
8891
- windows-latest
8992
python-version:
90-
- "3.8"
9193
- "3.9"
9294
- "3.10"
9395
- "3.11"
9496
- "3.12"
9597
- "3.13"
98+
- "3.14"
9699
resolution:
97100
- highest
98101
- lowest-direct
99102
exclude: ${{ fromJSON(needs.exclude-test-jobs.outputs.jobs) }}
100103
runs-on: ${{ matrix.os }}
101-
continue-on-error: ${{ matrix.python-version == '3.13' }}
104+
continue-on-error: ${{ matrix.python-version == '3.14' }}
102105

103106
steps:
104107
- name: Checkout
105108
uses: actions/checkout@v4
106109

107-
- name: Set up Python
110+
- name: Setup Python
108111
uses: actions/setup-python@v5
109112
with:
110113
python-version: ${{ matrix.python-version }}
111114
allow-prereleases: true
112115

113-
- name: Install uv
114-
run: pip install uv
116+
- name: Setup uv
117+
uses: astral-sh/setup-uv@v3
118+
with:
119+
enable-cache: true
120+
cache-dependency-glob: pyproject.toml
121+
cache-suffix: py${{ matrix.python-version }}
115122

116123
- name: Install dependencies
117124
env:

.github/workflows/release.yml

+9-11
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,30 @@ jobs:
1414
- name: Fetch all tags
1515
run: git fetch --depth=1 --tags
1616
- name: Setup Python
17-
uses: actions/setup-python@v4
18-
- name: Install build
19-
if: github.repository_owner == 'pawamoy-insiders'
20-
run: python -m pip install build
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
- name: Setup uv
21+
uses: astral-sh/setup-uv@v3
2122
- name: Build dists
2223
if: github.repository_owner == 'pawamoy-insiders'
23-
run: python -m build
24+
run: uv tool run --from build pyproject-build
2425
- name: Upload dists artifact
2526
uses: actions/upload-artifact@v4
2627
if: github.repository_owner == 'pawamoy-insiders'
2728
with:
2829
name: python-insiders
2930
path: ./dist/*
30-
- name: Install git-changelog
31-
if: github.repository_owner != 'pawamoy-insiders'
32-
run: pip install git-changelog
3331
- name: Prepare release notes
3432
if: github.repository_owner != 'pawamoy-insiders'
35-
run: git-changelog --release-notes > release-notes.md
33+
run: uv tool run git-changelog --release-notes > release-notes.md
3634
- name: Create release with assets
37-
uses: softprops/action-gh-release@v1
35+
uses: softprops/action-gh-release@v2
3836
if: github.repository_owner == 'pawamoy-insiders'
3937
with:
4038
files: ./dist/*
4139
- name: Create release
42-
uses: softprops/action-gh-release@v1
40+
uses: softprops/action-gh-release@v2
4341
if: github.repository_owner != 'pawamoy-insiders'
4442
with:
4543
body_path: release-notes.md

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/.pdm-build/
1616
/htmlcov/
1717
/site/
18+
uv.lock
1819

1920
# cache
2021
.cache/

.gitpod.dockerfile

-6
This file was deleted.

.gitpod.yml

-13
This file was deleted.

CHANGELOG.md

+62
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,68 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
<!-- insertion marker -->
8+
## [1.12.2](https://github.com/mkdocstrings/python/releases/tag/1.12.2) - 2024-10-19
9+
10+
<small>[Compare with 1.12.1](https://github.com/mkdocstrings/python/compare/1.12.1...1.12.2)</small>
11+
12+
### Bug Fixes
13+
14+
- Always render cross-references outside of signatures ([73f11dc](https://github.com/mkdocstrings/python/commit/73f11dcc584a672af7e17738cba08a50f119176a) by Timothée Mazzucotelli). [Issue-mkdocstrings#700](https://github.com/mkdocstrings/mkdocstrings/issues/700)
15+
16+
## [1.12.1](https://github.com/mkdocstrings/python/releases/tag/1.12.1) - 2024-10-14
17+
18+
<small>[Compare with 1.12.0](https://github.com/mkdocstrings/python/compare/1.12.0...1.12.1)</small>
19+
20+
### Bug Fixes
21+
22+
- Don't escape parameter default values ([9dee4d4](https://github.com/mkdocstrings/python/commit/9dee4d4f8e1258e99c19dc7b2b18d3e9090de79b) by Timothée Mazzucotelli). [Issue-191](https://github.com/mkdocstrings/python/issues/191)
23+
24+
## [1.12.0](https://github.com/mkdocstrings/python/releases/tag/1.12.0) - 2024-10-12
25+
26+
<small>[Compare with 1.11.1](https://github.com/mkdocstrings/python/compare/1.11.1...1.12.0)</small>
27+
28+
### Build
29+
30+
- Drop support for Python 3.8 ([6615c91](https://github.com/mkdocstrings/python/commit/6615c91cdc035bc0c2fdd12f3952ff84f5e1c04e) by Timothée Mazzucotelli).
31+
32+
### Features
33+
34+
- Auto-summary of members ([7f9757d](https://github.com/mkdocstrings/python/commit/7f9757d1584555edebc56f1aefe6cc8242e6c8bb) by Timothée Mazzucotelli).
35+
- Render function overloads ([0f2c25c](https://github.com/mkdocstrings/python/commit/0f2c25c9ed7f6c5c93ff13df214f02edfd3a4cb1) by Timothée Mazzucotelli).
36+
- Parameter headings, more automatic cross-references ([0176b83](https://github.com/mkdocstrings/python/commit/0176b83f21ae02d345489c93cca3baf51f8bc58c) by Timothée Mazzucotelli).
37+
38+
### Code Refactoring
39+
40+
- Declare default CSS symbol colors under :host as well ([3b9dba2](https://github.com/mkdocstrings/python/commit/3b9dba2709a8668e379c6ce1536cb1714971b3f4) by James McDonnell). [PR-186](https://github.com/mkdocstrings/python/pull/186)
41+
42+
## [1.11.1](https://github.com/mkdocstrings/python/releases/tag/1.11.1) - 2024-09-03
43+
44+
<small>[Compare with 1.11.0](https://github.com/mkdocstrings/python/compare/1.11.0...1.11.1)</small>
45+
46+
### Code Refactoring
47+
48+
- Prepare `relative_crossrefs` and `scoped_crossrefs` insiders features ([dd8b014](https://github.com/mkdocstrings/python/commit/dd8b014a8ab3decc31d4b08bc22fe68577e1a02c) by Timothée Mazzucotelli).
49+
50+
## [1.11.0](https://github.com/mkdocstrings/python/releases/tag/1.11.0) - 2024-09-03
51+
52+
<small>[Compare with 1.10.9](https://github.com/mkdocstrings/python/compare/1.10.9...1.11.0)</small>
53+
54+
### Features
55+
56+
- Hook into autorefs to provide context around cross-ref errors ([bb4be5b](https://github.com/mkdocstrings/python/commit/bb4be5be1b85be50f46c7889231a2d4a3bd05165) by Timothée Mazzucotelli).
57+
58+
## [1.10.9](https://github.com/mkdocstrings/python/releases/tag/1.10.9) - 2024-08-30
59+
60+
<small>[Compare with 1.10.8](https://github.com/mkdocstrings/python/compare/1.10.8...1.10.9)</small>
61+
62+
### Build
63+
64+
- Explicitly depend on mkdocs-autorefs to be able to specify lower bound ([2299ab5](https://github.com/mkdocstrings/python/commit/2299ab55641585d65babe0e116a6465b4736dcd9) by Timothée Mazzucotelli).
65+
66+
### Code Refactoring
67+
68+
- Use new autorefs syntax ([68cb72f](https://github.com/mkdocstrings/python/commit/68cb72f62253f54146ece621345b36c90d712913) by Timothée Mazzucotelli).
69+
870
## [1.10.8](https://github.com/mkdocstrings/python/releases/tag/1.10.8) - 2024-08-14
971

1072
<small>[Compare with 1.10.7](https://github.com/mkdocstrings/python/compare/1.10.7...1.10.8)</small>

CONTRIBUTING.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ make setup
2323
> You can install it with:
2424
>
2525
> ```bash
26-
> python3 -m pip install --user pipx
27-
> pipx install uv
26+
> curl -LsSf https://astral.sh/uv/install.sh | sh
2827
> ```
2928
>
3029
> Now you can try running `make setup` again,
31-
> or simply `uv install`.
30+
> or simply `uv sync`.
3231
3332
You now have the dependencies installed.
3433

config/ruff.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
target-version = "py38"
1+
target-version = "py39"
22
line-length = 120
33

44
[lint]

devdeps.txt

-34
This file was deleted.

docs/.glossary.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
[Spacy's documentation]: https://spacy.io/api/doc/
99
[Black]: https://pypi.org/project/black/
1010
[Material for MkDocs]: https://squidfunk.github.io/mkdocs-material
11+
[Ruff]: https://docs.astral.sh/ruff
1112

1213
*[ToC]: Table of Contents

docs/insiders/changelog.md

+31
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,37 @@
22

33
## mkdocstrings-python Insiders
44

5+
### 1.9.0 <small>September 03, 2024</small> { id="1.9.0" }
6+
7+
- [Relative cross-references][relative_crossrefs]
8+
- [Scoped cross-references][scoped_crossrefs]
9+
10+
### 1.8.3 <small>June 19, 2024</small> { id="1.8.3" }
11+
12+
- Update code for Griffe 0.46+ to avoid deprecation warnings
13+
14+
### 1.8.2 <small>May 09, 2024</small> { id="1.8.2" }
15+
16+
- Don't render cross-refs for default values when signatures aren't separated
17+
18+
### 1.8.1 <small>April 19, 2024</small> { id="1.8.1" }
19+
20+
- Render enumeration instance name instead of just "value", allowing proper cross-reference
21+
22+
### 1.8.0 <small>March 24, 2024</small> { id="1.8.0" }
23+
24+
- [Annotations modernization][modernize_annotations]
25+
26+
### 1.7.0 <small>March 24, 2024</small> { id="1.7.0" }
27+
28+
- [Class inheritance diagrams with Mermaid][show_inheritance_diagram]
29+
30+
### 1.6.0 <small>January 30, 2024</small> { id="1.6.0" }
31+
32+
- Render cross-references to parameters documentation in signatures and attribute values.
33+
- Add [`parameter_headings`][parameter_headings] option to render headings for parameters (enabling permalinks and ToC/inventory entries).
34+
- Render cross-references for default parameter values in signatures.
35+
536
### 1.5.1 <small>September 12, 2023</small> { id="1.5.1" }
637

738
- Prevent empty auto-summarized Methods section.

docs/insiders/goals.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,29 @@ goals:
1616
since: 2023/08/20
1717
- name: Automatic rendering of function signature overloads
1818
since: 2023/09/05
19+
- name: Parameter headings
20+
ref: /usage/configuration/headings/#parameter_headings
21+
since: 2024/01/30
22+
- name: Automatic cross-references to parameters
23+
ref: /usage/configuration/headings/#parameter_headings
24+
since: 2024/01/30
25+
- name: Automatic cross-references for default parameter values in signatures
26+
since: 2024/01/30
1927
1500:
2028
name: HyperLamp Navigation Tips
21-
features: []
29+
features:
30+
- name: Class inheritance diagrams with Mermaid
31+
ref: /usage/configuration/general/#show_inheritance_diagram
32+
since: 2024/03/24
33+
- name: Annotations modernization
34+
ref: /usage/configuration/signatures/#modernize_annotations
35+
since: 2024/03/24
2236
2000:
2337
name: FusionDrive Ejection Configuration
24-
features: []
38+
features:
39+
- name: Relative cross-references
40+
ref: /usage/configuration/docstrings/#relative_crossrefs
41+
since: 2024/09/03
42+
- name: Scoped cross-references
43+
ref: /usage/configuration/docstrings/#scoped_crossrefs
44+
since: 2024/09/03

docs/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
"default": false
146146
},
147147
"separate_signature": {
148-
"title": "Whether to put the whole signature in a code block below the heading. If Black is installed, the signature is also formatted using it.",
148+
"title": "Whether to put the whole signature in a code block below the heading. If a formatter (Black or Ruff) is installed, the signature is also formatted using it.",
149149
"markdownDescription": "https://mkdocstrings.github.io/python/usage/configuration/signatures/#separate_signature",
150150
"type": "boolean",
151151
"default": false

docs/snippets/package/__init__.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from importlib import metadata
2+
3+
def get_version(dist: str = "mkdocstrings-python") -> str:
4+
"""Get version of the given distribution.
5+
6+
Parameters:
7+
dist: A distribution name.
8+
9+
Returns:
10+
A version number.
11+
"""
12+
try:
13+
return metadata.version(dist)
14+
except metadata.PackageNotFoundError:
15+
return "0.0.0"
16+
17+
18+
current_version: str = get_version(dist="mkdocstrings-python")
19+
"""Current package version."""

docs/snippets/package/modern.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from typing import Optional, Union, List
2+
3+
example: Optional[Union[int, List[int]]] = None

0 commit comments

Comments
 (0)