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

RTD flyout view page source link is broken for API docs #409

Open
awmatheson opened this issue Feb 28, 2024 · 4 comments
Open

RTD flyout view page source link is broken for API docs #409

awmatheson opened this issue Feb 28, 2024 · 4 comments
Labels
needs triage New issue, needs triage

Comments

@awmatheson
Copy link
Contributor

Bug Description

originally reported by @daniel-range

In the new documentation site, to find the documentation on the website there is a link you can use to access. Shown below.

Screenshot 2024-02-28 at 3 15 26 PM

When you click on the link to view in github you get a 404 at the link. For example, clicking this for window operators brings you too https://github.com/bytewax/bytewax/blob/39955eb33af59e2f66d32634df9b997dbba410f2/docs-sphinx/apidocs/bytewax/bytewax.operators.window.md

Python version (python -V)

3.10

Bytewax version (pip list | grep bytewax)

0.18.0

Operating System version (uname -morp)

Darwin 22.6.0 x86_64 i386

Relevant log output

No response

Steps to Reproduce

visit https://docs.bytewax.io/stable/apidocs/bytewax/bytewax.operators.window.html, click v: stable in the bottom left corner and then click view under On GitHub.

@github-actions github-actions bot added the needs triage New issue, needs triage label Feb 28, 2024
@davidselassie
Copy link
Contributor

davidselassie commented Feb 28, 2024

This is because there is no permanent source for API docs pages. They are re-derived at documentation build time from the Python source code. This is so the documentation files never fall out of sync with the docstrings in the code.

We correctly disable the blue Edit on GitHub link in the right side bar for API docs pages because of this, but the link described here is injected by Read the Docs. I'll see if there's a way to turn it off selectively for these pages that are derived.

@davidselassie
Copy link
Contributor

To clarify: this link is only broken on API Docs section pages and does work correctly on all the documentation in the User Guide section, for which there is an actual markdown file checked in.

@davidselassie davidselassie changed the title Accessing the specific GitHub page from the new website documentation View page source link is broken for API docs Feb 28, 2024
@davidselassie davidselassie changed the title View page source link is broken for API docs RTD flyout view page source link is broken for API docs Feb 28, 2024
@davidselassie
Copy link
Contributor

It looks like this menu, officially called the flyout menu is not currently customizable.

One option we have here is to disable the RTD-provided flyout menu, and instead enable the Sphinx PyData theme version switching UI and theme source link. Then we can use the per-page template definitions to only show those links for non-API pages. (I believe we are currently doing this for the "Edit on GitHub" link, so it'd be adding the sourcelink template to follow that pattern as well.)

@davidselassie
Copy link
Contributor

It also might be possible to make a custom sourcelink-python partial template which could be activated for API docs which rewrites the link to the actual Python source code. Not sure all the details here and if there's a convenient source in the template you could use to rewrite the import path to the file path in Bytewax's GitHub repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage New issue, needs triage
Projects
None yet
Development

No branches or pull requests

2 participants