From 2b9a36f5cc61c8de667f3d64ea2a2d669bb405e3 Mon Sep 17 00:00:00 2001 From: Alexey Rybak Date: Wed, 24 Sep 2025 10:35:01 -0700 Subject: [PATCH] docs: Sphinx and Readthedocs deprecation --- .github/workflows/update-readthedocs.yml | 70 ------------------------ .readthedocs.yaml | 25 --------- docs/Makefile | 20 ------- docs/conftest.py | 24 -------- docs/contbuild.sh | 7 --- docs/make.bat | 35 ------------ 6 files changed, 181 deletions(-) delete mode 100644 .github/workflows/update-readthedocs.yml delete mode 100644 .readthedocs.yaml delete mode 100644 docs/Makefile delete mode 100644 docs/conftest.py delete mode 100644 docs/contbuild.sh delete mode 100644 docs/make.bat diff --git a/.github/workflows/update-readthedocs.yml b/.github/workflows/update-readthedocs.yml deleted file mode 100644 index e12f0adf8..000000000 --- a/.github/workflows/update-readthedocs.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Update ReadTheDocs - -run-name: Update the Llama Stack ReadTheDocs site - -on: - workflow_dispatch: - inputs: - branch: - description: 'RTD version to update' - required: false - default: 'latest' - push: - branches: - - main - paths: - - 'docs/**' - - 'pyproject.toml' - - '.github/workflows/update-readthedocs.yml' - tags: - - '*' - pull_request: - branches: - - main - paths: - - 'docs/**' - - 'pyproject.toml' - - '.github/workflows/update-readthedocs.yml' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }} - cancel-in-progress: true - -jobs: - update-readthedocs: - runs-on: ubuntu-latest - env: - TOKEN: ${{ secrets.READTHEDOCS_TOKEN }} - steps: - - name: Checkout repository - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - - name: Install dependencies - uses: ./.github/actions/setup-runner - - - name: Build HTML - run: | - cd docs - uv run make html - - - name: Trigger ReadTheDocs build - if: github.event_name != 'pull_request' - run: | - if [ -z "$TOKEN" ]; then - echo "READTHEDOCS_TOKEN is not set" - exit 1 - fi - - response=$(curl -X POST \ - -H "Content-Type: application/json" \ - -d "{ - \"token\": \"$TOKEN\", - \"version\": \"$GITHUB_REF_NAME\" - }" \ - https://readthedocs.org/api/v2/webhook/llama-stack/289768/) - - echo "Response: $response" - if [ $(echo $response | jq -r '.build_triggered') != 'true' ]; then - echo "Failed to trigger ReadTheDocs build" - exit 1 - fi diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index 461977a6c..000000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# .readthedocs.yaml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -# Build documentation in the "docs/" directory with Sphinx -sphinx: - configuration: docs/source/conf.py - -# Set the OS, Python version and other tools you might need -build: - os: ubuntu-22.04 - tools: - python: "3.12" - jobs: - pre_create_environment: - - asdf plugin add uv - - asdf install uv latest - - asdf global uv latest - create_environment: - - uv venv "${READTHEDOCS_VIRTUALENV_PATH}" - install: - - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --group docs diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 92dd33a1a..000000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conftest.py b/docs/conftest.py deleted file mode 100644 index ab4d7e998..000000000 --- a/docs/conftest.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the terms described in the LICENSE file in -# the root directory of this source tree. - -import os -import time - - -def pytest_collection_modifyitems(items): - for item in items: - item.name = item.name.replace(' ', '_') - - -def pytest_runtest_teardown(item): - interval_seconds = os.getenv("LLAMA_STACK_TEST_INTERVAL_SECONDS") - if interval_seconds: - time.sleep(float(interval_seconds)) - - -def pytest_configure(config): - config.option.tbstyle = "short" - config.option.disable_warnings = True diff --git a/docs/contbuild.sh b/docs/contbuild.sh deleted file mode 100644 index c3687a3c8..000000000 --- a/docs/contbuild.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the terms described in the LICENSE file in -# the root directory of this source tree. - -sphinx-autobuild --write-all source build/html --watch source/ diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 954237b9b..000000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.https://www.sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "" goto help - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd