Skip to content

Releases: ComPWA/sphinx-api-relink

sphinx-api-relink 0.0.10

10 Oct 18:46
08274b8
Compare
Choose a tag to compare

⚠️ Enhancements and optimizations

  • Get pin() version from importlib if no constraints (#29)

🔨 Maintenance

  • Autoupdate pre-commit hooks (#23)
  • Drop Python 3.7 & 3.8 support due to EOL (#28)

The full changelog as commits can be found here.

sphinx-api-relink 0.0.9

23 Apr 12:50
f8cfd8d
Compare
Choose a tag to compare

🐛 Bug fixes

  • Adapt implementation to Sphinx v7.3 (#21)

📝 Documentation

The full changelog as commits can be found here.

sphinx-api-relink 0.0.8

09 Dec 17:43
3c3a8ea
Compare
Choose a tag to compare

✨ New features

  • Define wiki Sphinx role (#14)

⚠️ Enhancements and optimizations

  • Get branch info from GITHUB_REF if available (#13)

The full changelog as commits can be found here.

sphinx-api-relink 0.0.7

09 Dec 13:42
ab1ff4d
Compare
Choose a tag to compare

✨ New features

  • Generate API for multiple packages (#12)

The full changelog as commits can be found here.

sphinx-api-relink 0.0.6

06 Dec 22:01
f731cbe
Compare
Choose a tag to compare

🐛 Bug fixes

  • Allow redirects in URL check (#11)

The full changelog as commits can be found here.

sphinx-api-relink 0.0.5

05 Dec 21:38
819b016
Compare
Choose a tag to compare

⚠️ Enhancements and optimizations

🐛 Bug fixes

  • Support Sphinx linkcheck builder (#9)

The full changelog as commits can be found here.

sphinx-api-relink 0.0.4

05 Dec 21:10
d80f6c2
Compare
Choose a tag to compare

🖱️ Developer Experience

  • Link to source code on GitHub with linkcode (#8)

The full changelog as commits can be found here.

sphinx-api-relink 0.0.3

04 Dec 15:39
e620ff2
Compare
Choose a tag to compare

✨ New features

  • Add helpers module (#4, #6, and #7)

📝 Documentation

  • Fixed typo in generate_apidoc_package_path (#2)
  • Updated repository title in README.md (#3)
  • Removed outdated module docstring (#5)

The full changelog as commits can be found here.

sphinx-api-relink 0.0.2

04 Dec 09:50
ecc0db1
Compare
Choose a tag to compare

✨ New features

#1 makes it possible to generate an API through sphinx.ext.autodoc by adding this to your conf.py:

api_package_path = "../src/my_package"  # relative to conf.py

More configuration values can be found in README.md.

The full changelog as commits can be found here.

sphinx-api-relink 0.0.1

03 Dec 17:19
Compare
Choose a tag to compare

First release: the docs/_relink_references.py scripts are now available as a Sphinx extension 🎉

Installation

Just install through PyPI with pip:

pip install sphinx-api-relink

Next, in your Sphinx configuration file (conf.py), add "sphinx_api_relink" to your extensions:

extensions = [
    "sphinx_api_relink",
]

Usage

There are two ways to relink type hint references in your API. The first one, api_target_substitutions, should be used when the target is different than the type hint itself:

api_target_substitutions: dict[str, str | tuple[str, str]] = {
    "sp.Expr": "sympy.core.expr.Expr",
    "Protocol": ("obj", "typing.Protocol"),
}

The second, api_target_types, is useful when you want to redirect the reference type. This is for instance useful when Sphinx thinks the reference is a class, but it should be an obj:

api_target_types: dict[str, str] = {
    "RangeDefinition": "obj",
}