Repository navigation
Conversation
6 tasks
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2177 +/- ##
==========================================
- Coverage 78.46% 78.30% -0.16%
==========================================
Files 463 468 +5
Lines 55849 55973 +124
Branches 9169 9166 -3
==========================================
+ Hits 43823 43832 +9
- Misses 8960 9076 +116
+ Partials 3066 3065 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bryanwweber
reviewed
Sep 25, 2026
5 of 6 tasks
Add a utility function that adds directories to Cantera's search path for data files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ssun30
force-pushed
the
matlab_autoConfigure
branch
from
October 8, 2026 01:37
3994922 to
bd75fdf
Compare
The MLTBX ships the compiled interface for each platform together with a self-contained Cantera library and the Cantera data files. Users no longer need a separate Cantera installation or to launch MATLAB from a Conda environment. - ct.install sets the toolbox up once: it saves the data directory shipped with the toolbox (or one given as DataDirectory) as a MATLAB preference and verifies that Cantera loads. Later calls do nothing unless the installation is incomplete or Force is true. - ct.uninstall unloads Cantera and removes the saved preferences, so the toolbox can then be removed in the Add-On Manager. - ct.load requires the interface built for the current platform, adds its folder to the MATLAB path and to the dynamic loader path, and re-adds the data directory saved by ct.install. - ct.isLoaded returns false instead of an error when the interface is not on the MATLAB path. - ctLib becomes a private function, and ct.unload warning identifiers use the 'ct:unload:' form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the scripts the cantera_matlab toolbox uses to build its library to interfaces/matlab/buildUtilities: the library is built with all third-party dependencies vendored and linked statically, and audited for non-system dependencies. The toolbox stages these scripts with the rest of interfaces/matlab and leaves them out of the packaged MLTBX. The new 'matlab-library' job builds this library on each OS image, and 'matlab-bundled' runs the same matrix and tests as the 'matlab' job with it, without installing third-party runtime libraries or preloading OpenBLAS/LAPACK. The existing job can be skipped by setting the repository variable SKIP_MATLAB_SYSTEM_LIBS to 'true'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R2024b is the oldest release supported by the MATLAB toolbox, so test it on every OS image without excluded combinations, installing the Visual C++ 2022 build tools it needs on windows-2025. The library is no longer needed on windows-2022. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The self-contained library has no third-party runtime dependencies, so it should load in-process on every platform, including Linux, where the library built with system dependencies cannot. Load it in-process before running the tests, which then use the loaded library. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ssun30
force-pushed
the
matlab_autoConfigure
branch
from
October 8, 2026 04:04
bd75fdf to
aafc3dc
Compare
With MATLAB R2026b, the clibgen build command on macOS no longer includes a -std flag. With Xcode 15, clang then defaults to C++98 and fails to compile the MATLAB Data API headers, breaking the "MATLAB latest on macos-14" CI job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The interface is built with the system compiler, whose libstdc++ can be newer than the one MATLAB ships. MATLAB R2024b ships the libstdc++ from GCC 12 (up to GLIBCXX_3.4.30), while an interface built with GCC 13 needs GLIBCXX_3.4.32, so it only loaded with the system libstdc++ preloaded. Linking libstdc++ and libgcc statically removes that dependency; the interface loads and passes the tests in-process on R2024b and R2026b without LD_PRELOAD. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the interface and the Cantera library both linked statically against libstdc++, the tests no longer need the system libstdc++ preloaded. Only building the interface still needs it on Linux, where MATLAB R2024b crashes while generating the interface otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MATLAB is tested with the self-contained library that ships with the MATLAB toolbox instead, in the 'matlab-bundled' job. The disabled job is to be removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ssun30
force-pushed
the
matlab_autoConfigure
branch
from
October 8, 2026 09:59
97bf782 to
086b347
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
The MATLAB toolbox is being packaged for MATLAB File Exchange from a separate repository. The package bundles the data files, and MATLAB downloads a self-contained Cantera library (all third-party dependencies statically linked) alongside the compiled interface at install time. This PR adds the MATLAB-side setup for that distribution:
ct.install: a one-time setup that moves the downloaded interface into the toolbox, adds it to the saved MATLAB path, registers the bundled data directory as a persistent preference, and verifies that Cantera loads.ct.uninstall: unloads Cantera and removes the saved path entry and preferences, to be run before removing the toolbox in the Add-On Manager.ct.loadnow puts the interface folder (which also holds the Cantera shared library) on the OS loader path and re-registers the data directory saved byct.install.ct.addDataDirectories.%and\in messages are preserved;ReactorNettolerance setters usemReactornet_setTolerances; warning identifiers inct.unloaduse a valid format; two tests are updated to match current messages and limits.If applicable, fill in the issue number this pull request is fixing
Replaces #2146 since it covers a broader list of changes.
If applicable, provide an example illustrating new features this pull request is introducing
This is a pre-requisite for https://github.com/ssun30/cantera_matlab to move out of pre-alpha stage as it introduces the necessary changes to achieve a true one-click install experience for MATLAB users.
AI Statement (required)
Extensive use of generative AI. ct.install, ct.uninstall, and the changes to
ct.loadandct.isLoadedwere written with an agentic coding tool (Claude Code) from a design I specified: what each function does and how preferences and paths are handled. The tool made implementation decisions, such as removing the prompt-based configuration in favor of a fully automated process running in the background. I reviewed all generated code and tested install, load, reload across MATLAB restarts, and uninstall manually on Windows with MATLAB R2024b.Checklist
scons build&scons test) and unit tests address code coverage