Skip to content

Commit 99624f1

Browse files
authored
Add relnotes directive to docs (#172)
1 parent a3907ed commit 99624f1

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

docs/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Included extensions
1313
definition_list_typed_field
1414
elegant_typehints
1515
rtd_github_links
16+
release_notes
1617
theme
1718

1819
.. hidden deprecated extension(s):

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ test = [
3333
'defusedxml', # sphinx[test] would also pull in cython
3434
]
3535
doc = [
36-
'scanpydoc[typehints,theme]',
36+
'scanpydoc[typehints,myst,theme]',
3737
'sphinx',
3838
'readthedocs-sphinx-search',
3939
]
@@ -100,6 +100,7 @@ python = '3.11'
100100
features = ['doc']
101101
[tool.hatch.envs.docs.scripts]
102102
build = 'sphinx-build -M html docs docs/_build'
103+
clean = 'git clean -fdX docs'
103104

104105
[tool.hatch.envs.hatch-test]
105106
features = ['test', 'typehints', 'myst']

src/scanpydoc/release_notes.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
.. release-notes:: .
99
10-
With e.g. the files `1.2.0.md`, `1.2.1.md`, `1.3.0.rst`, and `1.3.2.rst`,
10+
With e.g. the files :file:`1.2.0.md`, :file:`1.2.1.md`, and :file:`1.3.0.rst`,
1111
this will render like the following:
1212
1313
.. code:: restructuredtext
@@ -17,9 +17,9 @@
1717
Version 1.3
1818
===========
1919
20-
.. include:: 1.3.2.rst
2120
.. include:: 1.3.0.rst
2221
22+
2323
_v1.2:
2424
2525
Version 1.2
@@ -182,6 +182,6 @@ def run(self) -> Sequence[nodes.Node]:
182182

183183
@_setup_sig
184184
def setup(app: Sphinx) -> dict[str, Any]:
185-
"""Add the `release-notes` directive."""
185+
"""Add the ``release-notes`` directive."""
186186
app.add_directive("release-notes", ReleaseNotes)
187187
return metadata

0 commit comments

Comments
 (0)