Skip to content

Commit

Permalink
Add relnotes directive to docs (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Sep 13, 2024
1 parent a3907ed commit 99624f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Included extensions
definition_list_typed_field
elegant_typehints
rtd_github_links
release_notes
theme

.. hidden deprecated extension(s):
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test = [
'defusedxml', # sphinx[test] would also pull in cython
]
doc = [
'scanpydoc[typehints,theme]',
'scanpydoc[typehints,myst,theme]',
'sphinx',
'readthedocs-sphinx-search',
]
Expand Down Expand Up @@ -100,6 +100,7 @@ python = '3.11'
features = ['doc']
[tool.hatch.envs.docs.scripts]
build = 'sphinx-build -M html docs docs/_build'
clean = 'git clean -fdX docs'

[tool.hatch.envs.hatch-test]
features = ['test', 'typehints', 'myst']
Expand Down
6 changes: 3 additions & 3 deletions src/scanpydoc/release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.. release-notes:: .
With e.g. the files `1.2.0.md`, `1.2.1.md`, `1.3.0.rst`, and `1.3.2.rst`,
With e.g. the files :file:`1.2.0.md`, :file:`1.2.1.md`, and :file:`1.3.0.rst`,
this will render like the following:
.. code:: restructuredtext
Expand All @@ -17,9 +17,9 @@
Version 1.3
===========
.. include:: 1.3.2.rst
.. include:: 1.3.0.rst
_v1.2:
Version 1.2
Expand Down Expand Up @@ -182,6 +182,6 @@ def run(self) -> Sequence[nodes.Node]:

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

0 comments on commit 99624f1

Please sign in to comment.