Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/sphinx-taskgraph/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[project]
name = "sphinx-taskgraph"
version = "0.1.0"
version = "0.2.0"
description = "Sphinx extensions to assist with Taskgraph documentation"
readme = "README.md"
authors = [
{ name = "Andrew Halberstadt", email = "ahal@mozilla.com" }
]
dependencies = [
"sphinx>=7.0.0",
"voluptuous>=0.12.1",
"msgspec>=0.20.0",
]

[build-system]
Expand Down
16 changes: 12 additions & 4 deletions packages/sphinx-taskgraph/src/sphinx_taskgraph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@
Sphinx extension for rendering taskgraph schemas using autodoc with custom formatting.
"""

from importlib.metadata import version


def setup(app):
"""
Entry point for the Sphinx extension.
"""
from .autoschema import SchemaDocumenter # noqa: PLC0415
from .autoschema import ( # noqa: PLC0415
process_docstring,
process_signature,
skip_member,
)

# Register the custom autodocumenter.
app.add_autodocumenter(SchemaDocumenter)
app.setup_extension("sphinx.ext.autodoc")
app.connect("autodoc-process-docstring", process_docstring)
app.connect("autodoc-process-signature", process_signature)
app.connect("autodoc-skip-member", skip_member)

# Return metadata about the extension.
return {
"version": "1.0",
"version": version("sphinx-taskgraph"),
"parallel_read_safe": True,
"parallel_write_safe": True,
}
Loading
Loading