From 4d2b9f59b1204f99e7c02dc877259feb9f47f8a2 Mon Sep 17 00:00:00 2001 From: Tetsuo Koyama Date: Fri, 22 Nov 2024 07:29:21 +0900 Subject: [PATCH] Move requirements into pyproject.toml (#391) * Move requirements into pyproject.toml * Delete requirements_docs.txt * Update * Update doc.yml * Update pyproject.toml * Update pyproject.toml * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .github/workflows/doc.yml | 5 +---- pyproject.toml | 45 +++++++++++++++++++++++++++++++++++++++ requirements_docs.txt | 39 --------------------------------- 3 files changed, 46 insertions(+), 43 deletions(-) delete mode 100644 requirements_docs.txt diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 70aa0bd08..59ad4871f 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -30,8 +30,6 @@ jobs: - uses: syphar/restore-virtualenv@v1 id: cache-virtualenv - with: - requirement_files: requirements_docs.txt - name: Install OS Packages run: | @@ -45,7 +43,7 @@ jobs: - name: Install Dependencies run: | sudo apt -y install libgeos-dev - pip install -r requirements_docs.txt + pip install -e .[docs] - name: PyVista Report run: | @@ -114,7 +112,6 @@ jobs: cp README.md tutorial-content/ cp LICENSE tutorial-content/ cp requirements.txt tutorial-content/ - cp requirements_docs.txt tutorial-content/ cp start tutorial-content/ cp Dockerfile tutorial-content/ diff --git a/pyproject.toml b/pyproject.toml index 144830ffa..8d555e5a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,52 @@ [project] +dynamic = ['version'] name = "pyvista-tutorial" requires-python = '>=3.9' +[project.optional-dependencies] +all = ['docs'] +docs = [ + 'Sphinx==8.1.3', + 'cmocean==4.0.3', + 'colorcet==3.1.0', + 'geovista==0.5.3', + 'imageio-ffmpeg==0.5.1', + 'imageio>=2.5.0', + 'ipygany==0.5.0', + 'ipywidgets==8.1.5', + 'jupyter_sphinx==0.5.3', + 'jupyterlab==4.3.0', + 'lxml==5.3.0', + 'matplotlib==3.9.2', + 'meshio==5.3.5', + 'mypy-extensions==1.0.0', + 'mypy==1.13.0', + 'numpydoc==1.8.0', + 'osmnx==1.9.4', + 'pypandoc==1.14', + 'pytest-sphinx==0.6.3', + 'pyvista-xarray==0.1.7', + 'pyvista[all]==0.44.1', + 'scipy==1.14.1', + 'sphinx-autobuild==2024.10.3', + 'sphinx-book-theme==1.1.3', + 'sphinx-copybutton==0.5.2', + 'sphinx-gallery==0.18.0', + 'sphinx-notfound-page==1.0.4', + 'sphinx_design==0.6.1', + 'sphinxcontrib-websupport==2.0.0', + 'sphinxcontrib.asciinema==0.4.2', + 'trame-client==3.4.0', + 'trame-server==3.2.3', + 'trame-vtk==2.8.11', + 'trame-vuetify==2.7.1', + 'trame==3.7.0', + 'trimesh==4.5.1', + 'typed-ast==1.5.5', + 'typing_extensions==4.12.2', + 'vtk<9.4', +] + [tool.ruff] exclude = ['.git', 'build', 'dist', 'doc/_build', 'doc/tutorial', 'pycache__'] indent-width = 4 diff --git a/requirements_docs.txt b/requirements_docs.txt deleted file mode 100644 index 62f19228c..000000000 --- a/requirements_docs.txt +++ /dev/null @@ -1,39 +0,0 @@ -cmocean==4.0.3 -colorcet==3.1.0 -geovista==0.5.3 -imageio>=2.5.0 -imageio-ffmpeg==0.5.1 -ipygany==0.5.0 -ipywidgets==8.1.5 -jupyter_sphinx==0.5.3 -jupyterlab==4.3.0 -lxml==5.3.0 -matplotlib==3.9.2 -meshio==5.3.5 -mypy==1.13.0 -mypy-extensions==1.0.0 -numpydoc==1.8.0 -osmnx==1.9.4 -pypandoc==1.14 -pytest-sphinx==0.6.3 -pyvista-xarray==0.1.7 -pyvista[all]==0.44.1 -scipy==1.14.1 -Sphinx==8.1.3 -sphinx-autobuild==2024.10.3 -sphinx-book-theme==1.1.3 -sphinx-copybutton==0.5.2 -sphinx-gallery==0.18.0 -sphinx-notfound-page==1.0.4 -sphinx_design==0.6.1 -sphinxcontrib-websupport==2.0.0 -sphinxcontrib.asciinema==0.4.2 -trame==3.7.0 -trame-client==3.4.0 -trame-server==3.2.3 -trame-vtk==2.8.11 -trame-vuetify==2.7.1 -trimesh==4.5.1 -typed-ast==1.5.5 -typing_extensions==4.12.2 -vtk<9.4