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

Adds workflow to automatically build and deploy documentation #71

Merged
merged 35 commits into from
Aug 29, 2024

Conversation

chaduhduh
Copy link
Contributor

This adds a new "Deploy Documentation" workflow and the accompanying sphinx config files.

On each release or via manual trigger a new version of the documentation will be built and deployed to the server. I have the automatic build at a staged URL because I cannot fully test the manual and release triggers until this workflow is part of the default branch. After this is merged I will do some tests and if things look good we can launch the new auto generated version of the documentation (we'll just swap the paths).

The new docs can be seen here (but the automated build is at a different URL for now):
https://datalab.noirlab.edu/docs/api/

I tried to keep the documentation as consistent as possible with the old version but since that is a few years old and used older software versions things are slightly different. I also made some upgrades such as including the new logo and updating various AURA and DL references.

@chaduhduh chaduhduh requested a review from iglesu June 6, 2024 23:18
@rnikutta
Copy link
Member

rnikutta commented Jun 6, 2024

Thank you @chaduhduh . A few observations:

  • Looking at the TOC that's generated, things seem to appear twice, e.g. there are all the queryClient methods, once alone by name, and then again as qyeryClient.method(). See screenshot (continuation over two browser tabs).
  • Also, if the TOC is loaded in the left frame, it spills over (by browser zoom/font size are default). See other screenshot.
  • specClient was deprecated about a year ago. I don't think it's in the codebase anymore, but maybe in an API docs template file?
    dl-api-toc-leftframe
    dl-api-toc

@chaduhduh
Copy link
Contributor Author

Thank you @chaduhduh . A few observations:

  • Looking at the TOC that's generated, things seem to appear twice, e.g. there are all the queryClient methods, once alone by name, and then again as qyeryClient.method(). See screenshot (continuation over two browser tabs).
  • Also, if the TOC is loaded in the left frame, it spills over (by browser zoom/font size are default). See other screenshot.
  • specClient was deprecated about a year ago. I don't think it's in the codebase anymore, but maybe in an API docs template file?

Hey @rnikutta ,

  • It looks like the repeated methods are coming straight from our docstrings so I think we will need to take care of that in a separate PR. It is possible we could configure it out manually for each file but if it is invalid it should probably be removed from the source. Take a look at the queryClient.py file
  • I will see what options there are for the left column navigation. That is coming from the theme so it might require changing to a different theme (but hopefully not).
  • It looks like specClient is included since it is still within our package. We can remove that or mark it deprecated in some way as part of another PR.

Thanks!

@chaduhduh
Copy link
Contributor Author

Hey @rnikutta,

I was able to disable the sidebar TOC to resolve the issue and better match our old documentation. It looks like we could add custom CSS to fix the problem but removing it was quicker and matches the old pages.

Also, I ended up adding the specClient.py file to the exclusion list so that will no longer display, but we should still remove that file if we no longer need it (in my opinion). I can deploy the new version when I do a final test of the workflow trigger.

That just leaves the repeated methods to deal with which I think needs to be separate PRs in each of the manager repos (then we can sync those changes here) or at least a separate PR to figure out how to resolve that through Sphinx in a way that is easy to maintain.

Thanks!

@chaduhduh chaduhduh merged commit 50e766e into master Aug 29, 2024
@chaduhduh chaduhduh deleted the auto-api-docs branch August 29, 2024 23:01
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.

2 participants