Issue: Source links broken
State: closed
Author: qqaatw

## Describe the bug

The source links of v2.0.0 docs are broken:

For exmaple, clicking the source button of this [class](https://huggingface.co/docs/datasets/v2.0.0/en/package_reference/main_classes#datasets.ClassLabel) will direct users to `https://github.com/huggingface/datasets/blob/v2.0.0/src/datasets/features/features.py#L747`

here, the `v2.0.0` should be `2.0.0`.


## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
```

## Expected results

Redirecting to this link: `https://github.com/huggingface/datasets/blob/2.0.0/src/datasets/features/features.py#L747`

## Actual results
Described above.

## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform:
- Python version:
- PyArrow version:


Comments:
Thanks for reporting @qqaatw.

@mishig25 @sgugger do you think this can be tweaked in the new doc framework?
- From: https://github.com/huggingface/datasets/blob/v2.0.0/
- To: https://github.com/huggingface/datasets/blob/2.0.0/

@qqaatw thanks a lot for notifying about this issue!

in comparison, transformers tags start with `v` like [this one](https://github.com/huggingface/transformers/blob/v4.17.0/src/transformers/models/bert/configuration_bert.py#L54).

Therefore, we have to do one of 2 options below:
1. Make necessary changes on doc-builder side
OR
2. Make [datasets tags](https://github.com/huggingface/datasets/tags) start with `v`, just like [transformers](https://github.com/huggingface/transformers/tags) (so that tag naming can be consistent amongst hf repos)

I'll let you decide @albertvillanova @lhoestq @sgugger 

I think option 2 is the easiest and would provide harmony in the HF ecosystem but we can also add a doc config parameter to decide whether the default version has a v or not if `datasets` folks prefer their tags without a v :-)

For me it is OK to conform to the rest of libraries and tag/release with a preceding "v", rather than adding an extra argument to the doc builder just for `datasets`.

Let me know if it is also OK for you @lhoestq. 

https://github.com/huggingface/doc-build/commit/f41c1e8ff900724213af4c75d287d8b61ecf6141

hotfix so that `datasets` docs source button works correctly on hf.co/docs/datasets

We could add a tag for each release without a 'v' but it could be confusing on github to see both tags `v2.0.0` and `2.0.0` IMO (not sure if many users check them though). Removing the tags without 'v' would break our versioning for github datasets: the library looks for dataset scripts at the URLs like `https://raw.githubusercontent.com/huggingface/datasets/{revision}/datasets/{path}/{name}` where `revision` is equal to `datasets.__version__` (which doesn't start with a 'v') for all released versions of `datasets`.

I think we could just have a parameter for the documentation - and having different URLs schemes for the source links that the users don't even see (they simply click on a button) is probably fine

This is done in #3943 to go along with [doc-builder#146](https://github.com/huggingface/doc-builder/pull/146).

Note that this will only work for future versions, so once those two are merged, the actual v2.0.0 doc should be fixed. The easiest is to cherry-pick this commit on the v2.0.0 release branch (or on a new branch created from the 2.0.0 tag, with a name that triggers the doc building job, for instance v2.0.0-release)

Thanks for fixing @sgugger.