From 3a682aecad6e28036d2fef4f2ced764d5cf8c180 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 07:06:43 +0100 Subject: [PATCH 01/20] sphinx documentation --- .github/workflows/sphinx.yml | 30 ++++++++++ .gitignore | 13 +++++ docs/Makefile | 20 +++++++ docs/make.bat | 35 ++++++++++++ docs/source/_static/.gitkeep | 0 docs/source/_templates/.gitkeep | 0 docs/source/api.rst | 12 ++++ docs/source/conf.py | 99 +++++++++++++++++++++++++++++++++ docs/source/index.rst | 20 +++++++ docs/source/requirements.txt | 5 ++ pyproject.toml | 8 +++ 11 files changed, 242 insertions(+) create mode 100644 .github/workflows/sphinx.yml create mode 100644 docs/Makefile create mode 100644 docs/make.bat create mode 100644 docs/source/_static/.gitkeep create mode 100644 docs/source/_templates/.gitkeep create mode 100644 docs/source/api.rst create mode 100644 docs/source/conf.py create mode 100644 docs/source/index.rst create mode 100644 docs/source/requirements.txt diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml new file mode 100644 index 0000000..05d990e --- /dev/null +++ b/.github/workflows/sphinx.yml @@ -0,0 +1,30 @@ +name: "Sphinx: Render docs" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Build HTML + uses: ammaraskar/sphinx-action@master + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: html-docs + path: docs/source/build/html/ + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/source/build/html diff --git a/.gitignore b/.gitignore index af97abc..068ca00 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,16 @@ dist/* .DS_Store __pycache__/ *.pyc + +models/ + +# Sphinx build artifacts +docs/_build/ +docs/build/ +docs/source/_build/ +docs/source/build/ + +# Autosummary/autogenerated pages +docs/source/_autosummary/ +docs/source/_generated/ +docs/source/_api/ diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..9ead246 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# 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 = . +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/make.bat b/docs/make.bat new file mode 100644 index 0000000..8f56beb --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@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 diff --git a/docs/source/_static/.gitkeep b/docs/source/_static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/source/_templates/.gitkeep b/docs/source/_templates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/source/api.rst b/docs/source/api.rst new file mode 100644 index 0000000..5467528 --- /dev/null +++ b/docs/source/api.rst @@ -0,0 +1,12 @@ +.. rst + +API reference +============= + +The public API is documented below. Expand entries to see available classes and functions. + +.. autosummary:: + :toctree: _autosummary + :recursive: + + neural_optimiser diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..bb7b7b1 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,99 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +import os +import sys +from datetime import date + +# Make the src/ directory importable so autodoc can find neural_optimiser +sys.path.insert(0, os.path.abspath("../../src")) + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = "neural-optimiser" +author = "Ewan Wallace" +copyright = f"{date.today().year}, {author}" + +# Dynamic versioning +release = "0.0.0" +try: + from importlib.metadata import PackageNotFoundError, version # py3.8+ + + try: + release = version("neural-optimiser") + except PackageNotFoundError: + try: + from neural_optimiser import __version__ # noqa: F401 + + release = __version__ + except Exception: + pass +except Exception: + pass + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", + "sphinx.ext.intersphinx", + "sphinx.ext.extlinks", + "myst_parser", +] + +extlinks = { + "pyg": ("https://pytorch-geometric.readthedocs.io/en/latest/generated/%s.html", "%s"), +} + +# Support .rst and .md sources +source_suffix = { + ".rst": "restructuredtext", + ".md": "markdown", +} + +templates_path = ["_templates"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "furo" +html_static_path = ["_static"] + +# Autodoc/autosummary +autosummary_generate = True +autodoc_default_options = { + "members": True, + "undoc-members": True, + "inherited-members": True, + "show-inheritance": True, +} +autodoc_typehints = "description" + +# Napoleon (Google/Numpy style docstrings) +napoleon_google_docstring = True +napoleon_numpy_docstring = True +napoleon_attr_annotations = True + +# Intersphinx links +intersphinx_mapping = { + "python": ("https://docs.python.org/3", {}), + "numpy": ("https://numpy.org/doc/stable/", {}), + "torch": ("https://pytorch.org/docs/stable/", {}), +} + +# MyST config +myst_enable_extensions = [ + "colon_fence", + "deflist", + "fieldlist", + "html_admonition", + "html_image", + "tasklist", +] diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..6096151 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,20 @@ +.. neural-optimiser documentation master file, created by + sphinx-quickstart on Thu Oct 23 06:10:35 2025. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +neural-optimiser documentation +============================== + +Overview +-------- + +.. mdinclude:: ../../README.md + +Contents +-------- + +.. toctree:: + :maxdepth: 2 + + api diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt new file mode 100644 index 0000000..1e6167d --- /dev/null +++ b/docs/source/requirements.txt @@ -0,0 +1,5 @@ +# text +sphinx==7.4.* +furo>=2024.1.29 +myst-parser>=3.0.1 +sphinx-autodoc-typehints>=2.3.0 diff --git a/pyproject.toml b/pyproject.toml index 8b25bfc..6de4c49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ dependencies = [ "numpy", "loguru", "universal-pathlib", + "sphinx", ] [project.optional-dependencies] @@ -27,6 +28,13 @@ dev = [ "pre-commit", ] +docs = [ + "sphinx==7.4.*", + "furo>=2024.1.29", + "myst-parser>=3.0.1", + "sphinx-autodoc-typehints>=2.3.0" +] + [tool.uv.sources] torch = { index = "pytorch-cu128" } torch-cluster = { index = "pyg-cu128" } From dd6aba25e88691245523137352dc5cb1607ba3f2 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 07:06:53 +0100 Subject: [PATCH 02/20] typo --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 580b0ae..3dc5045 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Batched optimisation algorithms for neural network potential–driven molecular - IO methods for RDkit molecules and ASE atoms objects. ## Installation -Pre-requisities: Python 3.11, PyTorch and PyTorch Geometric compatible with your envirnment +Pre-requisities: Python 3.11, PyTorch and PyTorch Geometric compatible with your environment. ```bash # For example @@ -136,9 +136,7 @@ class MyCalculator(Calculator): return energies, forces def to_atomic_data(): - pass - - def from_atomic_data(): + # writing this in a batched format is crucial for GPU acceleration pass ``` From 5fc3ede4f1b272231f1f4871556793c8bb3c9b65 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 07:18:45 +0100 Subject: [PATCH 03/20] updated source dir --- docs/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 9ead246..b881cfe 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,8 +5,8 @@ # from the environment for the first two. SPHINXOPTS = SPHINXBUILD = sphinx-build -SOURCEDIR = . -BUILDDIR = build +SOURCEDIR = source +BUILDDIR = source/_build # Put it first so that "make" without argument is like "make help". help: From cd1a27aadeac8870cc4c16b93dc1ef370d750335 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 07:36:28 +0100 Subject: [PATCH 04/20] install dependencies --- .github/workflows/sphinx.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 05d990e..f88925b 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -17,6 +17,11 @@ jobs: persist-credentials: false - name: Build HTML uses: ammaraskar/sphinx-action@master + with: + docs-folder: docs + build-command: make html + # pre-build-command: pip install -r docs/source/requirements.txt + pre-build-command: pip install ".[docs]" - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 1f2104fa3c266cce1d0e038bf06d52a619a62159 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 08:43:27 +0100 Subject: [PATCH 05/20] use requirements.txt --- .github/workflows/sphinx.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index f88925b..f7ca904 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -20,8 +20,8 @@ jobs: with: docs-folder: docs build-command: make html - # pre-build-command: pip install -r docs/source/requirements.txt - pre-build-command: pip install ".[docs]" + pre-build-command: pip install -r docs/source/requirements.txt + # pre-build-command: pip install ".[docs]" - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 70294ed47f9b3089c8e42a6035236623fa87614d Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 08:47:41 +0100 Subject: [PATCH 06/20] sphinx==7.* --- docs/source/requirements.txt | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt index 1e6167d..9573eca 100644 --- a/docs/source/requirements.txt +++ b/docs/source/requirements.txt @@ -1,5 +1,5 @@ # text -sphinx==7.4.* +sphinx==7.* furo>=2024.1.29 myst-parser>=3.0.1 sphinx-autodoc-typehints>=2.3.0 diff --git a/pyproject.toml b/pyproject.toml index 6de4c49..6fb0716 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dev = [ ] docs = [ - "sphinx==7.4.*", + "sphinx==7.*", "furo>=2024.1.29", "myst-parser>=3.0.1", "sphinx-autodoc-typehints>=2.3.0" From d14aa7a720760744ff3d83bfac9f0fd108f9657f Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 08:50:52 +0100 Subject: [PATCH 07/20] sphinx-autodoc==2.0.* --- docs/source/requirements.txt | 4 ++-- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt index 9573eca..7f736da 100644 --- a/docs/source/requirements.txt +++ b/docs/source/requirements.txt @@ -1,5 +1,5 @@ # text -sphinx==7.* +sphinx==7.0.* furo>=2024.1.29 myst-parser>=3.0.1 -sphinx-autodoc-typehints>=2.3.0 +sphinx-autodoc-typehints>=2.0.* diff --git a/pyproject.toml b/pyproject.toml index 6fb0716..3995697 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,10 +29,10 @@ dev = [ ] docs = [ - "sphinx==7.*", + "sphinx==7.0.*", "furo>=2024.1.29", "myst-parser>=3.0.1", - "sphinx-autodoc-typehints>=2.3.0" + "sphinx-autodoc-typehints>=2.0.*" ] [tool.uv.sources] From 7857efb3c9f57054651deaa6868b5976f489f3f7 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 08:53:54 +0100 Subject: [PATCH 08/20] relax versioning --- docs/source/requirements.txt | 9 ++++----- pyproject.toml | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt index 7f736da..83c35ef 100644 --- a/docs/source/requirements.txt +++ b/docs/source/requirements.txt @@ -1,5 +1,4 @@ -# text -sphinx==7.0.* -furo>=2024.1.29 -myst-parser>=3.0.1 -sphinx-autodoc-typehints>=2.0.* +sphinx +furo==2021.11.16 +myst-parser +sphinx-autodoc-typehints diff --git a/pyproject.toml b/pyproject.toml index 3995697..8b1d41e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,10 +29,10 @@ dev = [ ] docs = [ - "sphinx==7.0.*", - "furo>=2024.1.29", - "myst-parser>=3.0.1", - "sphinx-autodoc-typehints>=2.0.*" + "sphinx", + "furo==2021.11.16", + "myst-parser", + "sphinx-autodoc-typehints" ] [tool.uv.sources] From ee34a637279281cf22ba5b47fc8f9e77ad91f46e Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 08:55:25 +0100 Subject: [PATCH 09/20] relax versioning --- docs/source/requirements.txt | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt index 83c35ef..af63115 100644 --- a/docs/source/requirements.txt +++ b/docs/source/requirements.txt @@ -1,4 +1,4 @@ -sphinx +sphinx>=3.0.* furo==2021.11.16 myst-parser sphinx-autodoc-typehints diff --git a/pyproject.toml b/pyproject.toml index 8b1d41e..d612f85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dev = [ ] docs = [ - "sphinx", + "sphinx>=3.0.*", "furo==2021.11.16", "myst-parser", "sphinx-autodoc-typehints" From 350af4af51afa9f979e97d3967a06c2a2f3316e2 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 08:57:09 +0100 Subject: [PATCH 10/20] install from pyproject.toml --- .github/workflows/sphinx.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index f7ca904..f88925b 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -20,8 +20,8 @@ jobs: with: docs-folder: docs build-command: make html - pre-build-command: pip install -r docs/source/requirements.txt - # pre-build-command: pip install ".[docs]" + # pre-build-command: pip install -r docs/source/requirements.txt + pre-build-command: pip install ".[docs]" - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 43d2b46c46e067e5f610e62a26cbac1da8540f15 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 09:00:45 +0100 Subject: [PATCH 11/20] update pip --- .github/workflows/sphinx.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index f88925b..0c3f99c 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -21,7 +21,7 @@ jobs: docs-folder: docs build-command: make html # pre-build-command: pip install -r docs/source/requirements.txt - pre-build-command: pip install ".[docs]" + pre-build-command: pip install --upgrade pip && pip install ".[docs]" - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 123b0e5116bd360b3de27029be0a4c0c9b3327d6 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 09:05:57 +0100 Subject: [PATCH 12/20] use requirements --- .github/workflows/sphinx.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 0c3f99c..9234c99 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -20,8 +20,8 @@ jobs: with: docs-folder: docs build-command: make html - # pre-build-command: pip install -r docs/source/requirements.txt - pre-build-command: pip install --upgrade pip && pip install ".[docs]" + pre-build-command: pip install --upgrade pip && pip install -r docs/source/requirements.txt + # pre-build-command: pip install --upgrade pip && pip install ".[docs]" - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 7ba42eeb1dbc189f776622f1aa43d17019c19588 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 09:08:56 +0100 Subject: [PATCH 13/20] sphinx>=3.0.0 --- docs/source/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt index af63115..4aa8a68 100644 --- a/docs/source/requirements.txt +++ b/docs/source/requirements.txt @@ -1,4 +1,4 @@ -sphinx>=3.0.* +sphinx>=3.0.0 furo==2021.11.16 myst-parser sphinx-autodoc-typehints From cf856f9115dc98610e8384059f95b72af82a7bb8 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 09:10:33 +0100 Subject: [PATCH 14/20] sphinx>=3.0.0 --- .github/workflows/sphinx.yml | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 9234c99..b077f4d 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -20,8 +20,8 @@ jobs: with: docs-folder: docs build-command: make html - pre-build-command: pip install --upgrade pip && pip install -r docs/source/requirements.txt - # pre-build-command: pip install --upgrade pip && pip install ".[docs]" + # pre-build-command: pip install --upgrade pip && pip install -r docs/source/requirements.txt + pre-build-command: pip install --upgrade pip && pip install ".[docs]" - name: Upload artifacts uses: actions/upload-artifact@v4 with: diff --git a/pyproject.toml b/pyproject.toml index d612f85..08770a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dev = [ ] docs = [ - "sphinx>=3.0.*", + "sphinx>=3.0.0", "furo==2021.11.16", "myst-parser", "sphinx-autodoc-typehints" From 3554c9fe7fb0ded034fcce1f59582ea2b468e0c5 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 09:12:29 +0100 Subject: [PATCH 15/20] working requirements --- .github/workflows/sphinx.yml | 3 +-- pyproject.toml | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index b077f4d..6229ffc 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -20,8 +20,7 @@ jobs: with: docs-folder: docs build-command: make html - # pre-build-command: pip install --upgrade pip && pip install -r docs/source/requirements.txt - pre-build-command: pip install --upgrade pip && pip install ".[docs]" + pre-build-command: pip install --upgrade pip && pip install -r docs/source/requirements.txt - name: Upload artifacts uses: actions/upload-artifact@v4 with: diff --git a/pyproject.toml b/pyproject.toml index 08770a0..905272a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,13 +28,6 @@ dev = [ "pre-commit", ] -docs = [ - "sphinx>=3.0.0", - "furo==2021.11.16", - "myst-parser", - "sphinx-autodoc-typehints" -] - [tool.uv.sources] torch = { index = "pytorch-cu128" } torch-cluster = { index = "pyg-cu128" } From bb0792e90774fd52ff711581fbac2e78bae68ab6 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 09:15:32 +0100 Subject: [PATCH 16/20] use pyproject.toml --- .github/workflows/sphinx.yml | 3 ++- pyproject.toml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 6229ffc..583334a 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -20,7 +20,8 @@ jobs: with: docs-folder: docs build-command: make html - pre-build-command: pip install --upgrade pip && pip install -r docs/source/requirements.txt + # pre-build-command: pip install --upgrade pip && pip install -r docs/source/requirements.txt + pre-build-command: pip install --upgrade pip && pip install -e ".[docs]" - name: Upload artifacts uses: actions/upload-artifact@v4 with: diff --git a/pyproject.toml b/pyproject.toml index 905272a..08770a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,13 @@ dev = [ "pre-commit", ] +docs = [ + "sphinx>=3.0.0", + "furo==2021.11.16", + "myst-parser", + "sphinx-autodoc-typehints" +] + [tool.uv.sources] torch = { index = "pytorch-cu128" } torch-cluster = { index = "pyg-cu128" } From c5acc2450f465a45d3e53bbf7efdfb9692f70590 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 09:19:25 +0100 Subject: [PATCH 17/20] install git --- .github/workflows/sphinx.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 583334a..997744c 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -21,7 +21,10 @@ jobs: docs-folder: docs build-command: make html # pre-build-command: pip install --upgrade pip && pip install -r docs/source/requirements.txt - pre-build-command: pip install --upgrade pip && pip install -e ".[docs]" + pre-build-command: | + apt-get update && apt-get install -y git + pip install --upgrade pip + pip install -e ".[docs]" - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 2f451580a902ca60bfbc9b25ff9a4c7cb745a18c Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 09:21:25 +0100 Subject: [PATCH 18/20] use pyproject.toml --- .github/workflows/sphinx.yml | 1 - docs/source/requirements.txt | 4 ---- 2 files changed, 5 deletions(-) delete mode 100644 docs/source/requirements.txt diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 997744c..3be6ff8 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -20,7 +20,6 @@ jobs: with: docs-folder: docs build-command: make html - # pre-build-command: pip install --upgrade pip && pip install -r docs/source/requirements.txt pre-build-command: | apt-get update && apt-get install -y git pip install --upgrade pip diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt deleted file mode 100644 index 4aa8a68..0000000 --- a/docs/source/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -sphinx>=3.0.0 -furo==2021.11.16 -myst-parser -sphinx-autodoc-typehints From 8cda50ddc2d6c9f7873b4ab78d810ce3f179482a Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 09:25:54 +0100 Subject: [PATCH 19/20] remove unused var --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29cb682..2185ae8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,6 @@ permissions: env: UV_VERSION: "0.8" - UV_LINK_MODE: "copy" jobs: build: From 9831ebeca02430ed368c646aa657c1315fec9829 Mon Sep 17 00:00:00 2001 From: Ewan Wallace Date: Thu, 23 Oct 2025 09:26:43 +0100 Subject: [PATCH 20/20] copy ci setup --- .github/workflows/sphinx.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 3be6ff8..cc02683 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ "main" ] +env: + UV_VERSION: "0.8" + jobs: build: runs-on: ubuntu-latest @@ -21,9 +24,12 @@ jobs: docs-folder: docs build-command: make html pre-build-command: | - apt-get update && apt-get install -y git - pip install --upgrade pip - pip install -e ".[docs]" + python -m pip install -U pip + python -m pip install "uv==${{ env.UV_VERSION }}" + uv --version + uv venv + uv pip install -e ".[docs]" + df -h - name: Upload artifacts uses: actions/upload-artifact@v4 with: