Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
689ff292
"...text-generation-inference.git" did not exist on "bc9593a5b1b93d75e2e31ec98e690c4d4c12161e"
Unverified
Commit
689ff292
authored
May 18, 2023
by
Philip Meier
Committed by
GitHub
May 18, 2023
Browse files
fix version wrangling in docs (#7600)
parent
abc40ef2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
.github/workflows/docs.yml
.github/workflows/docs.yml
+8
-0
docs/source/conf.py
docs/source/conf.py
+7
-9
No files found.
.github/workflows/docs.yml
View file @
689ff292
...
...
@@ -43,6 +43,14 @@ jobs:
pip install --progress-bar=off -r requirements.txt
echo '::endgroup::'
if [[ ${{ github.event_name }} == push && (${{ github.ref_type }} == tag || (${{ github.ref_type }} == branch && ${{ github.ref_name }} == release/*)) ]]; then
echo '::group::Enable version string sanitization'
# This environment variable just has to exist and must not be empty. The actual value is arbitrary.
# See docs/source/conf.py for details
export TORCHVISION_SANITIZE_VERSION_STR_IN_DOCS=1
echo '::endgroup::'
fi
# The runner does not have sufficient memory to run with as many processes as there are
# cores (`-j auto`). Thus, we limit to a single process (`-j 1`) here.
sed -i -e 's/-j auto/-j 1/' Makefile
...
...
docs/source/conf.py
View file @
689ff292
...
...
@@ -92,17 +92,15 @@ author = "Torch Contributors"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# 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
:
# version: The short X.Y version.
# release: The full version, including alpha/beta/rc tags.
if
os
.
environ
.
get
(
"TORCHVISION_SANITIZE_VERSION_STR_IN_DOCS"
,
None
):
# Turn 1.11.0aHASH into 1.11 (major.minor only)
version
=
"."
.
join
(
version
.
split
(
"."
)[:
2
])
version
=
release
=
"."
.
join
(
torchvision
.
__
version
__
.
split
(
"."
)[:
2
])
html_title
=
" "
.
join
((
project
,
version
,
"documentation"
))
release
=
version
else
:
version
=
f
"main (
{
torchvision
.
__version__
}
)"
release
=
"main"
# The language for content autogenerated by Sphinx. Refer to documentation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment