From a1aa11f34ea1587b54143f2967893457aff79355 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 20 Mar 2026 15:46:18 -0700 Subject: [PATCH 01/11] setup suntools as its own python library --- pyproject.toml | 1 + tools/README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ tools/pyproject.toml | 30 ++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 tools/README.md create mode 100644 tools/pyproject.toml diff --git a/pyproject.toml b/pyproject.toml index 0fdd151740..2fcbca6b7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ classifiers = [ dependencies = [ "nanobind >= 2.9.2", "numpy >= 2.0.0", + "suntools = 7.6.0" ] [project.optional-dependencies] diff --git a/tools/README.md b/tools/README.md new file mode 100644 index 0000000000..b64f651c0c --- /dev/null +++ b/tools/README.md @@ -0,0 +1,43 @@ +# suntools (SUNDIALS) + +This directory contains the `suntools` Python package, which provides CLI and a library interface for: + +- Structured parsing of logs produced by the SUNDIALS `SUNLogger` including filtering and plotting + +## Install + +From the SUNDIALS repo root: + +```bash +python -m pip install -e tools +``` + +Then import as: + +```python +from suntools import logs +``` + +## CLI Log Parsing Examples + +Filter a SUNLogger logfile (or stdin) down to high-level categories: + +```bash +cat sun.log | suntools parse_logs --filter="integrator,nonlinear,linear" +``` + +Supported filter categories: + +- `integrator` (step-attempt region output) +- `nonlinear` (nonlinear solver output, includes `begin/end-nonlinear-solve` and KINSOL info logs) +- `linear` (linear solver output, includes `begin/end-linear-solve` and KINSOL `kinLs*` scopes) + +Filter using specific scopes: + + +Filter specific functions/regions: + + +Filter based on any keyword: + + diff --git a/tools/pyproject.toml b/tools/pyproject.toml new file mode 100644 index 0000000000..5ebd83427d --- /dev/null +++ b/tools/pyproject.toml @@ -0,0 +1,30 @@ +[build-system] +requires = ["setuptools>=68", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "sundials-suntools" +version = "7.6.0" +description = "Utilities for parsing SUNDIALS SUNLogger output (suntools)." +readme = "README.md" +requires-python = ">=3.9" +license = { text = "BSD-3-Clause" } +authors = [ + { name = "SUNDIALS Developers", email = "sundials-users@llnl.gov" } +] +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent" +] + +[project.urls] +Homepage = "https://computing.llnl.gov/projects/sundials" +Documentation = "https://sundials.readthedocs.io/" +Source = "https://github.com/LLNL/sundials" + +[project.scripts] +suntools = "suntools.cli:main" + +[tool.setuptools] +packages = ["suntools"] From 6ab14d8249b416cfb1e23087be734f2ce3a4d75f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 20 Mar 2026 16:28:30 -0700 Subject: [PATCH 02/11] remove some stuff from README in this branch --- tools/README.md | 28 +--------------------------- tools/pyproject.toml | 5 +---- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/tools/README.md b/tools/README.md index b64f651c0c..4db8a72b1b 100644 --- a/tools/README.md +++ b/tools/README.md @@ -2,8 +2,6 @@ This directory contains the `suntools` Python package, which provides CLI and a library interface for: -- Structured parsing of logs produced by the SUNDIALS `SUNLogger` including filtering and plotting - ## Install From the SUNDIALS repo root: @@ -15,29 +13,5 @@ python -m pip install -e tools Then import as: ```python -from suntools import logs +import suntools ``` - -## CLI Log Parsing Examples - -Filter a SUNLogger logfile (or stdin) down to high-level categories: - -```bash -cat sun.log | suntools parse_logs --filter="integrator,nonlinear,linear" -``` - -Supported filter categories: - -- `integrator` (step-attempt region output) -- `nonlinear` (nonlinear solver output, includes `begin/end-nonlinear-solve` and KINSOL info logs) -- `linear` (linear solver output, includes `begin/end-linear-solve` and KINSOL `kinLs*` scopes) - -Filter using specific scopes: - - -Filter specific functions/regions: - - -Filter based on any keyword: - - diff --git a/tools/pyproject.toml b/tools/pyproject.toml index 5ebd83427d..78b07dbfa0 100644 --- a/tools/pyproject.toml +++ b/tools/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "sundials-suntools" version = "7.6.0" -description = "Utilities for parsing SUNDIALS SUNLogger output (suntools)." +description = "Utilities designed to assist users of the SUNDIALS suite of nonlinear and differential/algebraic equation solvers." readme = "README.md" requires-python = ">=3.9" license = { text = "BSD-3-Clause" } @@ -23,8 +23,5 @@ Homepage = "https://computing.llnl.gov/projects/sundials" Documentation = "https://sundials.readthedocs.io/" Source = "https://github.com/LLNL/sundials" -[project.scripts] -suntools = "suntools.cli:main" - [tool.setuptools] packages = ["suntools"] From 71367718f239edbb3135ea4115724fb11f883281 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 20 Mar 2026 16:31:38 -0700 Subject: [PATCH 03/11] remvoe suntools from sundial4py dependencies --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2fcbca6b7e..cdca0e547d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,8 +21,7 @@ classifiers = [ ] dependencies = [ "nanobind >= 2.9.2", - "numpy >= 2.0.0", - "suntools = 7.6.0" + "numpy >= 2.0.0" ] [project.optional-dependencies] From 75ecc5a605e4110dfe771b73240aadac2952412f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Fri, 20 Mar 2026 16:36:24 -0700 Subject: [PATCH 04/11] update README --- tools/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/README.md b/tools/README.md index 4db8a72b1b..1a280ad93c 100644 --- a/tools/README.md +++ b/tools/README.md @@ -1,6 +1,9 @@ # suntools (SUNDIALS) -This directory contains the `suntools` Python package, which provides CLI and a library interface for: +This directory contains the `suntools` Python package which provides utilities for + +- parsing SUNDIALS log files +- more to come... ## Install From 57647a7690620e48279ada428bf55677e76bb15e Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 13 Apr 2026 14:03:02 -0700 Subject: [PATCH 05/11] make naming and structure consistent --- {tools => suntools}/README.md | 4 ++-- {tools => suntools/examples}/log_example.py | 0 .../examples}/log_example_mri.py | 0 .../examples}/log_example_print.py | 0 {tools => suntools}/pyproject.toml | 20 +++++++++++++------ {tools => suntools/src}/suntools/__init__.py | 0 {tools => suntools/src}/suntools/csv.py | 0 {tools => suntools/src}/suntools/logs.py | 0 {tools => suntools/src}/suntools/table.py | 0 {tools => suntools/src}/suntools/utils.py | 0 10 files changed, 16 insertions(+), 8 deletions(-) rename {tools => suntools}/README.md (79%) rename {tools => suntools/examples}/log_example.py (100%) rename {tools => suntools/examples}/log_example_mri.py (100%) rename {tools => suntools/examples}/log_example_print.py (100%) rename {tools => suntools}/pyproject.toml (69%) rename {tools => suntools/src}/suntools/__init__.py (100%) rename {tools => suntools/src}/suntools/csv.py (100%) rename {tools => suntools/src}/suntools/logs.py (100%) rename {tools => suntools/src}/suntools/table.py (100%) rename {tools => suntools/src}/suntools/utils.py (100%) diff --git a/tools/README.md b/suntools/README.md similarity index 79% rename from tools/README.md rename to suntools/README.md index 1a280ad93c..ac60291cd2 100644 --- a/tools/README.md +++ b/suntools/README.md @@ -7,10 +7,10 @@ This directory contains the `suntools` Python package which provides utilities f ## Install -From the SUNDIALS repo root: +From this directory: ```bash -python -m pip install -e tools +python -m pip install -e . ``` Then import as: diff --git a/tools/log_example.py b/suntools/examples/log_example.py similarity index 100% rename from tools/log_example.py rename to suntools/examples/log_example.py diff --git a/tools/log_example_mri.py b/suntools/examples/log_example_mri.py similarity index 100% rename from tools/log_example_mri.py rename to suntools/examples/log_example_mri.py diff --git a/tools/log_example_print.py b/suntools/examples/log_example_print.py similarity index 100% rename from tools/log_example_print.py rename to suntools/examples/log_example_print.py diff --git a/tools/pyproject.toml b/suntools/pyproject.toml similarity index 69% rename from tools/pyproject.toml rename to suntools/pyproject.toml index 78b07dbfa0..7819da4898 100644 --- a/tools/pyproject.toml +++ b/suntools/pyproject.toml @@ -1,10 +1,10 @@ [build-system] -requires = ["setuptools>=68", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" [project] -name = "sundials-suntools" -version = "7.6.0" +name = "suntools" +version = "7.7.0" description = "Utilities designed to assist users of the SUNDIALS suite of nonlinear and differential/algebraic equation solvers." readme = "README.md" requires-python = ">=3.9" @@ -23,5 +23,13 @@ Homepage = "https://computing.llnl.gov/projects/sundials" Documentation = "https://sundials.readthedocs.io/" Source = "https://github.com/LLNL/sundials" -[tool.setuptools] -packages = ["suntools"] +[tool.hatch.build.targets.wheel] +packages = ["src/suntools"] + +[tool.hatch.build.targets.sdist] +include = [ + "/src/suntools", + "/examples", + "/README.md", + "/pyproject.toml", +] diff --git a/tools/suntools/__init__.py b/suntools/src/suntools/__init__.py similarity index 100% rename from tools/suntools/__init__.py rename to suntools/src/suntools/__init__.py diff --git a/tools/suntools/csv.py b/suntools/src/suntools/csv.py similarity index 100% rename from tools/suntools/csv.py rename to suntools/src/suntools/csv.py diff --git a/tools/suntools/logs.py b/suntools/src/suntools/logs.py similarity index 100% rename from tools/suntools/logs.py rename to suntools/src/suntools/logs.py diff --git a/tools/suntools/table.py b/suntools/src/suntools/table.py similarity index 100% rename from tools/suntools/table.py rename to suntools/src/suntools/table.py diff --git a/tools/suntools/utils.py b/suntools/src/suntools/utils.py similarity index 100% rename from tools/suntools/utils.py rename to suntools/src/suntools/utils.py From a0da7d342e38b40bb3bd2fc686c9994dd17ee7fb Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 13 Apr 2026 14:09:27 -0700 Subject: [PATCH 06/11] Fix imports for python unit tests --- test/unit_tests/suntools/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit_tests/suntools/CMakeLists.txt b/test/unit_tests/suntools/CMakeLists.txt index a79e0e0d22..ce3e0c2d85 100644 --- a/test/unit_tests/suntools/CMakeLists.txt +++ b/test/unit_tests/suntools/CMakeLists.txt @@ -15,8 +15,8 @@ # SUNDIALS Copyright End # --------------------------------------------------------------- -# Locate suntools module -set(SUNTOOLS_DIR "${CMAKE_SOURCE_DIR}/tools/suntools") +# Locate suntools module source directory. +set(SUNTOOLS_DIR "${CMAKE_SOURCE_DIR}/suntools/src/suntools") if(NOT EXISTS "${SUNTOOLS_DIR}/logs.py") message(WARNING "Skipped suntools log parser tests (logs.py not found)") From 9de15bfaba946b4d1b3fe65f7d4020b099c53833 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 13 Apr 2026 14:12:05 -0700 Subject: [PATCH 07/11] update docs --- doc/arkode/examples/source/conf.py | 4 ++-- doc/arkode/guide/source/Usage/ARKStep/User_callable.rst | 2 +- doc/arkode/guide/source/Usage/ERKStep/User_callable.rst | 2 +- doc/arkode/guide/source/Usage/MRIStep/User_callable.rst | 2 +- doc/arkode/guide/source/Usage/SPRKStep/User_callable.rst | 2 +- doc/arkode/guide/source/Usage/User_callable.rst | 2 +- doc/arkode/guide/source/conf.py | 4 ++-- doc/cvode/examples/source/conf.py | 4 ++-- doc/cvode/guide/source/Usage/index.rst | 2 +- doc/cvode/guide/source/conf.py | 4 ++-- doc/cvodes/examples/source/conf.py | 4 ++-- doc/cvodes/guide/source/Usage/SIM.rst | 2 +- doc/cvodes/guide/source/conf.py | 4 ++-- doc/ida/examples/source/conf.py | 4 ++-- doc/ida/guide/source/Usage/index.rst | 2 +- doc/ida/guide/source/conf.py | 4 ++-- doc/idas/examples/source/conf.py | 4 ++-- doc/idas/guide/source/Usage/SIM.rst | 2 +- doc/idas/guide/source/conf.py | 4 ++-- doc/kinsol/examples/source/conf.py | 4 ++-- doc/kinsol/guide/source/Usage/index.rst | 2 +- doc/kinsol/guide/source/conf.py | 4 ++-- doc/shared/sundials/Types.rst | 2 +- doc/superbuild/source/conf.py | 4 ++-- 24 files changed, 37 insertions(+), 37 deletions(-) diff --git a/doc/arkode/examples/source/conf.py b/doc/arkode/examples/source/conf.py index 6eca007d12..ceba91dd3a 100644 --- a/doc/arkode/examples/source/conf.py +++ b/doc/arkode/examples/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ----------------------------------------------------- diff --git a/doc/arkode/guide/source/Usage/ARKStep/User_callable.rst b/doc/arkode/guide/source/Usage/ARKStep/User_callable.rst index 55dcd59817..ac3bea859a 100644 --- a/doc/arkode/guide/source/Usage/ARKStep/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ARKStep/User_callable.rst @@ -3095,7 +3095,7 @@ Main solver optional output functions .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/arkode/guide/source/Usage/ERKStep/User_callable.rst b/doc/arkode/guide/source/Usage/ERKStep/User_callable.rst index a80ca7882e..952a7485d1 100644 --- a/doc/arkode/guide/source/Usage/ERKStep/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ERKStep/User_callable.rst @@ -1668,7 +1668,7 @@ Main solver optional output functions .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/arkode/guide/source/Usage/MRIStep/User_callable.rst b/doc/arkode/guide/source/Usage/MRIStep/User_callable.rst index 4fc4f40397..8d28cb7551 100644 --- a/doc/arkode/guide/source/Usage/MRIStep/User_callable.rst +++ b/doc/arkode/guide/source/Usage/MRIStep/User_callable.rst @@ -1732,7 +1732,7 @@ Main solver optional output functions .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/arkode/guide/source/Usage/SPRKStep/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep/User_callable.rst index 85b327c893..cf0d132058 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep/User_callable.rst @@ -749,7 +749,7 @@ Main solver optional output functions .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index b68d1ce8ec..42e85254e0 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -3907,7 +3907,7 @@ Retrieve the accumulated temporal error estimate :c:func:`ARKodeGetAccumul .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/arkode/guide/source/conf.py b/doc/arkode/guide/source/conf.py index d4a8b6e66b..1f2ede743e 100644 --- a/doc/arkode/guide/source/conf.py +++ b/doc/arkode/guide/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstrings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ---------------------------------------------------- diff --git a/doc/cvode/examples/source/conf.py b/doc/cvode/examples/source/conf.py index 3366212fe2..9998f2ab8b 100644 --- a/doc/cvode/examples/source/conf.py +++ b/doc/cvode/examples/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ----------------------------------------------------- diff --git a/doc/cvode/guide/source/Usage/index.rst b/doc/cvode/guide/source/Usage/index.rst index 7224ba699a..9111052a27 100644 --- a/doc/cvode/guide/source/Usage/index.rst +++ b/doc/cvode/guide/source/Usage/index.rst @@ -3026,7 +3026,7 @@ described next. .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/cvode/guide/source/conf.py b/doc/cvode/guide/source/conf.py index e2bc0b462d..751d788bf6 100644 --- a/doc/cvode/guide/source/conf.py +++ b/doc/cvode/guide/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ---------------------------------------------------- diff --git a/doc/cvodes/examples/source/conf.py b/doc/cvodes/examples/source/conf.py index f48cf85ce7..93baae60b4 100644 --- a/doc/cvodes/examples/source/conf.py +++ b/doc/cvodes/examples/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ----------------------------------------------------- diff --git a/doc/cvodes/guide/source/Usage/SIM.rst b/doc/cvodes/guide/source/Usage/SIM.rst index 2f3c1dc2e0..e90d318b7f 100644 --- a/doc/cvodes/guide/source/Usage/SIM.rst +++ b/doc/cvodes/guide/source/Usage/SIM.rst @@ -3021,7 +3021,7 @@ described next. .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/cvodes/guide/source/conf.py b/doc/cvodes/guide/source/conf.py index 73b00f3e01..6e0334b5c6 100644 --- a/doc/cvodes/guide/source/conf.py +++ b/doc/cvodes/guide/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ---------------------------------------------------- diff --git a/doc/ida/examples/source/conf.py b/doc/ida/examples/source/conf.py index eaff0b4842..5505ad46f0 100644 --- a/doc/ida/examples/source/conf.py +++ b/doc/ida/examples/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ----------------------------------------------------- diff --git a/doc/ida/guide/source/Usage/index.rst b/doc/ida/guide/source/Usage/index.rst index 2f3b992c04..6e2d01904f 100644 --- a/doc/ida/guide/source/Usage/index.rst +++ b/doc/ida/guide/source/Usage/index.rst @@ -2842,7 +2842,7 @@ described next. .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/ida/guide/source/conf.py b/doc/ida/guide/source/conf.py index 38660c7c86..7084392dba 100644 --- a/doc/ida/guide/source/conf.py +++ b/doc/ida/guide/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ---------------------------------------------------- diff --git a/doc/idas/examples/source/conf.py b/doc/idas/examples/source/conf.py index 05cc7e829a..cb3d5d6ec4 100644 --- a/doc/idas/examples/source/conf.py +++ b/doc/idas/examples/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ----------------------------------------------------- diff --git a/doc/idas/guide/source/Usage/SIM.rst b/doc/idas/guide/source/Usage/SIM.rst index 1630210b12..ae208fce63 100644 --- a/doc/idas/guide/source/Usage/SIM.rst +++ b/doc/idas/guide/source/Usage/SIM.rst @@ -2867,7 +2867,7 @@ described next. .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/idas/guide/source/conf.py b/doc/idas/guide/source/conf.py index 8f129d7dce..78073b2fc1 100644 --- a/doc/idas/guide/source/conf.py +++ b/doc/idas/guide/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ---------------------------------------------------- diff --git a/doc/kinsol/examples/source/conf.py b/doc/kinsol/examples/source/conf.py index af0d86625f..b1de10c057 100644 --- a/doc/kinsol/examples/source/conf.py +++ b/doc/kinsol/examples/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ----------------------------------------------------- diff --git a/doc/kinsol/guide/source/Usage/index.rst b/doc/kinsol/guide/source/Usage/index.rst index e9a19da944..a577948e52 100644 --- a/doc/kinsol/guide/source/Usage/index.rst +++ b/doc/kinsol/guide/source/Usage/index.rst @@ -1667,7 +1667,7 @@ functions are described next. .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/kinsol/guide/source/conf.py b/doc/kinsol/guide/source/conf.py index c9c12b55c2..1d2ba354a1 100644 --- a/doc/kinsol/guide/source/conf.py +++ b/doc/kinsol/guide/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) -# Add suntools directory to import python function docstings with autodoc -sys.path.append(os.path.abspath("../../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../../suntools/src")) # -- General configuration ---------------------------------------------------- diff --git a/doc/shared/sundials/Types.rst b/doc/shared/sundials/Types.rst index b2c807a690..1e3b804952 100644 --- a/doc/shared/sundials/Types.rst +++ b/doc/shared/sundials/Types.rst @@ -169,7 +169,7 @@ Output formatting type .. note:: - The Python module ``tools/suntools`` provides utilities to read and output + The Python package ``suntools`` provides utilities to read and output the data from a SUNDIALS CSV output file using the key and value pair format. diff --git a/doc/superbuild/source/conf.py b/doc/superbuild/source/conf.py index c26b9754c2..00c95ebda2 100644 --- a/doc/superbuild/source/conf.py +++ b/doc/superbuild/source/conf.py @@ -20,8 +20,8 @@ sys.path.append(os.path.dirname(os.path.abspath("../../shared"))) -# Add suntools directory to import python function docstrings with autodoc -sys.path.append(os.path.abspath("../../../tools/suntools")) +# Add the suntools package source parent for autodoc imports. +sys.path.append(os.path.abspath("../../../suntools/src")) # -- General configuration ---------------------------------------------------- From 8f3698121b5c67f89a3416c2a9504945cd6c9d63 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Thu, 16 Apr 2026 10:32:23 -0700 Subject: [PATCH 08/11] fix autodoc paths --- doc/arkode/examples/source/conf.py | 2 +- doc/arkode/guide/source/conf.py | 2 +- doc/cvode/examples/source/conf.py | 2 +- doc/cvode/guide/source/conf.py | 2 +- doc/cvodes/examples/source/conf.py | 2 +- doc/cvodes/guide/source/conf.py | 2 +- doc/ida/examples/source/conf.py | 2 +- doc/ida/guide/source/conf.py | 2 +- doc/idas/examples/source/conf.py | 2 +- doc/idas/guide/source/conf.py | 2 +- doc/kinsol/examples/source/conf.py | 2 +- doc/kinsol/guide/source/conf.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/arkode/examples/source/conf.py b/doc/arkode/examples/source/conf.py index f26c29273a..7f45bbd6f1 100644 --- a/doc/arkode/examples/source/conf.py +++ b/doc/arkode/examples/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ----------------------------------------------------- diff --git a/doc/arkode/guide/source/conf.py b/doc/arkode/guide/source/conf.py index cf229e4151..9156c79838 100644 --- a/doc/arkode/guide/source/conf.py +++ b/doc/arkode/guide/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ---------------------------------------------------- diff --git a/doc/cvode/examples/source/conf.py b/doc/cvode/examples/source/conf.py index 519fadfddd..2e875d0f1d 100644 --- a/doc/cvode/examples/source/conf.py +++ b/doc/cvode/examples/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ----------------------------------------------------- diff --git a/doc/cvode/guide/source/conf.py b/doc/cvode/guide/source/conf.py index 89eb44a966..be0cdc6dc4 100644 --- a/doc/cvode/guide/source/conf.py +++ b/doc/cvode/guide/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ---------------------------------------------------- diff --git a/doc/cvodes/examples/source/conf.py b/doc/cvodes/examples/source/conf.py index 7899b5ad64..0732520edd 100644 --- a/doc/cvodes/examples/source/conf.py +++ b/doc/cvodes/examples/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ----------------------------------------------------- diff --git a/doc/cvodes/guide/source/conf.py b/doc/cvodes/guide/source/conf.py index c1c193ced0..2a2b6c9d5a 100644 --- a/doc/cvodes/guide/source/conf.py +++ b/doc/cvodes/guide/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ---------------------------------------------------- diff --git a/doc/ida/examples/source/conf.py b/doc/ida/examples/source/conf.py index 1a69881548..ba82cc8d5d 100644 --- a/doc/ida/examples/source/conf.py +++ b/doc/ida/examples/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ----------------------------------------------------- diff --git a/doc/ida/guide/source/conf.py b/doc/ida/guide/source/conf.py index 6c0ca03ea4..74df562b2b 100644 --- a/doc/ida/guide/source/conf.py +++ b/doc/ida/guide/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ---------------------------------------------------- diff --git a/doc/idas/examples/source/conf.py b/doc/idas/examples/source/conf.py index d83784d470..a06de569be 100644 --- a/doc/idas/examples/source/conf.py +++ b/doc/idas/examples/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ----------------------------------------------------- diff --git a/doc/idas/guide/source/conf.py b/doc/idas/guide/source/conf.py index cf522a0827..72c8498d33 100644 --- a/doc/idas/guide/source/conf.py +++ b/doc/idas/guide/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ---------------------------------------------------- diff --git a/doc/kinsol/examples/source/conf.py b/doc/kinsol/examples/source/conf.py index 025889939d..ef673b3376 100644 --- a/doc/kinsol/examples/source/conf.py +++ b/doc/kinsol/examples/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ----------------------------------------------------- diff --git a/doc/kinsol/guide/source/conf.py b/doc/kinsol/guide/source/conf.py index 47eb9cd313..9a1e10e54c 100644 --- a/doc/kinsol/guide/source/conf.py +++ b/doc/kinsol/guide/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../../suntools/src")) +sys.path.append(os.path.abspath("../../../../suntools/src/suntools")) # -- General configuration ---------------------------------------------------- From ef9662b51a003381e2ad2109fdca7baf45124549 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 17 Apr 2026 14:41:37 -0700 Subject: [PATCH 09/11] fix tools paths in scripts --- .github/workflows/ci.yml | 4 ++-- .gitignore | 3 --- scripts/shared.sh | 2 +- scripts/tarscript.sh | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c840a7a756..888721a9a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,8 +80,8 @@ jobs: CHANGED="$(git diff --name-only "$BASE" "$HEAD")" # Check for changes to trigger documentation build checks - # Updates in doc, bindings/sundials4py, or tools directories - if echo "$CHANGED" | grep -qE '^(doc/|bindings/sundials4py/|tools/)'; then + # Updates in doc, bindings/sundials4py, or suntools directories + if echo "$CHANGED" | grep -qE '^(doc/|bindings/sundials4py/|suntools/)'; then echo "docs=true" >> "$GITHUB_OUTPUT" else echo "docs=false" >> "$GITHUB_OUTPUT" diff --git a/.gitignore b/.gitignore index 86211661fd..3a14244cc3 100644 --- a/.gitignore +++ b/.gitignore @@ -85,9 +85,6 @@ uberenv_libs # swig /swig/swig -# tools -/tools/suntools/__pycache__ - # python .pytest_cache __pycache__ diff --git a/scripts/shared.sh b/scripts/shared.sh index cdfad0f8a5..b82c92a788 100755 --- a/scripts/shared.sh +++ b/scripts/shared.sh @@ -93,4 +93,4 @@ echo " --- Add external files to $tarfile" $tar $tarfile $distrobase/external/ echo " --- Add tools to $tarfile" -$tar $tarfile $distrobase/tools/ +$tar $tarfile $distrobase/suntools/ diff --git a/scripts/tarscript.sh b/scripts/tarscript.sh index d52ede0191..036b317d15 100755 --- a/scripts/tarscript.sh +++ b/scripts/tarscript.sh @@ -210,7 +210,7 @@ mkdir $tmpdir/examples mkdir $tmpdir/include mkdir $tmpdir/src mkdir $tmpdir/test -mkdir $tmpdir/tools +mkdir $tmpdir/suntools #---------------------------------- # Copy appropriate files in $tmpdir From 3db9f70b4cd76a226dabaea13725ed1c3dc5e37b Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 17 Apr 2026 15:34:17 -0700 Subject: [PATCH 10/11] tools --> suntools in more places --- scripts/shared.sh | 2 +- scripts/tarscript.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/shared.sh b/scripts/shared.sh index b82c92a788..7b322bf0a3 100755 --- a/scripts/shared.sh +++ b/scripts/shared.sh @@ -92,5 +92,5 @@ $tar $tarfile $distrobase/test/unit_tests/ echo " --- Add external files to $tarfile" $tar $tarfile $distrobase/external/ -echo " --- Add tools to $tarfile" +echo " --- Add suntools to $tarfile" $tar $tarfile $distrobase/suntools/ diff --git a/scripts/tarscript.sh b/scripts/tarscript.sh index 036b317d15..b967bd5304 100755 --- a/scripts/tarscript.sh +++ b/scripts/tarscript.sh @@ -258,7 +258,7 @@ cp -r $sundialsdir/src/sundomeigest $tmpdir/src/ cp $sundialsdir/test/testRunner $tmpdir/test/ cp -r $sundialsdir/test/unit_tests $tmpdir/test/ -cp -r $sundialsdir/tools $tmpdir/ +cp -r $sundialsdir/suntools $tmpdir/ # Clean up tmpdir rm -rf $tmpdir/doc/shared/__pycache__ @@ -269,7 +269,7 @@ find $tmpdir -name ".DS_Store" -delete # Remove ignored or untracked files that may have been added cd $sundialsdir -for f in $(git ls-files --others --directory benchmarks cmake doc examples external include src test tools); do +for f in $(git ls-files --others --directory benchmarks cmake doc examples external include src test suntools); do rm -rf $tmpdir/$f done cd - From af43a17b65749925a32b3891d5fd052ace653c4b Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 24 May 2026 16:40:09 -0700 Subject: [PATCH 11/11] fix path to suntools --- doc/superbuild/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/superbuild/source/conf.py b/doc/superbuild/source/conf.py index 38fb785801..92fb9223d0 100644 --- a/doc/superbuild/source/conf.py +++ b/doc/superbuild/source/conf.py @@ -21,7 +21,7 @@ sys.path.append(os.path.dirname(os.path.abspath("../../shared"))) # Add the suntools package source parent for autodoc imports. -sys.path.append(os.path.abspath("../../../suntools/src")) +sys.path.append(os.path.abspath("../../../suntools/src/suntools")) # -- General configuration ----------------------------------------------------