Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ updates:
schedule:
interval: "daily"

# Maintain dependencies for Poetry
- package-ecosystem: "pip"
# Maintain dependencies for uv
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "pip"
- package-ecosystem: "uv"
directory: "/docs/_utils"
schedule:
interval: "daily"
8 changes: 6 additions & 2 deletions .github/workflows/docs-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ jobs:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Set up env
run: make -C docs setupenv
Expand Down Expand Up @@ -58,7 +62,7 @@ jobs:
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
contents: write # to read private repo

# Deploy to the github-pages environment
environment:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/docs-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: "Docs / Build PR"
# For more information,
# see https://sphinx-theme.scylladb.com/stable/deployment/production.html#available-workflows

permissions:
contents: read

on:
pull_request:
branches:
Expand All @@ -22,7 +25,10 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Set up env
run: make -C docs setupenv
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/frontend-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Theme / Frontend build"

on:
pull_request:
branches:
- master
paths:
- "src/**"
- "config/**"
- "package.json"
- "package-lock.json"
push:
branches:
- master
paths:
- "src/**"
- "config/**"
- "package.json"
- "package-lock.json"

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 22]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Build frontend
run: npm run build
4 changes: 2 additions & 2 deletions .github/workflows/multiversion-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.12'

- name: Set up requirements
run: python -m pip install -r requirements.txt

- name: Setup extension
run: python setup.py install
run: pip install .

- name: Run tests
run: python -m unittest --verbose
15 changes: 11 additions & 4 deletions .github/workflows/theme-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,29 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Set up env
run: |
make -C docs setupenv
poetry install
uv sync

- name: Run tests
run: poetry run pytest .
run: uv run pytest .
6 changes: 3 additions & 3 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ if git checkout master &&
[ `git rev-list HEAD...origin/master --count` == 0 ] &&
git merge origin/master
then
poetry version patch
poetry build
poetry publish
uv version --bump patch
uv build
uv publish
else
echo "Error: Your local repository has some changes not pushed or"\
"someone has updated the repository while you where editing code."\
Expand Down
18 changes: 9 additions & 9 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Global variables
# You can set these variables from the command line.
POETRY = poetry
UV = uv
SPHINXOPTS = -j auto
SPHINXBUILD = $(POETRY) run sphinx-build
SPHINXBUILD = $(UV) run sphinx-build
PAPER =
BUILDDIR = _build
SOURCEDIR = source
Expand All @@ -19,15 +19,15 @@ all: dirhtml
# Setup commands
.PHONY: setupenv
setupenv:
pip install -q poetry
pip install -q uv

.PHONY: setup
setup:
$(POETRY) install
$(UV) sync

.PHONY: update
update:
$(POETRY) update
$(UV) sync --upgrade

# Clean commands
.PHONY: pristine
Expand Down Expand Up @@ -65,24 +65,24 @@ epub3: setup

.PHONY: multiversion
multiversion: setup
$(POETRY) run sphinx-multiversion source $(BUILDDIR)/dirhtml
$(UV) run sphinx-multiversion source $(BUILDDIR)/dirhtml
@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
$(UV) 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
$(POETRY) run sphinx-autobuild -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml --port 5500
$(UV) run sphinx-autobuild -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml --port 5500

.PHONY: multiversionpreview
multiversionpreview: multiversion
$(POETRY) run python -m http.server 5500 --directory $(BUILDDIR)/dirhtml
$(UV) run python -m http.server 5500 --directory $(BUILDDIR)/dirhtml

# Test commands
.PHONY: test
Expand Down
2 changes: 1 addition & 1 deletion docs/_utils/dependabot_template.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "pip"
- package-ecosystem: "uv"
directory: "/docs"
schedule:
interval: "daily"
Expand Down
31 changes: 14 additions & 17 deletions docs/_utils/pyproject_template.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
[tool.poetry]
[project]
name = "sphinx-docs"
description = "ScyllaDB Documentation"
version = "0.1.0"
authors = ["ScyllaDB Documentation Contributors"]
package-mode = false
requires-python = ">=3.11"
dependencies = [
"pygments>=2.18.0",
"sphinx-scylladb-theme>=1.9.0",
"myst-parser>=5.0.0",
"sphinx-autobuild>=2025.08.25",
"sphinx>=9.0",
"sphinx-multiversion-scylla>=0.3.7",
"sphinx-sitemap>=2.9.0",
"redirects_cli>=0.1.3",
]

[tool.poetry.dependencies]
python = "^3.10"
pygments = "^2.18.0"
sphinx-scylladb-theme = "^1.8.1"
myst-parser = "^3.0.1"
sphinx-autobuild = "^2024.4.19"
Sphinx = "^7.3.7"
sphinx-multiversion-scylla = "^0.3.1"
sphinx-sitemap = "^2.6.0"
redirects_cli ="^0.1.3"

[build-system]
requires = ["poetry>=1.8.0"]
build-backend = "poetry.masonry.api"
[tool.uv]
package = false
25 changes: 5 additions & 20 deletions docs/source/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Setup commands
setupenv
========

Installs system dependencies required to build the docs, such as Poetry.
Installs system dependencies required to build the docs, such as uv.

.. code:: console

Expand All @@ -38,7 +38,7 @@ Updates Python dependencies to the latest version.

make update

As a result, updates the ``poetry.lock`` file.
As a result, updates the ``uv.lock`` file.


Build commands
Expand Down Expand Up @@ -80,31 +80,16 @@ To decrease verbosity, use the option ``-Q``:
Troubleshooting
...............

Issue: pyproject.toml changed significantly since poetry.lock was last generated
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Issue: pyproject.toml changed significantly since uv.lock was last generated
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Solution:**

#. Run the following command:

.. code:: console

poetry lock --no-update

#. Run the `make preview` command again.

Issue: Keyring asks for a password
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This issue is due to a known problem with Poetry that primarily affects GNOME users. For more details, see `poetry/poetry#8761 <https://github.com/python-poetry/poetry/issues/8761>`_.

**Solution:**

#. Edit `docs/Makefile` to add the `POETRY` variable as follows:

.. code::

POETRY = PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry
uv lock

#. Run the `make preview` command again.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/dependabot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ To update all dependencies to the latest versions, use:
cd docs
make update

Then, commit the updated ``poetry.lock`` file and push the changes to the repository.
Then, commit the updated ``uv.lock`` file and push the changes to the repository.
2 changes: 1 addition & 1 deletion docs/source/configuration/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To install MyST:
1. Install the extension:

```console
poetry add myst-parser
uv add myst-parser
```

2. Load the extension in the `conf.py` configuration file:
Expand Down
Loading