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

Enable versioned doc support #95

Closed
leofang opened this issue Sep 10, 2024 · 6 comments · Fixed by #165
Closed

Enable versioned doc support #95

leofang opened this issue Sep 10, 2024 · 6 comments · Fixed by #165
Assignees
Labels
cuda.core Everything related to the cuda.core module documentation Improvements or additions to documentation P0 High priority - Must do!

Comments

@leofang
Copy link
Member

leofang commented Sep 10, 2024

No description provided.

@github-actions github-actions bot added the triage Needs the team's attention label Sep 10, 2024
@leofang leofang added documentation Improvements or additions to documentation P1 Medium priority - Should do cuda.py EA and removed triage Needs the team's attention labels Sep 10, 2024
@bryevdv
Copy link
Collaborator

bryevdv commented Sep 11, 2024

Using PSD theme (or any derived themes e.g. the NV theme) this is nominally a matter of adding a switcher.json and updating it on new releases:

https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html

Is the long-term plan to stick with GH-pages, or move to something else? For the current GH pages, the docs dir will need to be re-organized keeping each version in a subdirectory.

@bryevdv bryevdv closed this as completed Sep 11, 2024
@bryevdv bryevdv reopened this Sep 11, 2024
@github-actions github-actions bot added the triage Needs the team's attention label Sep 11, 2024
@bryevdv bryevdv removed the triage Needs the team's attention label Sep 11, 2024
@leofang
Copy link
Member Author

leofang commented Sep 16, 2024

Thanks for checking, @bryevdv!

Using PSD theme (or any derived themes e.g. the NV theme) this is nominally a matter of adding a switcher.json and updating it on new releases:

It seems we currently use the furo theme (first time hearing this theme...)

html_theme = 'furo'
# html_theme = 'pydata_sphinx_theme'

@vzhurba01 do you recall why we used furo instead of the PyData one?

Note that furo still does not have multi-ver doc support (pradyunsg/furo#372; WIP in pradyunsg/furo#500), so we have 2 choices:

  1. Switch to PyData or NV theme
  2. Hack the existing theme to add a simple, json-based multi-ver support (which I showed can be done, see, e.g. nvmath-python et al). I believe the same approach can be applied to furo too, given that it already has the infra following RTD.

Is the long-term plan to stick with GH-pages, or move to something else?

I think using the GH pages is OK. The internal workflow can be slightly more demanding.

For the current GH pages, the docs dir will need to be re-organized keeping each version in a subdirectory.

That is fine with me. I'd also like to use this opportunity to purge the doc artifacts from the main/release branches, following the common practice. In short:

  • The main/release branches should only contain the doc sources (= source code + Sphinx rst files)
  • The gh-pages branch that we use to publish the docs should only contain the doc artifacts (=html files)
    • If we switch to a multi version doc, all versions will be kept under a subdirectory as you suggested

@leofang
Copy link
Member Author

leofang commented Sep 16, 2024

Another perhaps silly question: Does the GH page support the JS + Json based version selector?

@vzhurba01
Copy link
Collaborator

@vzhurba01 do you recall why we used furo instead of the PyData one?

I don't recall. Looking back I see that @mmccarty was the one who helped up setup the docs initially.

@leofang
Copy link
Member Author

leofang commented Oct 10, 2024

Bumping this to P0 as this could have been a gatekeeper for issues like #140.

@leofang leofang added P0 High priority - Must do! cuda.core Everything related to the cuda.core module and removed P1 Medium priority - Should do labels Oct 10, 2024
@leofang leofang self-assigned this Oct 12, 2024
@leofang
Copy link
Member Author

leofang commented Oct 14, 2024

2. Hack the existing theme to add a simple, json-based multi-ver support (which I showed can be done, see, e.g. nvmath-python et al). I believe the same approach can be applied to furo too, given that it already has the infra following RTD.

I confirm in #165 that this works, so we can defer the theme change to a later stage and not mixing it together with other decisions to make.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda.core Everything related to the cuda.core module documentation Improvements or additions to documentation P0 High priority - Must do!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants