The Wayback Machine - https://web.archive.org/web/20201114163619/https://github.com/huggingface/transformers/issues/7988
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

[Good first issue] Documentation links in older docs versions #7988

Open
LysandreJik opened this issue Oct 22, 2020 · 0 comments
Open

[Good first issue] Documentation links in older docs versions #7988

LysandreJik opened this issue Oct 22, 2020 · 0 comments

Comments

@LysandreJik
Copy link
Member

@LysandreJik LysandreJik commented Oct 22, 2020

🚀 Feature request

This is a documentation request in order to make it easier to find corresponding examples in the documentation.

Good first issue if you want to get acquainted with the docs and how to build docs using Sphinx!

Current issue

Here's the issue: currently, if one goes to an older documentation version to check the "examples" page, for example, v2.6.0, all links point towards the master branch.

For example, the link towards run_tf_glue.py is the following: https://github.com/huggingface/transformers/blob/master/examples/run_tf_glue.py

As this points towards the master branch, it is prone to breaking as files can (and probably will) be moved around as versions come out. It is the case for this example, as the run_tf_glue.py script is not in examples/ anymore, but in examples/text-classification/.

I think we need a way to ensure that all links point toward their appropriate version, and the easiest would be to point to a given tag. Since we're looking at the version v2.6.0, it makes sense to point towards the tag v2.6.0: https://github.com/huggingface/transformers/blob/v2.6.0/examples/run_tf_glue.py

This way links get frozen in time and redirect to actual files corresponding to their description and behaviour as stated in the docs.

Resolution

I believe the easiest change would be to use sphinx variables in order to do this. Probably either rst_epilog or rst_prolog could be useful here.

Some useful links: rst_epilog, rst_prolog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.