Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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.pyAs 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 therun_tf_glue.py
script is not inexamples/
anymore, but inexamples/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.pyThis 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