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

fix version wrangling in docs #7600

Merged
merged 6 commits into from
May 18, 2023
Merged

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented May 18, 2023

We have some logic in our docs that handles the version wrangling for released versions:

vision/docs/source/conf.py

Lines 96 to 105 in abc40ef

# The short X.Y version.
version = "main (" + torchvision.__version__ + " )"
# The full version, including alpha/beta/rc tags.
release = "main"
VERSION = os.environ.get("VERSION", None)
if VERSION:
# Turn 1.11.0aHASH into 1.11 (major.minor only)
version = ".".join(version.split(".")[:2])
html_title = " ".join((project, version, "documentation"))
release = version

Two issues here:

  1. To enable the wrangling, we need to set the VERSION environment value. That is currently not the case.
  2. The logic is broken. Since we wrangle after we have already prefixed the version with main(, this is retained for the final version.

This PR fixes both issues. I'll send a follow-up PR to the gh-pages branch to remediate this for the past two versions.

@pytorch-bot
Copy link

pytorch-bot bot commented May 18, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7600

Note: Links to docs will display an error until the docs builds have been completed.

❌ 6 New Failures

As of commit 196346a:

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fixing this Philip, this has been a bit of a pain to manually clean that after every release (and we often forget). This is mostly a stamp but if there's any issue they'll be easy to address

@pmeier pmeier merged commit 689ff29 into pytorch:main May 18, 2023
@pmeier pmeier deleted the doc-release-version branch May 18, 2023 14:06
@github-actions
Copy link

Hey @pmeier!

You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

facebook-github-bot pushed a commit that referenced this pull request May 23, 2023
Reviewed By: vmoens

Differential Revision: D46071409

fbshipit-source-id: c8b296144bd7beb4036cb87c975ce94dd1c2e481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants