Skip to content

Commit 831ac51

Browse files
committed
docs: Format Markdown
1 parent 8afd3db commit 831ac51

23 files changed

+263
-598
lines changed

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ There are multiple ways to contribute to this project:
1212

1313
For easy documentation fixes, you can edit a file and send a pull request [directly from the GitHub web interface](https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files#editing-files-in-another-users-repository). For more complex fixes or improvements, please read our contributor guide. The guide will show you how to setup a development environment to run tests or serve the documentation locally.
1414

15-
[:fontawesome-solid-helmet-safety: Contributor guide](guide/contributors.md){ .md-button }
15+
[:fontawesome-solid-helmet-safety: Contributor guide](guide/contributors.md){ .md-button }

docs/downstream-projects.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Griffe is used by various projects in the Python ecosystem.
44

55
## griffe2md
66

7-
[griffe2md](https://mkdocstrings.github.io/griffe2md/) outputs API docs in Markdown. It uses Griffe to load the data, and then use Jinja templates to render documentation in Markdown, just like [mkdocstrings-python](https://mkdocstrings.github.io/python/), but in Markdown instead of HTML.
7+
[griffe2md](https://mkdocstrings.github.io/griffe2md/) outputs API docs in Markdown. It uses Griffe to load the data, and then use Jinja templates to render documentation in Markdown, just like [mkdocstrings-python](https://mkdocstrings.github.io/python/), but in Markdown instead of HTML.
88

99
## Griffe TUI
1010

@@ -14,7 +14,7 @@ Griffe is used by various projects in the Python ecosystem.
1414

1515
## quartodoc
1616

17-
[quartodoc](https://machow.github.io/quartodoc/) lets you quickly generate Python package API reference documentation using Markdown and [Quarto](https://quarto.org/). quartodoc is designed as an alternative to [Sphinx](https://www.sphinx-doc.org/en/master/). It uses Griffe to load API data and parse docstrings in order to render HTML documentation, just like [mkdocstrings-python](https://mkdocstrings.github.io/python/), but for Quarto instead of Mkdocs.
17+
[quartodoc](https://machow.github.io/quartodoc/) lets you quickly generate Python package API reference documentation using Markdown and [Quarto](https://quarto.org/). quartodoc is designed as an alternative to [Sphinx](https://www.sphinx-doc.org/en/master/). It uses Griffe to load API data and parse docstrings in order to render HTML documentation, just like [mkdocstrings-python](https://mkdocstrings.github.io/python/), but for Quarto instead of Mkdocs.
1818

1919
## pydanclick
2020

@@ -26,4 +26,4 @@ Griffe is used by various projects in the Python ecosystem.
2626

2727
## Yapper
2828

29-
[Yapper](https://pypi.org/project/yapper/) converts Python docstrings to `astro` files for use by the [Astro](https://astro.build/) static site generator. It uses Griffe to parse Python modules and extracts Numpydoc-style docstrings.
29+
[Yapper](https://pypi.org/project/yapper/) converts Python docstrings to `astro` files for use by the [Astro](https://astro.build/) static site generator. It uses Griffe to parse Python modules and extracts Numpydoc-style docstrings.

docs/extensions/official/autodocstringstyle.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@
1010
---
1111

1212
This extension sets the docstring parser to `auto` for all the docstrings of external packages. Packages are considered "external" when their sources are found in a virtual environment instead of a folder under the current working directory. Setting their docstring style to `auto` is useful if you plan on rendering the docstring of these objects in your own documentation.
13-

docs/extensions/official/sphinx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ Trailing comments are not supported:
3535

3636
```python
3737
module_attr #: This is not supported.
38-
```
38+
```

docs/extensions/official/typingdoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
---
99

10-
This extension reads docstrings for parameters, return values and more from type annotation using [`Annotated`][typing.Annotated] and the [`Doc`][typing_extensions.Doc] class suggested in [PEP 727](https://peps.python.org/pep-0727/). Documenting parameters and return values this way makes it possible to completely avoid relying on a particular "docstring style" (Google, Numpydoc, Sphinx, etc.) and just use plain markup in module/classes/function docstrings. Docstrings therefore do not have to be parsed at all.
10+
This extension reads docstrings for parameters, return values and more from type annotation using [`Annotated`][typing.Annotated] and the [`Doc`][typing_extensions.Doc] class suggested in [PEP 727](https://peps.python.org/pep-0727/). Documenting parameters and return values this way makes it possible to completely avoid relying on a particular "docstring style" (Google, Numpydoc, Sphinx, etc.) and just use plain markup in module/classes/function docstrings. Docstrings therefore do not have to be parsed at all.
1111

1212
```python
1313
from typing import Annotated as An

docs/guide/contributors/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Sources are located in the `src` folder, following the [src-layout](https://pack
104104

105105
Our test suite is located in the `tests` folder. It is located outside of the sources as to not pollute distributions (it would be very wrong to publish a `tests` package as part of our distributions, since this name is extremely common), or worse, the public API. The `tests` folder is however included in our source distributions (`.tar.gz`), alongside most of our metadata and configuration files. Check out `pyproject.toml` to get the full list of files included in our source distributions.
106106

107-
The test suite is based on [pytest](https://docs.pytest.org/en/8.2.x/). Test modules reflect our internal API structure, and except for a few test modules that test specific aspects of our API, each test module tests the logic from the corresponding module in the internal API. For example, `test_finder.py` tests code of the `_griffe.finder` internal module, while `test_functions` tests our ability to extract correct information from function signatures, statically. The general rule of thumb when writing new tests is to mirror the internal API. If a test touches to many aspects of the loading process, it can be added to the `test_loader` test module.
107+
The test suite is based on [pytest](https://docs.pytest.org/en/8.2.x/). Test modules reflect our internal API structure, and except for a few test modules that test specific aspects of our API, each test module tests the logic from the corresponding module in the internal API. For example, `test_finder.py` tests code of the `_griffe.finder` internal module, while `test_functions` tests our ability to extract correct information from function signatures, statically. The general rule of thumb when writing new tests is to mirror the internal API. If a test touches to many aspects of the loading process, it can be added to the `test_loader` test module.
108108

109109
## Program structure
110110

docs/guide/contributors/commands.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Management commands
32

43
The entry-point to run commands to manage the project is our Python `make` script, located in the `scripts` folder. You can either call it directly with `./scripts/make`, or you can use [direnv](https://direnv.net/) to add the script to your command line path. Once direnv is installed and hooked into your shell, allow it once for this directory with `direnv allow`. Now you can directly call the Python script with `make`. The `Makefile` is just here to provide auto-completion.

docs/guide/contributors/setup.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ To work on the project, whether to update the code or the documentation, you wil
77
The only requirement is that you have [Python](https://www.python.org/) and [uv](https://github.com/astral-sh/uv) installed and available on your command line path.
88

99
=== ":simple-python: pip"
10-
1110
```bash
1211
pip install --user uv
1312
```
1413

1514
<div class="result" markdown>
1615

1716
[pip](https://pip.pypa.io/en/stable/) is the main package installer for Python.
18-
17+
1918
</div>
2019

2120
=== ":simple-pipx: pipx"
22-
2321
```bash
2422
pipx install uv
2523
```
@@ -31,7 +29,6 @@ The only requirement is that you have [Python](https://www.python.org/) and [uv]
3129
</div>
3230

3331
=== ":simple-rye: rye"
34-
3532
```bash
3633
rye install uv
3734
```
@@ -49,7 +46,6 @@ Optionally, we recommend using [direnv](https://direnv.net/), which will add our
4946
[Fork the repository on GitHub](https://github.com/mkdocstrings/griffe/fork), then clone it locally:
5047

5148
=== "GitHub CLI"
52-
5349
```bash
5450
gh repo clone griffe
5551
```
@@ -61,7 +57,6 @@ Optionally, we recommend using [direnv](https://direnv.net/), which will add our
6157
</div>
6258

6359
=== "Git + SSH"
64-
6560
```bash
6661
git clone [email protected]:your-username/griffe
6762
```
@@ -73,7 +68,6 @@ Optionally, we recommend using [direnv](https://direnv.net/), which will add our
7368
</div>
7469

7570
=== "Git + HTTPS"
76-
7771
```bash
7872
git clone https://github.com/your-username/griffe
7973
```

docs/guide/contributors/workflow.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@ The development worklow is rather usual.
99
**For a new feature:**
1010

1111
1. create a new branch: `git switch -c feat-summary`
12-
1. edit the code and the documentation
13-
1. write new tests
12+
2. edit the code and the documentation
13+
3. write new tests
1414

1515
**For a bug fix:**
1616

1717
1. create a new branch: `git switch -c fix-summary`
18-
1. write tests that fail but are expected to pass once the bug is fixed
19-
1. run [`make test`][task-test] to make sure the new tests fail
20-
1. fix the code
18+
2. write tests that fail but are expected to pass once the bug is fixed
19+
3. run [`make test`][task-test] to make sure the new tests fail
20+
4. fix the code
2121

2222
**For a docs update:**
2323

2424
<div class="annotate" markdown>
2525

2626
1. create a new branch: `git switch -c docs-summary`
27-
1. start the live reloading server: `make docs` (1)
28-
1. update the documentation
29-
1. preview changes at http://localhost:8000
27+
2. start the live reloading server: `make docs` (1)
28+
3. update the documentation
29+
4. preview changes at http://localhost:8000
3030

3131
</div>
3232

@@ -35,15 +35,15 @@ The development worklow is rather usual.
3535
**Before committing:**
3636

3737
1. run [`make format`][task-format] to auto-format the code
38-
1. run [`make check`][task-check] to check everything (fix any warning)
39-
1. run [`make test`][task-test] to run the tests (fix any issue)
40-
1. if you updated the documentation or the project dependencies:
38+
2. run [`make check`][task-check] to check everything (fix any warning)
39+
3. run [`make test`][task-test] to run the tests (fix any issue)
40+
4. if you updated the documentation or the project dependencies:
4141
1. run [`make docs`][task-docs]
42-
1. go to http://localhost:8000 and check that everything looks good
42+
2. go to http://localhost:8000 and check that everything looks good
4343

4444
Once you are ready to commit, follow our [commit message convention](#commit-message-convention).
4545

46-
NOTE: **Occasional contributors**
46+
NOTE: **Occasional contributors**
4747
If you are unsure about how to fix or ignore a warning, just let the continuous integration fail, and we will help you during review. Don't bother updating the changelog, we will take care of this.
4848

4949
## Breaking changes and deprecations
@@ -72,7 +72,7 @@ except ImportError:
7272

7373
Check [Yore's docs](https://pawamoy.github.io/yore/), and Yore-comments in our own code base (`git grep -A1 YORE`) to learn how to use it.
7474

75-
NOTE: **Occasional contributors**
75+
NOTE: **Occasional contributors**
7676
If you are unsure about how to deprecate something or mark legacy code, let us do it during review.
7777

7878
## Commit message convention
@@ -114,11 +114,11 @@ Issue-10: https://github.com/namespace/project/issues/10
114114
Related-to-PR-namespace/other-project#15: https://github.com/namespace/other-project/pull/15
115115
```
116116

117-
These "trailers" must appear at the end of the body, without any blank lines between them. The trailer title can contain any character except colons `:`. We expect a full URI for each trailer, not just GitHub autolinks (for example, full GitHub URLs for commits and issues, not the hash or the #issue-number).
117+
These "trailers" must appear at the end of the body, without any blank lines between them. The trailer title can contain any character except colons `:`. We expect a full URI for each trailer, not just GitHub autolinks (for example, full GitHub URLs for commits and issues, not the hash or the #issue-number).
118118

119119
We do not enforce a line length on commit messages summary and body.
120120

121-
NOTE: **Occasional contributors**
121+
NOTE: **Occasional contributors**
122122
If this convention seems unclear to you, just write the message of your choice, and we will rewrite it ourselves before merging.
123123

124124
## Pull requests guidelines
@@ -144,7 +144,7 @@ And force-push:
144144
git push -f
145145
```
146146

147-
NOTE: **Occasional contributors**
147+
NOTE: **Occasional contributors**
148148
If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.
149149

150150
## Release process
@@ -162,4 +162,4 @@ Once the changelog is updated, maintainers should review the new version entry,
162162

163163
Once the changelog is ready, a new release can be made with [`make release`][task-release]. If the version wasn't passed on the command-line with `make release version=x.x.x`, the task will prompt you for it. **Use the same version as the one that was just added to the changelog.** For example if the new version added to the changelog is `7.8.9`, use `make release version=7.8.9`.
164164

165-
The [release task][task-release] will stage the changelog, commit, tag, push, then build distributions and upload them to PyPI.org, and finally deploy the documentation. If any of these steps fail, you can manually run each step with Git commands, then [`make build`][task-build], [`make publish`][task-publish] and [`make docs-deploy`][task-docs-deploy].
165+
The [release task][task-release] will stage the changelog, commit, tag, push, then build distributions and upload them to PyPI.org, and finally deploy the documentation. If any of these steps fail, you can manually run each step with Git commands, then [`make build`][task-build], [`make publish`][task-publish] and [`make docs-deploy`][task-docs-deploy].

docs/guide/users.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,39 @@ The following topics will guide you through the various methods Griffe offers fo
88

99
<div class="grid cards" markdown>
1010

11-
- :material-cube-scan:{ .lg .middle } **Loading**
11+
- :material-cube-scan:{ .lg .middle } **Loading**
1212

1313
---
1414

1515
Griffe can find packages and modules to scan them statically or dynamically and extract API-related information.
1616

1717
[:octicons-arrow-right-24: Learn how to load data](users/loading.md)
1818

19-
- :material-navigation-variant-outline:{ .lg .middle } **Navigating**
19+
- :material-navigation-variant-outline:{ .lg .middle } **Navigating**
2020

2121
---
2222

2323
Griffe exposes the extracted API information into data models, making it easy to navigate your API.
2424

2525
[:octicons-arrow-right-24: Learn how to navigate data](users/navigating.md)
2626

27-
- :material-code-json:{ .lg .middle } **Serializing**
27+
- :material-code-json:{ .lg .middle } **Serializing**
2828

2929
---
3030

3131
Griffe can serialize your API data into JSON, for other tools to navigate or manipulate it.
3232

3333
[:octicons-arrow-right-24: Learn how to serialize data](users/serializing.md)
3434

35-
- :material-target:{ .lg .middle } **Checking**
35+
- :material-target:{ .lg .middle } **Checking**
3636

3737
---
3838

3939
Griffe can compare snapshots of the same API to find breaking changes.
4040

4141
[:octicons-arrow-right-24: Learn how to detect and handle breaking changes](users/checking.md)
4242

43-
- :material-puzzle-plus:{ .lg .middle } **Extending**
43+
- :material-puzzle-plus:{ .lg .middle } **Extending**
4444

4545
---
4646

@@ -56,23 +56,23 @@ These topics explore the user side: how to write code to better integrate with G
5656

5757
<div class="grid cards" markdown>
5858

59-
- :material-gift-open:{ .lg .middle } **Public API**
59+
- :material-gift-open:{ .lg .middle } **Public API**
6060

6161
---
6262

6363
See our recommendations for exposing public APIs to your users.
6464

6565
[:octicons-arrow-right-24: See our public API recommendations](users/recommendations/public-apis.md)
6666

67-
- :material-star-face:{ .lg .middle } **Python code best practices**
67+
- :material-star-face:{ .lg .middle } **Python code best practices**
6868

6969
---
7070

7171
See our best practices for writing Python code.
7272

7373
[:octicons-arrow-right-24: See our best practices](users/recommendations/python-code.md)
7474

75-
- :material-text:{ .lg .middle } **Docstrings**
75+
- :material-text:{ .lg .middle } **Docstrings**
7676

7777
---
7878

0 commit comments

Comments
 (0)