Repository navigation
docs: add version picker and manual release snapshots #24792
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
Draft
yiaany
wants to merge
13
commits into
apache:main
Choose a base branch
from
yiaany:docs/versioned-docs-17071
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e31a79f
docs: add full-site version snapshots
yiaany d7ac573
docs: harden versioned docs publication
yiaany d022e1e
docs: simplify versioned documentation workflow
yiaany 9313453
Merge remote-tracking branch 'apache/main' into docs/versioned-docs-1…
alamb 59b9cf6
trim unecssary docs, remove PR comment pretending to be documetnation
alamb a1fc011
simplify and document local publish workflow
alamb 5a7ee52
Update versions
alamb 98afe60
fix urls
alamb 6ac6765
remove index
alamb 53f8bb3
update build readme
alamb f22bba2
Update release/conf.py script and docs
alamb acd7dba
try and simplicy
alamb 0baa248
Update dev/release/README.md
alamb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| """Sphinx configuration overlay for building docs from a release tag. | ||
|
|
||
| Loads ``conf.py`` from a``docs/source`` directory located at | ||
| ``DATAFUSION_DOCS_SOURCE`` and overrides the following settings: | ||
| - the version string (``DATAFUSION_DOCS_VERSION``), | ||
| - the site base URL used for the sitemap | ||
| - the version switcher. | ||
|
|
||
| Why? | ||
|
|
||
| Documentation from older release tags do not have the version picker code and | ||
| expect their base URL to be ``/`` rather than ```versions/<version>/``, so we can | ||
| not publish docs built for the archived version without modification. | ||
|
|
||
| Rather than modifying the documentation in the old release branch, | ||
| the release process builds docs with the following command from a main | ||
| checkout: | ||
|
|
||
| sphinx-build -c docs/scripts/release | ||
| """ | ||
|
|
||
| import os | ||
| from pathlib import Path | ||
| import sys | ||
|
|
||
| source = Path(os.environ["DATAFUSION_DOCS_SOURCE"]).resolve() | ||
| sys.path.insert(0, str(source.parent)) | ||
| exec(compile((source / "conf.py").read_bytes(), str(source / "conf.py"), "exec")) | ||
|
|
||
| # Resolve paths relative to the tag, not this configuration overlay. | ||
| templates_path = [str(source / path) for path in templates_path] | ||
| html_static_path = [str(source / path) for path in html_static_path] | ||
| html_extra_path = [str(source / path) for path in html_extra_path] | ||
| html_logo = str(source / html_logo) | ||
| html_favicon = str(source / html_favicon) | ||
|
|
||
| version = release = os.environ["DATAFUSION_DOCS_VERSION"] | ||
| html_baseurl = f"https://datafusion.apache.org/versions/{version}/" | ||
| sitemap_url_scheme = "{link}" | ||
| if "sphinx_sitemap" not in extensions: | ||
| extensions.append("sphinx_sitemap") | ||
| html_context = {**html_context, "github_repo": "datafusion", "github_version": version} | ||
| html_theme_options = { | ||
| **html_theme_options, | ||
| "navbar_end": ["version-switcher", "theme-switcher"], | ||
| "check_switcher": False, | ||
| "switcher": { | ||
| "json_url": "/_static/versions.json", | ||
| "version_match": version, | ||
| }, | ||
| } | ||
| # The old tag's absolute redirect would leave the release documentation. | ||
| redirects = {**redirects, "library-user-guide/upgrading": "upgrading/index.html"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| [ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this looks good |
||
| { | ||
| "name": "Latest", | ||
| "url": "/", | ||
| "version": "main" | ||
| }, | ||
| { | ||
| "name": "55.1.0", | ||
| "url": "/versions/55.1.0/", | ||
| "version": "55.1.0" | ||
| }, | ||
| { | ||
| "name": "55.0.0", | ||
| "url": "/versions/55.0.0/", | ||
| "version": "55.0.0" | ||
| } | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no
"preferred": truecurrently at https://github.com/apache/datafusion/pull/24792/changes#diff-99ab87d9590045ea1e68507c78e72d2034bf0505d2b96edd222b3fe0e97fea1aR2-R6