Skip to content

Commit 1b51a93

Browse files
authored
Merge pull request #65 from git-pull/doc-redesign-spring-2026
docs(redesign): restructure documentation to Library Skeleton pattern
2 parents 00a7da8 + 2cccb9f commit 1b51a93

File tree

11 files changed

+268
-206
lines changed

11 files changed

+268
-206
lines changed

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@
3939
"sphinx_copybutton",
4040
"sphinxext.opengraph",
4141
"sphinxext.rediraffe",
42+
"sphinx_design",
4243
"myst_parser",
4344
"linkify_issues",
4445
]
46+
myst_heading_anchors = 4
4547
myst_enable_extensions = [
4648
"colon_fence",
4749
"substitution",

docs/developing.md

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

docs/doctest/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55

66
Built on {mod}`doctest`.
77

8+
::::{grid} 1 1 2 2
9+
:gutter: 2 2 3 3
10+
11+
:::{grid-item-card} pytest plugin
12+
:link: pytest
13+
:link-type: doc
14+
Run doctests in `.rst` and `.md` files via pytest.
15+
:::
16+
17+
::::
18+
819
:::{note}
920

1021
Before you begin, acquaint yourself with:

docs/index.md

Lines changed: 57 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,70 @@
11
(index)=
22

3-
```{include} ../README.md
3+
# gp-libs
44

5+
Test and documentation utilities for [git-pull](https://github.com/git-pull) projects.
6+
7+
::::{grid} 1 1 2 2
8+
:gutter: 2 2 3 3
9+
10+
:::{grid-item-card} Quickstart
11+
:link: quickstart
12+
:link-type: doc
13+
Install and get started in minutes.
14+
:::
15+
16+
:::{grid-item-card} doctest_docutils
17+
:link: doctest/index
18+
:link-type: doc
19+
Run doctests in reStructuredText and Markdown files.
20+
:::
21+
22+
:::{grid-item-card} linkify_issues
23+
:link: linkify_issues/index
24+
:link-type: doc
25+
Automatically link `#123` to GitHub issues in Sphinx docs.
26+
:::
27+
28+
:::{grid-item-card} Contributing
29+
:link: project/index
30+
:link-type: doc
31+
Development setup, code style, release process.
32+
:::
33+
34+
::::
35+
36+
## Install
37+
38+
```console
39+
$ pip install gp-libs
540
```
641

7-
```{toctree}
8-
:hidden:
42+
```console
43+
$ uv add gp-libs
44+
```
945

10-
quickstart
11-
doctest/index
12-
linkify_issues/index
46+
## At a glance
47+
48+
Run doctests in Markdown and reStructuredText files:
49+
50+
```console
51+
$ python -m doctest_docutils README.md -v
52+
```
53+
54+
Auto-link issue references in Sphinx documentation:
55+
56+
```python
57+
# conf.py
58+
extensions = ["linkify_issues"]
59+
issue_url_tpl = "https://github.com/myorg/myrepo/issues/{issue_id}"
1360
```
1461

1562
```{toctree}
16-
:caption: Project
1763
:hidden:
1864
19-
developing
65+
quickstart
66+
doctest/index
67+
linkify_issues/index
68+
project/index
2069
history
21-
GitHub <https://github.com/git-pull/gp-libs>
2270
```

docs/project/code-style.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Code Style
2+
3+
## Formatting
4+
5+
gp-libs uses [ruff](https://github.com/astral-sh/ruff) for both linting and formatting.
6+
7+
```console
8+
$ uv run ruff format .
9+
```
10+
11+
```console
12+
$ uv run ruff check . --fix --show-fixes
13+
```
14+
15+
## Type Checking
16+
17+
Strict [mypy](https://mypy-lang.org/) is enforced across `src/` and `tests/`.
18+
19+
```console
20+
$ uv run mypy .
21+
```
22+
23+
## Docstrings
24+
25+
Follow [NumPy docstring style](https://numpydoc.readthedocs.io/en/latest/format.html)
26+
for all public functions, methods, and classes.

docs/project/contributing.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Contributing
2+
3+
Install [git] and [uv].
4+
5+
Clone:
6+
7+
```console
8+
$ git clone https://github.com/git-pull/gp-libs.git
9+
```
10+
11+
```console
12+
$ cd gp-libs
13+
```
14+
15+
Install packages:
16+
17+
```console
18+
$ uv sync --all-extras --dev
19+
```
20+
21+
## Tests
22+
23+
```console
24+
$ uv run py.test
25+
```
26+
27+
### Automatically run tests on file save
28+
29+
1. `make start` (via [pytest-watcher])
30+
2. `make watch_test` (requires installing [entr(1)])
31+
32+
[pytest-watcher]: https://github.com/olzhasar/pytest-watcher
33+
34+
## Documentation
35+
36+
Default preview server: http://localhost:8034
37+
38+
[sphinx-autobuild] will automatically build the docs, watch for file changes and launch a server.
39+
40+
From home directory: `make start_docs`
41+
From inside `docs/`: `make start`
42+
43+
[sphinx-autobuild]: https://github.com/executablebooks/sphinx-autobuild
44+
45+
### Manual documentation (the hard way)
46+
47+
`cd docs/` and `make html` to build. `make serve` to start http server.
48+
49+
Helpers:
50+
`make build_docs`, `make serve_docs`
51+
52+
Rebuild docs on file change: `make watch_docs` (requires [entr(1)])
53+
54+
Rebuild docs and run server via one terminal: `make dev_docs` (requires above, and a
55+
`make(1)` with `-J` support, e.g. GNU Make)
56+
57+
[git]: https://git-scm.com/
58+
[uv]: https://github.com/astral-sh/uv
59+
[entr(1)]: http://eradman.com/entrproject/
60+
[`entr(1)`]: http://eradman.com/entrproject/

0 commit comments

Comments
 (0)