Conversation
|
📄 Documentation for this branch is available at: https://ncar.github.io/musica/branch/tuvx_api/ |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #417 +/- ##
==========================================
- Coverage 86.62% 83.47% -3.15%
==========================================
Files 44 44
Lines 3894 4043 +149
==========================================
+ Hits 3373 3375 +2
- Misses 521 668 +147 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mattldawson
left a comment
There was a problem hiding this comment.
Looks good! Just one minor comment about a comment.
Also, is the output folder needed?
There was a problem hiding this comment.
Pull Request Overview
Adds a JSON-based “config-only” mode to the TUV-x API so users can create, run, and inspect photolysis and heating rates directly from a JSON configuration file.
- Introduce
CreateFromConfigOnly,RunFromConfig, and related getters inmusica::TUVX - Extend the Fortran/C interface and C++ headers to expose the new config-only entry points
- Add a high-level Python
TUVXclass and pybind11 bindings, plus updated tests
Reviewed Changes
Copilot reviewed 24 out of 217 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tuvx/tuvx.cpp | Add is_config_only_mode_, config-only methods |
| src/tuvx/interface.F90 | Implement InternalCreateTuvxFromConfig and stubs |
| include/musica/tuvx/tuvx.hpp | Declare simple interface methods |
| include/musica/tuvx/tuvx_c_interface.hpp | Declare new C interface functions |
| musica/tuvx.py | High-level Python class for JSON config use |
| musica/tuvx.cpp | Bind new functions in pybind11 |
| musica/test/test_tuvx.py | Update tests for JSON config workflow |
| src/test/data/tuvx/fixed/stand_alone_tuvx_config.json | Remove unused test fixture |
Comments suppressed due to low confidence (3)
musica/tuvx.py:44
- [nitpick] The error message hardcodes "windows" but TUV-x is unsupported on Windows and macOS; consider making the message generic or matching the actual unsupported platforms.
raise ValueError("TUV-x backend is not available on windows.")
src/tuvx/interface.F90:501
- The C-binding stub for
InternalGetPhotolysisRateNamesis unimplemented and only setserror_code; add proper string allocation and conversion or document that this function is a placeholder.
subroutine get_photolysis_rate_names_c(tuvx, names, error_code) &
include/musica/tuvx/tuvx_c_interface.hpp:104
- Signature uses
intforconfig_path_lengthbut the Fortran binding usessize_t(could be 64-bit); consider matching types to avoid truncation on large paths.
void *InternalCreateTuvxFromConfig(const char *config_path, int config_path_length, int *error_code);
Co-authored-by: Copilot <[email protected]>
This is the the final PR which closes #400
The first PR I tried to make was #393, but that was too large. Those that replace it are listed below
This PR separates adds all of the functions which create tuv from a config file, which can be done in code or read from disk, and then gets out some photolysis rates.