From 2cfc830a9ebec0f2db218f9c48da71dfcd601585 Mon Sep 17 00:00:00 2001 From: Ekin Ozturk Date: Sun, 9 Mar 2025 13:11:50 +0000 Subject: [PATCH 1/8] Fixes readthedocs configuration by adding a build os and tools entry --- .readthedocs.yml | 10 ++++++---- docs/requirements.txt | 7 +++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 5b3103f..d5a59e9 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,6 +4,11 @@ # Required version: 2 +build: + os: "ubuntu-22.04" + tools: + python: "3.12" + # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py @@ -15,9 +20,6 @@ sphinx: # Optionally build your docs in additional formats such as PDF and ePub formats: all -# Optionally set the version of Python and requirements required to build your docs python: - version: 3.7 install: - - requirements: docs/requirements.txt - - requirements: requirements.txt \ No newline at end of file + - requirements: docs/requirements.txt \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 0253e3e..76645a5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,10 +1,9 @@ scipy>=1.4.1 numpy>=1.18.0 -coverage -pytest>=5.4.3 -pytest-cov>=2.10.0 -pytest-xdist>=1.32.0 tqdm>=4.47.0 +torch +torchvision +torchaudio stanford_theme nbsphinx ipython From 03082905a1f7982d7f47a71ec2a29d5ec1d384ba Mon Sep 17 00:00:00 2001 From: Ekin Ozturk Date: Sun, 9 Mar 2025 14:02:21 +0000 Subject: [PATCH 2/8] Update stanford theme to be pulled from `sphinx-theme` --- docs/conf.py | 6 +++--- docs/requirements.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 65af520..bf5f0ec 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,7 +24,7 @@ author = 'Ekin Ozturk' # The full version, including alpha/beta/rc tags -release = '4.4.1' +release = '5.0.0' # -- General configuration --------------------------------------------------- @@ -60,9 +60,9 @@ on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally - import stanford_theme + import sphinx_theme html_theme = 'stanford_theme' - html_theme_path = [stanford_theme.get_html_theme_path()] + html_theme_path = [sphinx_theme.get_html_theme_path('stanford-theme')] # otherwise, readthedocs.org uses their theme by default, so no need to specify it diff --git a/docs/requirements.txt b/docs/requirements.txt index 76645a5..10dfab8 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,7 +4,7 @@ tqdm>=4.47.0 torch torchvision torchaudio -stanford_theme +sphinx_theme nbsphinx ipython pandoc>=1.0.2 \ No newline at end of file From 553306ea1e99aedaf7b50b82a3164196bb9943ad Mon Sep 17 00:00:00 2001 From: Ekin Ozturk Date: Sun, 9 Mar 2025 14:10:14 +0000 Subject: [PATCH 3/8] Fixed theme options for readthedocs and hyperlink to autoray --- docs/conf.py | 5 +++++ docs/installation.rst | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index bf5f0ec..0cf24ad 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -63,6 +63,11 @@ import sphinx_theme html_theme = 'stanford_theme' html_theme_path = [sphinx_theme.get_html_theme_path('stanford-theme')] +else: + html_theme_options = { + "page_width": "75%", + "sidebar_width": "5%" + } # otherwise, readthedocs.org uses their theme by default, so no need to specify it diff --git a/docs/installation.rst b/docs/installation.rst index 261b72b..57ab94f 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -5,7 +5,7 @@ Installing desolver `desolver` is a pure python module that builds upon the functionalities provided by numpy for a relatively efficient numerical integration library. -Furthermore, as `desolver` relies on `autoray ` for the backend of array/tensors operations, `desolver` can easily extend to the use of other libraries such as pytorch, tensorflow, etc. in order to leverage accelerators and optimised gradient computation schemes for faster numerical integration. +Furthermore, as `desolver` relies on `autoray `_ for the backend of array/tensors operations, `desolver` can easily extend to the use of other libraries such as pytorch, tensorflow, etc. in order to leverage accelerators and optimised gradient computation schemes for faster numerical integration. With the use of libraries equipped with automatic differentiation, it is possible to compute the gradients of the integrated system. From a264c0f29d1221c004a7fdb802a7d2adb1b6b25a Mon Sep 17 00:00:00 2001 From: Ekin Ozturk Date: Sun, 9 Mar 2025 14:16:00 +0000 Subject: [PATCH 4/8] Updated theme --- docs/conf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0cf24ad..952ebbc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,8 +65,12 @@ html_theme_path = [sphinx_theme.get_html_theme_path('stanford-theme')] else: html_theme_options = { - "page_width": "75%", - "sidebar_width": "5%" + "page_width": "60%", + "sidebar_width": "12.5%", + "codecov_button": "true", + "github_button": "true", + "github_repo": "desolver", + "github_user": "microno95" } # otherwise, readthedocs.org uses their theme by default, so no need to specify it From 3a9b84d43f9f6221f3edf0adb29228868959acd5 Mon Sep 17 00:00:00 2001 From: Ekin Ozturk Date: Sun, 9 Mar 2025 14:19:29 +0000 Subject: [PATCH 5/8] Updated copyright --- docs/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 952ebbc..9419f65 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,7 +10,6 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -import stanford_theme import os import sys sys.path.insert(0, os.path.abspath('..')) @@ -20,7 +19,7 @@ # -- Project information ----------------------------------------------------- project = 'desolver' -copyright = '2021, Ekin Ozturk' +copyright = '2025, Ekin Ozturk' author = 'Ekin Ozturk' # The full version, including alpha/beta/rc tags From 836b80b05447b58cfe947b048c7bb42380b948e5 Mon Sep 17 00:00:00 2001 From: Ekin Ozturk Date: Sun, 9 Mar 2025 14:27:28 +0000 Subject: [PATCH 6/8] Update configuration --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 9419f65..d131d53 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -34,9 +34,9 @@ extensions = [ "sphinx.ext.autosectionlabel", "nbsphinx", + 'sphinx.ext.autodoc', "sphinx.ext.napoleon", 'sphinx.ext.mathjax', - 'sphinx.ext.githubpages', 'IPython.sphinxext.ipython_console_highlighting', # "sphinx.ext.intersphinx" ] @@ -64,8 +64,8 @@ html_theme_path = [sphinx_theme.get_html_theme_path('stanford-theme')] else: html_theme_options = { - "page_width": "60%", - "sidebar_width": "12.5%", + "page_width": "980px", + "sidebar_width": "180px", "codecov_button": "true", "github_button": "true", "github_repo": "desolver", From 4fcf582e65e92737a7c7235bb530dd30eaccb9cc Mon Sep 17 00:00:00 2001 From: Ekin Ozturk Date: Sun, 9 Mar 2025 14:29:53 +0000 Subject: [PATCH 7/8] Disable concurrent PR actions --- .github/workflows/pytest-ubuntu.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pytest-ubuntu.yml b/.github/workflows/pytest-ubuntu.yml index b8fb31a..d4da438 100644 --- a/.github/workflows/pytest-ubuntu.yml +++ b/.github/workflows/pytest-ubuntu.yml @@ -10,6 +10,10 @@ on: pull_request: branches: [ master ] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: tests: name: Run tests/coverage From 230aa2dac14aa08308c7bb47a077436cd390e2ae Mon Sep 17 00:00:00 2001 From: Ekin Ozturk Date: Sun, 9 Mar 2025 14:33:46 +0000 Subject: [PATCH 8/8] Update requirements.txt to include einops and autoray --- docs/requirements.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 10dfab8..e0e94b6 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,9 +1,8 @@ -scipy>=1.4.1 -numpy>=1.18.0 +numpy>=2 tqdm>=4.47.0 -torch -torchvision -torchaudio +scipy>=1.4.1 +autoray>=0.7.0 +einops>=0.8.0 sphinx_theme nbsphinx ipython