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

Deprecate pdoc-based documentation page #982

Merged
merged 7 commits into from May 20, 2022
Merged

Conversation

ghost
Copy link

@ghost ghost commented May 16, 2022

Sphinx with an RTD theme is the current documentation system. However, a pdoc3 -based documentation page is still up, although it's not being used. This branch deprecates it:

  • Removes all pdoc related instructions from makefiles and similars.
  • Updates links to documentation across the repo (from docs/rtd/ to /docs/)

Still missing:

  • Set up redirect from /docs/rtd to /docs/ (release CI/CD pipeline)

@codecov-commenter
Copy link

codecov-commenter commented May 16, 2022

Codecov Report

Merging #982 (3134376) into develop (c31b627) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #982   +/-   ##
========================================
  Coverage    90.80%   90.80%           
========================================
  Files          169      169           
  Lines         4653     4653           
========================================
  Hits          4225     4225           
  Misses         428      428           
Flag Coverage Δ
py3.8-ubuntu-latest-pandas 90.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c31b627...3134376. Read the comment docs.

make.bat Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented May 16, 2022

@sbrugman Would any of the solutions here for the redirect be a viable option? https://superdevresources.com/redirects-jekyll-github-pages/

@sbrugman
Copy link
Collaborator

@sbrugman Would any of the solutions here for the redirect be a viable option? https://superdevresources.com/redirects-jekyll-github-pages/
For the docs index page, a redirect of that kind is used.

The challenge is not having to create individual redirects for each old page, while not having access to the normal server-side tools. We could create a 404 page that, when the URL contains /rtd/, redirects to the parent folder.
e.g. https://pandas-profiling.ydata.ai/docs/master/rtd/pages/previously_existing_page.html
See this post and the github docs

@ghost
Copy link
Author

ghost commented May 18, 2022

@sbrugman Would any of the solutions here for the redirect be a viable option? https://superdevresources.com/redirects-jekyll-github-pages/
For the docs index page, a redirect of that kind is used.

The challenge is not having to create individual redirects for each old page, while not having access to the normal server-side tools. We could create a 404 page that, when the URL contains /rtd/, redirects to the parent folder. e.g. https://pandas-profiling.ydata.ai/docs/master/rtd/pages/previously_existing_page.html See this post and the github docs

I was checking with YData's infrastructure team and it's not easy to create server-side redirects given the way the website is currently set up. So, the two options I see are:

  • The 404 page method you suggest.
  • Suggested by @portellaa, the Sphinx extension sphinx-reredirects, which might just work via its wildcard support.

Both seem fine to me. Assuming it works, the extension would probably lead to a smoother experience. Any preference?

@sbrugman
Copy link
Collaborator

Sphinx-redirect is preferable, as it can be maintained without modifying the GitHub Pages config. It supports directory redirects.

@ghost
Copy link
Author

ghost commented May 19, 2022

@sbrugman Briefly played around with the extension and it doesn't exactly fit this use case without some convoluted workflows and poor generalisation if/when new pages are added (due to the way the wildcard and source matching works).

Given that all the links in the repo have been updated (apart from those eventually present in GitHub issues), the problem would mainly manifest with external links from the web. I feel it's OK to redirect those to the main page (and hopefully the new docs structure will make it easy for everyone to find what they are looking for).

In that case, from what I read on that StackOverflow page, I think a simple solution would be serving a 404.html page redirecting to the documentation's home. I think this could be achieved, in the release.yml CI pipeline, through a:

cp docs/${{ env.BRANCH_NAME }}/index.html 404.html
git add 404.html

Thoughts?

@sbrugman
Copy link
Collaborator

Ok, let's go with the redirect. By default we can redirect urls that contain /rtd/ to the same url where the directory is removed (using javascript) to ease the user experience for external web links.

@ghost
Copy link
Author

ghost commented May 20, 2022

@sbrugman As we agreed, given the incoming docs restructuring branch, a lot of external URLs will be broken, it doesn't make as much sense as before to do the rtd/ redirect, so we will go with the default 404 page redirecting to the docs' home.

In that case, I am marking this branch as ready for review and creating a separate one with the 404 to merge into gh-pages.

@ghost ghost marked this pull request as ready for review May 20, 2022 14:56
@sbrugman sbrugman merged commit ce98c81 into develop May 20, 2022
@sbrugman sbrugman deleted the chore-deprecate-pdoc branch May 20, 2022 15:02
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.

None yet

2 participants