Skip to content

docs: fix documentation build#1820

Open
mifuyutsuki wants to merge 3 commits into
interactions-py:unstablefrom
mifuyutsuki:docs/fix-build
Open

docs: fix documentation build#1820
mifuyutsuki wants to merge 3 commits into
interactions-py:unstablefrom
mifuyutsuki:docs/fix-build

Conversation

@mifuyutsuki

Copy link
Copy Markdown
Contributor

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

Fixes errors I encountered while building the documentation to update the docs. I suspect the errors I got (most specifically deprecated options in mkdocs.yml) explains why the docs-builder action during the release of 5.16.0 failed: mkdocstrings removed the config keys selection and rendering, now combining them into one options key. Also, the build no longer works with griffe==0.25.

Synchronized requirements-docs.txt and setup.py to the actual requirements (the former did not list the mkdocs requirements). The version pinning on griffe that was in setup.py is removed; mkdocstrings-python now requires a much later version of griffe.

Edited some mkdocs options to resolve some little things (detalied in Changes).

Changes

  • Added mkdocs and its plugins in use to requirements-docs.txt.
  • Removed version pin on griffe in setup.py.
  • Set the following mkdocs options:
    • autorefs: Set resolve_closest to resolve "multiple primary URL" warnings caused by the monopage.
    • mkdocstrings-python: Set members_order to alphabetical to match the currently live API reference.
    • mkdocstrings-python: Set show_symbol_type_toc to distinguish methods from attributes in Table of Contents, as the parentheses in ToC (e.g. wait_for_component()) are no longer present in the latest version of mkdocstrings-python.

Related Issues

Test Scenarios

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

Synchronizes the listed dependencies in requirements-docs.txt with that of pyproject.toml (poetry) and setup.py.
Merged `selection` and `rendering` options in mkdocstrings-python settings to one `options`; the former are deprecated in 0.19 and removed in 0.23.

Set `autorefs.resolve_closest` to resolve "multiple primary URL" warnings with the monopage.

Set mkdocstrings-python `members_order` to alphabetical to match the currently live documentation, and also `show_symbol_type_toc` to better distinguish methods from attributes in the ToC, as the `()` is no longer present in the current version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant