-
Notifications
You must be signed in to change notification settings - Fork 3
docs: add toolchain #401
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
Merged
Merged
docs: add toolchain #401
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d37582e
docs: add toolchain
dgarcia360 8767ada
docs: add conf index page options
dgarcia360 8ca5ae2
fix: multiversion
dgarcia360 0d32cc0
chore: update url
dgarcia360 2682574
chore: fix newline at end of .gitignore file
dgarcia360 f55159f
fix: multiversion
dgarcia360 967dee1
chore: unify docs ci
dgarcia360 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 was deleted.
Oops, something went wrong.
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,79 @@ | ||
| name: "Docs / Publish" | ||
| # For more information, | ||
| # see https://sphinx-theme.scylladb.com/stable/deployment/production.html#available-workflows | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - 'branch-**' | ||
| paths: | ||
| - "docs/**" | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.repository.default_branch }} | ||
| persist-credentials: false | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.10' | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
|
|
||
| - name: Set up env | ||
| run: make -C docs setupenv | ||
|
|
||
| - name: Build docs | ||
| run: make -C docs multiversion | ||
|
|
||
| - name: Build redirects | ||
| run: make -C docs redirects | ||
|
|
||
| - name: Tar folder | ||
| run: | | ||
| tar \ | ||
| --dereference --hard-dereference \ | ||
| --directory docs/_build/dirhtml/ \ | ||
| -cvf ${{ runner.temp }}/artifact.tar \ | ||
| . | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: github-pages | ||
| path: ${{ runner.temp }}/artifact.tar | ||
| retention-days: "1" | ||
|
|
||
| release: | ||
| # Add a dependency to the build job | ||
| needs: build | ||
|
|
||
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
| permissions: | ||
| pages: write # to deploy to Pages | ||
| id-token: write # to verify the deployment originates from an appropriate source | ||
| contents: read # to read private repo | ||
|
|
||
| # Deploy to the github-pages environment | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
|
|
||
| # Specify runner + deployment step | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
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 |
|---|---|---|
|
|
@@ -235,3 +235,7 @@ Cargo.lock | |
| __pycache__/ | ||
| *.pyc | ||
| *.pyo | ||
|
|
||
| #docs | ||
| docs/_build | ||
| docs/source/api/ | ||
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,108 @@ | ||
| # Global variables | ||
| # You can set these variables from the command line. | ||
| POETRY = poetry | ||
| SPHINXOPTS = -j auto | ||
| SPHINXBUILD = $(POETRY) run sphinx-build | ||
| PAPER = | ||
| BUILDDIR = _build | ||
| SOURCEDIR = source | ||
|
|
||
| # Internal variables | ||
| PAPEROPT_a4 = -D latex_paper_size=a4 | ||
| PAPEROPT_letter = -D latex_paper_size=letter | ||
| ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR) | ||
| TESTSPHINXOPTS = $(ALLSPHINXOPTS) -W --keep-going | ||
|
|
||
| .PHONY: all | ||
| all: dirhtml | ||
|
|
||
| # Setup commands | ||
| .PHONY: setupenv | ||
| setupenv: | ||
| pip install -q poetry | ||
|
|
||
| .PHONY: setup | ||
| setup: | ||
| $(POETRY) install | ||
| cd .. && npm install | ||
|
|
||
| .PHONY: update | ||
| update: | ||
| $(POETRY) update | ||
|
|
||
| # Clean commands | ||
| .PHONY: pristine | ||
| pristine: clean | ||
| git clean -dfX | ||
|
|
||
| .PHONY: clean | ||
| clean: | ||
| rm -rf $(BUILDDIR)/* | ||
| rm -rf $(SOURCEDIR)/api | ||
|
|
||
| # Generate output commands | ||
| .PHONY: jsdoc | ||
| jsdoc: | ||
| cd .. && npm run js-doc | ||
| @echo | ||
| @echo "JSDoc build finished. The API docs are in ../public/docs/." | ||
|
|
||
| .PHONY: api-pages | ||
| api-pages: jsdoc | ||
| $(POETRY) run python _utils/generate_api_pages.py | ||
|
|
||
| .PHONY: dirhtml | ||
| dirhtml: setup api-pages | ||
| $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml | ||
| @echo | ||
| @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
|
||
| .PHONY: singlehtml | ||
| singlehtml: setup | ||
| $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml | ||
| @echo | ||
| @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." | ||
|
|
||
| .PHONY: epub | ||
| epub: setup | ||
| $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub | ||
| @echo | ||
| @echo "Build finished. The epub file is in $(BUILDDIR)/epub." | ||
|
|
||
| .PHONY: epub3 | ||
| epub3: setup | ||
| $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 | ||
| @echo | ||
| @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." | ||
|
|
||
| .PHONY: multiversion | ||
| multiversion: setup | ||
| $(POETRY) run ./_utils/multiversion.sh | ||
| @echo | ||
| @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
|
||
| .PHONY: redirects | ||
| redirects: setup | ||
| $(POETRY) run redirects-cli fromfile --yaml-file _utils/redirects.yaml --output-dir $(BUILDDIR)/dirhtml | ||
| @echo | ||
| @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
|
||
| # Preview commands | ||
| .PHONY: preview | ||
| preview: setup api-pages | ||
| $(POETRY) run sphinx-autobuild -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml --port 5500 | ||
|
|
||
| .PHONY: multiversionpreview | ||
| multiversionpreview: multiversion | ||
| $(POETRY) run python -m http.server 5500 --directory $(BUILDDIR)/dirhtml | ||
|
|
||
| # Test commands | ||
| .PHONY: test | ||
| test: setup api-pages | ||
| $(SPHINXBUILD) -b dirhtml $(TESTSPHINXOPTS) $(BUILDDIR)/dirhtml | ||
| @echo | ||
| @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
|
||
| .PHONY: linkcheck | ||
| linkcheck: setup | ||
| $(SPHINXBUILD) -b linkcheck $(SOURCEDIR) $(BUILDDIR)/linkcheck | ||
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.
🔧 Please use
uv, just as @Lorak-mmk did in Rust Driver: scylladb/scylla-rust-driver#1528There 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.
It has broader implications since we have this toolchain installed across 15+ docs projects and we have to maintain it. If it makes sense, we'll do it as a follow-up PR and help all projects migrate to
uvat once.We're now upgrading the theme to support Python 3.14 & Sphinx 9. Might be the right time to make the switch (main benefit is
uvis 10–100x faster thanpoetryfor dependency resolution and installs). @annastuchlik, thoughts?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.
Imo main benefit is that uv works, and is not a pain to work with, as compared to any other Python package / project manager.
Some projects already migrated: