From 08bd19a999e066cb6043bf564716d8f19eed2da2 Mon Sep 17 00:00:00 2001 From: Joschka Thurner Date: Fri, 6 Dec 2024 14:38:14 +0100 Subject: [PATCH] fix sphinx build test --- .github/workflows/github_test_action.yml | 16 ++++------------ doc/requirements.txt | 3 --- pyproject.toml | 4 ++-- 3 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 doc/requirements.txt diff --git a/.github/workflows/github_test_action.yml b/.github/workflows/github_test_action.yml index a816bec26..c6b0d76f8 100644 --- a/.github/workflows/github_test_action.yml +++ b/.github/workflows/github_test_action.yml @@ -301,21 +301,13 @@ jobs: python -m pytest -W error --nbmake -n=auto --nbmake-timeout=900 "./tutorials" docs_check: + name: Sphinx docs check runs-on: ubuntu-latest - strategy: - matrix: - python-version: [ '3.9' ] steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Check docs for Python ${{ matrix.python-version }} - uses: e2nIEE/sphinx-action@master + - name: Check sphinx build + uses: ammaraskar/sphinx-action@7.4.7 with: - pre-build-command: "apt update && apt upgrade -y && apt install -y build-essential gfortran cmake pkg-config libopenblas-dev; - python -m pip install --upgrade pip; - python -m pip install .[docs];" + pre-build-command: "python -m pip install uv && uv pip install .[docs] --system --link-mode=copy" build-command: "sphinx-build -b html . _build -W" docs-folder: "doc/" diff --git a/doc/requirements.txt b/doc/requirements.txt deleted file mode 100644 index 2433ee980..000000000 --- a/doc/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -sphinx>=5.3.0 -sphinx_rtd_theme>=1.1.1 -numpydoc>=1.5.0 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 98b08cea7..f3906d484 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ Download = "https://pypi.org/project/pandapower/#files" Changelog = "https://github.com/e2nIEE/pandapower/blob/develop/CHANGELOG.rst" [project.optional-dependencies] -docs = ["numpydoc", "matplotlib", "sphinx", "sphinx_rtd_theme", "sphinx-pyproject"] +docs = ["numpydoc>=1.5.0", "matplotlib", "sphinx>=5.3.0", "sphinx_rtd_theme>=1.1.1", "sphinx-pyproject"] plotting = ["plotly>=3.1.1", "matplotlib", "igraph", "geopandas>=1.0"] test = ["pytest~=8.1", "pytest-xdist", "nbmake"] performance = ["ortools", "numba>=0.25", "lightsim2grid==0.9.0"] @@ -68,7 +68,7 @@ converter = ["matpowercaseframes"] pgm = ["power-grid-model-io"] control = ["shapely"] all = [ - "numpydoc", "sphinx", "sphinx_rtd_theme", "sphinx-pyproject", + "numpydoc>=1.5.0", "sphinx>=5.3.0", "sphinx_rtd_theme>=1.1.1", "sphinx-pyproject", "plotly>=3.1.1", "matplotlib", "igraph", "geopandas>=1.0", "pytest~=8.1", "pytest-xdist", "nbmake", "ortools", "numba>=0.25", "lightsim2grid==0.9.0",