Skip to content

Commit ae9a5c2

Browse files
committed
chore: Template upgrade
1 parent 9c7e304 commit ae9a5c2

File tree

19 files changed

+362
-493
lines changed

19 files changed

+362
-493
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: 0.3.1
2+
_commit: 1.1.1
33
_src_path: gh:mkdocstrings/handler-template
44
author_email: [email protected]
55
author_fullname: Timothée Mazzucotelli

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
github: pawamoy
22
ko_fi: pawamoy
3+
polar: pawamoy
34
custom:
45
- https://www.paypal.me/pawamoy

.github/workflows/ci.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ jobs:
4949
- name: Check if the code is correctly typed
5050
run: make check-types
5151

52-
- name: Check for vulnerabilities in dependencies
53-
run: make check-dependencies
54-
5552
- name: Check for breaking changes in the API
5653
run: make check-api
5754

@@ -69,10 +66,14 @@ jobs:
6966
{"python-version": "3.9"},
7067
{"python-version": "3.10"},
7168
{"python-version": "3.11"},
72-
{"python-version": "3.12"}
69+
{"python-version": "3.12"},
70+
{"python-version": "3.13"}
7371
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
7472
else
75-
echo 'jobs=[]' >> $GITHUB_OUTPUT
73+
echo 'jobs=[
74+
{"os": "macos-latest", "resolution": "lowest-direct"},
75+
{"os": "windows-latest", "resolution": "lowest-direct"}
76+
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
7677
fi
7778
7879
tests:
@@ -91,9 +92,13 @@ jobs:
9192
- "3.10"
9293
- "3.11"
9394
- "3.12"
95+
- "3.13"
96+
resolution:
97+
- highest
98+
- lowest-direct
9499
exclude: ${{ fromJSON(needs.exclude-test-jobs.outputs.jobs) }}
95100
runs-on: ${{ matrix.os }}
96-
continue-on-error: ${{ matrix.python-version == '3.12' }}
101+
continue-on-error: ${{ matrix.python-version == '3.13' }}
97102

98103
steps:
99104
- name: Checkout
@@ -109,10 +114,9 @@ jobs:
109114
run: pip install uv
110115

111116
- name: Install dependencies
112-
run: |
113-
uv venv
114-
uv pip install -r devdeps.txt
115-
uv pip install "mkdocstrings-python @ ."
117+
env:
118+
UV_RESOLUTION: ${{ matrix.resolution }}
119+
run: make setup
116120

117121
- name: Run the test suite
118122
run: make test

.gitignore

+17-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
1+
# editors
12
.idea/
23
.vscode/
3-
__pycache__/
4-
*.py[cod]
5-
dist/
4+
5+
# python
66
*.egg-info/
7-
build/
8-
htmlcov/
7+
*.py[cod]
8+
.venv/
9+
.venvs/
10+
/build/
11+
/dist/
12+
13+
# tools
914
.coverage*
10-
pip-wheel-metadata/
15+
/.pdm-build/
16+
/htmlcov/
17+
/site/
18+
19+
# cache
20+
.cache/
1121
.pytest_cache/
1222
.mypy_cache/
1323
.ruff_cache/
14-
site/
15-
.venv/
16-
.venvs/
17-
.cache/
24+
__pycache__/

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# This Makefile is just here to allow auto-completion in the terminal.
44

55
actions = \
6+
allrun \
67
changelog \
78
check \
89
check-api \
9-
check-dependencies \
1010
check-docs \
1111
check-quality \
1212
check-types \
@@ -16,6 +16,7 @@ actions = \
1616
docs-deploy \
1717
format \
1818
help \
19+
multirun \
1920
release \
2021
run \
2122
setup \

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<p align="center">A Python handler for <a href="https://github.com/mkdocstrings/mkdocstrings"><i>mkdocstrings</i></a>.</p>
44

55
[![ci](https://github.com/mkdocstrings/python/workflows/ci/badge.svg)](https://github.com/mkdocstrings/python/actions?query=workflow%3Aci)
6-
[![documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://mkdocstrings.github.io/python/)
6+
[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mkdocstrings.github.io/python/)
77
[![pypi version](https://img.shields.io/pypi/v/mkdocstrings-python.svg)](https://pypi.org/project/mkdocstrings-python/)
8-
[![gitpod](https://img.shields.io/badge/gitpod-workspace-blue.svg?style=flat)](https://gitpod.io/#https://github.com/mkdocstrings/python)
8+
[![gitpod](https://img.shields.io/badge/gitpod-workspace-708FCC.svg?style=flat)](https://gitpod.io/#https://github.com/mkdocstrings/python)
99
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#python:gitter.im)
1010

1111
---

config/git-changelog.toml

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ parse-refs = false
66
parse-trailers = true
77
sections = ["build", "deps", "feat", "fix", "refactor"]
88
template = "keepachangelog"
9+
versioning = "pep440"

config/pytest.ini

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[pytest]
22
python_files =
33
test_*.py
4-
*_test.py
5-
tests.py
64
addopts =
75
--cov
86
--cov-config config/coverage.ini

config/ruff.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ line-length = 120
33

44
[lint]
55
exclude = [
6-
"fixtures",
7-
"site",
6+
"tests/fixtures/*.py",
87
]
98
select = [
109
"A", "ANN", "ARG",
@@ -78,5 +77,8 @@ known-first-party = ["mkdocstrings_handlers.python"]
7877
convention = "google"
7978

8079
[format]
80+
exclude = [
81+
"tests/fixtures/*.py",
82+
]
8183
docstring-code-format = true
8284
docstring-code-line-length = 80

config/vscode/tasks.json

-6
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@
3131
"command": "scripts/make",
3232
"args": ["check-docs"]
3333
},
34-
{
35-
"label": "check-dependencies",
36-
"type": "process",
37-
"command": "scripts/make",
38-
"args": ["check-dependencies"]
39-
},
4034
{
4135
"label": "check-api",
4236
"type": "process",

devdeps.txt

+28-23
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
1-
build>=1.0
2-
duty>=0.10
3-
black>=23.9
4-
markdown-callouts>=0.3
5-
markdown-exec>=1.7
6-
mkdocs>=1.5
1+
# dev
2+
editables>=0.5
3+
4+
# maintenance
5+
build>=1.2
6+
git-changelog>=2.5
7+
twine>=5.1; python_version < '3.13'
8+
9+
# ci
10+
duty>=1.4
11+
ruff>=0.4
12+
pytest>=8.2
13+
pytest-cov>=5.0
14+
pytest-randomly>=3.15
15+
pytest-xdist>=3.6
16+
mypy>=1.10
17+
types-markdown>=3.6
18+
types-pyyaml>=6.0
19+
20+
# docs
21+
black>=24.4
22+
markdown-callouts>=0.4
23+
markdown-exec>=1.8
24+
mkdocs>=1.6
725
mkdocs-coverage>=1.0
826
mkdocs-gen-files>=0.5
9-
mkdocs-git-committers-plugin-2>=1.2
27+
mkdocs-git-committers-plugin-2>=2.3
1028
mkdocs-literate-nav>=0.6
11-
mkdocs-material>=9.4
12-
mkdocs-minify-plugin>=0.7
13-
mkdocstrings[python]>=0.23
29+
mkdocs-material>=9.5
30+
mkdocs-minify-plugin>=0.8
31+
mkdocstrings[python]>=0.25
1432
tomli>=2.0; python_version < '3.11'
15-
black>=23.9
16-
blacken-docs>=1.16
17-
git-changelog>=2.3
18-
ruff>=0.0
19-
pytest>=7.4
20-
pytest-cov>=4.1
21-
pytest-randomly>=3.15
22-
pytest-xdist>=3.3
23-
mypy>=1.5
24-
types-markdown>=3.5
25-
types-pyyaml>=6.0
26-
safety>=2.3
27-
twine>=5.0

docs/insiders/installation.md

+6-118
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ of Insiders projects in the PyPI index of your choice
2323
See [how to install it](https://pawamoy.github.io/pypi-insiders/#installation)
2424
and [how to use it](https://pawamoy.github.io/pypi-insiders/#usage).
2525

26+
**We kindly ask that you do not upload the distributions to public registries,
27+
as it is against our [Terms of use](index.md#terms).**
28+
2629
### with pip (ssh/https)
2730

2831
*mkdocstrings-python Insiders* can be installed with `pip` [using SSH][using ssh]:
@@ -58,130 +61,15 @@ pip install git+https://${GH_TOKEN}@github.com/pawamoy-insiders/mkdocstrings-pyt
5861
> token must be kept secret at all times, as it allows the owner to access your
5962
> private repositories.
6063
61-
### with pip (self-hosted)
62-
63-
Self-hosting the Insiders package makes it possible to depend on *mkdocstrings-python* normally,
64-
while transparently downloading and installing the Insiders version locally.
65-
It means that you can specify your dependencies normally, and your contributors without access
66-
to Insiders will get the public version, while you get the Insiders version on your machine.
67-
68-
WARNING: **Limitation**
69-
With this method, there is no way to force the installation of an Insiders version
70-
rather than a public version. If there is a public version that is more recent
71-
than your self-hosted Insiders version, the public version will take precedence.
72-
Remember to regularly update your self-hosted versions by uploading latest distributions.
73-
74-
You can build the distributions for Insiders yourself, by cloning the repository
75-
and using [build] to build the distributions,
76-
or you can download them from our [GitHub Releases].
77-
You can upload these distributions to a private PyPI-like registry
78-
([Artifactory], [Google Cloud], [pypiserver], etc.)
79-
with [Twine]:
80-
81-
[build]: https://pypi.org/project/build/
82-
[Artifactory]: https://jfrog.com/help/r/jfrog-artifactory-documentation/pypi-repositories
83-
[Google Cloud]: https://cloud.google.com/artifact-registry/docs/python
84-
[pypiserver]: https://pypi.org/project/pypiserver/
85-
[Github Releases]: https://github.com/pawamoy-insiders/mkdocstrings-python/releases
86-
[Twine]: https://pypi.org/project/twine/
87-
88-
```bash
89-
# download distributions in ~/dists, then upload with:
90-
twine upload --repository-url https://your-private-index.com ~/dists/*
91-
```
92-
93-
<small>You might also need to provide a username and password/token to authenticate against the registry.
94-
Please check [Twine's documentation][twine docs].</small>
95-
96-
[twine docs]: https://twine.readthedocs.io/en/stable/
97-
98-
You can then configure pip (or other tools) to look for packages into your package index.
99-
For example, with pip:
100-
101-
```bash
102-
pip config set global.extra-index-url https://your-private-index.com/simple
103-
```
104-
105-
Note that the URL might differ depending on whether your are uploading a package (with Twine)
106-
or installing a package (with pip), and depending on the registry you are using (Artifactory, Google Cloud, etc.).
107-
Please check the documentation of your registry to learn how to configure your environment.
108-
109-
**We kindly ask that you do not upload the distributions to public registries,
110-
as it is against our [Terms of use](index.md#terms).**
64+
### with Git
11165

112-
>? TIP: **Full example with `pypiserver`**
113-
> In this example we use [pypiserver] to serve a local PyPI index.
114-
>
115-
> ```bash
116-
> pip install --user pypiserver
117-
> # or pipx install pypiserver
118-
>
119-
> # create a packages directory
120-
> mkdir -p ~/.local/pypiserver/packages
121-
>
122-
> # run the pypi server without authentication
123-
> pypi-server run -p 8080 -a . -P . ~/.local/pypiserver/packages &
124-
> ```
125-
>
126-
> We can configure the credentials to access the server in [`~/.pypirc`][pypirc]:
127-
>
128-
> [pypirc]: https://packaging.python.org/en/latest/specifications/pypirc/
129-
>
130-
> ```ini title=".pypirc"
131-
> [distutils]
132-
> index-servers =
133-
> local
134-
>
135-
> [local]
136-
> repository: http://localhost:8080
137-
> username:
138-
> password:
139-
> ```
140-
>
141-
> We then clone the Insiders repository, build distributions and upload them to our local server:
142-
>
143-
> ```bash
144-
> # clone the repository
145-
> git clone [email protected]:pawamoy-insiders/mkdocstrings-python
146-
> cd mkdocstrings-python
147-
>
148-
> # install build
149-
> pip install --user build
150-
> # or pipx install build
151-
>
152-
> # checkout latest tag
153-
> git checkout $(git describe --tags --abbrev=0)
154-
>
155-
> # build the distributions
156-
> pyproject-build
157-
>
158-
> # upload them to our local server
159-
> twine upload -r local dist/* --skip-existing
160-
> ```
161-
>
162-
> Finally, we configure pip, and for example [PDM][pdm], to use our local index to find packages:
163-
>
164-
> ```bash
165-
> pip config set global.extra-index-url http://localhost:8080/simple
166-
> pdm config pypi.extra.url http://localhost:8080/simple
167-
> ```
168-
>
169-
> [pdm]: https://pdm.fming.dev/latest/
170-
>
171-
> Now when running `pip install mkdocstrings-python`,
172-
> or resolving dependencies with PDM,
173-
> both tools will look into our local index and find the Insiders version.
174-
> **Remember to update your local index regularly!**
175-
176-
### with git
177-
178-
Of course, you can use *mkdocstrings-python Insiders* directly from `git`:
66+
Of course, you can use *mkdocstrings-python Insiders* directly using Git:
17967

18068
```
18169
git clone [email protected]:pawamoy-insiders/mkdocstrings-python
18270
```
18371

184-
When cloning from `git`, the package must be installed:
72+
When cloning with Git, the package must be installed:
18573

18674
```
18775
pip install -e mkdocstrings-python

0 commit comments

Comments
 (0)