Skip to content

Commit

Permalink
docs(hugr-py): remove multiversion + add justfile command (#1381)
Browse files Browse the repository at this point in the history
Multiversion wasn't really working (all versions appeared to build the
same docs). And it was taking too long so removing for now.

Build succeeds, but branch is blocked from publishing:
https://github.com/CQCL/hugr/actions/runs/10160951256/job/28098379913

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
ss2165 and dependabot[bot] authored Jul 31, 2024
1 parent ad22df3 commit dd1dc48
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 61 deletions.
12 changes: 0 additions & 12 deletions hugr-py/docs/api-docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx_multiversion",
]

html_theme = "sphinx_book_theme"
Expand All @@ -37,18 +36,7 @@

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "conftest.py"]
html_sidebars = {
"**": [
"navbar-logo.html",
"icon-links.html",
"search-button-field.html",
"sbt-sidebar-nav.html",
"versioning.html",
],
}

smv_branch_whitelist = "main"
smv_tag_whitelist = r"^hugr-py-.*$"

intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
Expand Down
2 changes: 1 addition & 1 deletion hugr-py/docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ mkdir build
touch build/.nojekyll # Disable jekyll to keep files starting with underscores
# copy redirect file
cp ./_static/_redirect.html ./build/index.html
sphinx-multiversion ./api-docs ./build
poetry run sphinx-build -b html ./api-docs ./build
78 changes: 32 additions & 46 deletions hugr-py/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions hugr-py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ semver = "^3.0.2"
optional = true

[tool.poetry.group.docs.dependencies]
sphinx = "^7.2.6"
sphinx = ">=7.2.6,<9.0.0"
sphinx-book-theme = "^1.1.2"
sphinx-multiversion = "^0.2.4"

[build-system]
requires = ["poetry-core"]
Expand Down
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ update-schema:
gen-extensions:
cargo run -p hugr-cli gen-extensions -o specification/std_extensions


build-py-docs:
cd hugr-py/docs && ./build.sh

# Runs a rust and a python command, depending on the `language` variable.
#
# If `language` is set to `rust` or `python`, only run the command for that language.
Expand Down

0 comments on commit dd1dc48

Please sign in to comment.