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

Update documentation to use pdoc and refresh automatically using github action. #29

Merged
merged 6 commits into from
Feb 24, 2023

Conversation

hhoppe
Copy link
Collaborator

@hhoppe hhoppe commented Feb 22, 2023

The current documentation in https://google.github.io/mediapy/ was created using pdoc3 which was a fork of pdoc. The documentation was updated manually (and infrequently) by writing to a gh-pages branch in the repo --- a cumbersome process.

The maintainers of pdoc have been very active and so it is now worthwhile to transition to that package.
See the discussion at the end of https://github.com/mitmproxy/pdoc .

The new mediapy documentation can be previewed at https://hhoppe.github.io/mediapy/
(That view is still not showing some logo images because these are awaiting their commits into the main https://github.com/google/mediapy/ repo.)

One issue with pdoc (and pdoc3) is that they expand all type information -- see mitmproxy/pdoc#420 . This PR avoids the problem by introducing temporary typenames and applying some postprocessing. Hopefully this can be simplified in the future.

To enable web deployment of the new documentation, it is necessary to change the GitHub repo setting Pages to use as source GitHub Actions rather than Deploy from a branch: gh-pages.
Perhaps it is best to make this settings change before applying the PR to enable the website github action to operate correctly. And/or this may require an additional dummy commit.

Once the new documentation is live, it will be possible to delete the gh-pages branch as that will no longer be needed.

@copybara-service copybara-service bot merged commit f031553 into google:main Feb 24, 2023
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