Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fix broken mkdocs links #587

Merged
merged 5 commits into from
Oct 4, 2023

Conversation

GenevieveBuckley
Copy link
Contributor

@GenevieveBuckley GenevieveBuckley commented Sep 26, 2023

Closes #584

Previously with just plain mkdocs involved, links to functions/classes/etc. would automatically resolve, even when nothing was written between the second set of square brackets. So, this used to work, and you could click it in the built HTML docs and be taken to the corresponding magicgui.widgets.Container page:

... documentation text mentioning [magicgui.widgets.Container][]

But when we combined mkdocs and mkdocs-gallery (to make our examples gallery) it stopped automatically resolving those links for us in the docs. I'm not sure why that happens, but the quickest solution is to explicitly specify the link each time. This PR does just that.

summary

@coderabbitai
Copy link

coderabbitai bot commented Sep 26, 2023

Walkthrough

This pull request primarily focuses on updating documentation and comments across the magicgui library. The changes include fixing broken links, updating references to decorators, classes, and functions within the library, and improving clarity in docstrings. There are no significant alterations or additions to the code logic.

Changes

File(s) Summary
docs/api/migration.md, docs/dataclasses.md, docs/decorators.md, docs/widgets.md Updated documentation with accurate links and descriptions for decorators, classes, and functions within the magicgui library.
src/magicgui/tqdm.py Improved code comment by adding a link to the magicgui.widgets.ProgressBar widget documentation.
src/magicgui/type_map/_magicgui.py Added a new method widget_init to the MagicFactory class and updated the documentation with correct links.
src/magicgui/type_map/_type_map.py Modified the docstring of the get_widget_class function by changing the reference to magicgui.widgets.Widget.
src/magicgui/types.py Updated type annotations in the code.
src/magicgui/widgets/... (multiple files) Updated docstrings and fixed broken links in the documentation of various classes.
src/magicgui/widgets/protocols.py Updated the module docstring formatting and removed a reference to typing.Protocol.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between e47338a and 657c07a.
Files selected for processing (18)
  • docs/api/migration.md (2 hunks)
  • docs/dataclasses.md (2 hunks)
  • docs/decorators.md (5 hunks)
  • docs/widgets.md (9 hunks)
  • src/magicgui/tqdm.py (1 hunks)
  • src/magicgui/type_map/_magicgui.py (2 hunks)
  • src/magicgui/type_map/_type_map.py (1 hunks)
  • src/magicgui/types.py (2 hunks)
  • src/magicgui/widgets/_concrete.py (1 hunks)
  • src/magicgui/widgets/_function_gui.py (2 hunks)
  • src/magicgui/widgets/_table.py (1 hunks)
  • src/magicgui/widgets/bases/_button_widget.py (1 hunks)
  • src/magicgui/widgets/bases/_categorical_widget.py (1 hunks)
  • src/magicgui/widgets/bases/_container_widget.py (2 hunks)
  • src/magicgui/widgets/bases/_ranged_widget.py (2 hunks)
  • src/magicgui/widgets/bases/_slider_widget.py (1 hunks)
  • src/magicgui/widgets/bases/_value_widget.py (1 hunks)
  • src/magicgui/widgets/protocols.py (1 hunks)
Files skipped from review due to trivial changes (18)
  • docs/api/migration.md
  • docs/dataclasses.md
  • docs/decorators.md
  • docs/widgets.md
  • src/magicgui/tqdm.py
  • src/magicgui/type_map/_magicgui.py
  • src/magicgui/type_map/_type_map.py
  • src/magicgui/types.py
  • src/magicgui/widgets/_concrete.py
  • src/magicgui/widgets/_function_gui.py
  • src/magicgui/widgets/_table.py
  • src/magicgui/widgets/bases/_button_widget.py
  • src/magicgui/widgets/bases/_categorical_widget.py
  • src/magicgui/widgets/bases/_container_widget.py
  • src/magicgui/widgets/bases/_ranged_widget.py
  • src/magicgui/widgets/bases/_slider_widget.py
  • src/magicgui/widgets/bases/_value_widget.py
  • src/magicgui/widgets/protocols.py

@GenevieveBuckley
Copy link
Contributor Author

The CodeRabbitAI bot summaries are highly misleading. I didn't add a new method, add extra typing, or remove references to anything. It's a straightforward PR that only updates the hyperlinks.

@tlambert03
Copy link
Member

summary: mkdocs autorefs is currently incompatible with pymdownx.inlinehilite. This PR just avoids the [`thing`][] syntax until mkdocstrings/autorefs#34 is resolved

@tlambert03 tlambert03 merged commit b728334 into pyapp-kit:main Oct 4, 2023
31 of 32 checks passed
@tlambert03 tlambert03 added the documentation Improvements or additions to documentation label Oct 20, 2023
@tlambert03 tlambert03 changed the title Fix broken mkdocs links docs: Fix broken mkdocs links Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: pymdownx.inlinehilite (via mkdocs-gallery) breaking autorefs
2 participants