Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new method get_gas_properties() to the CARMA class to retrieve gas configuration data directly from Python without needing to call into Fortran code. This provides a more efficient way to access gas properties that are already available in the gas configuration.
- Added
get_gas_properties()method to returnCARMAGasConfigobjects directly - Includes proper bounds checking with 1-indexed gas indexing
- Added test coverage in the test suite
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| musica/carma.py | Implements the new get_gas_properties() method with bounds checking |
| musica/test/test_carma.py | Adds test call to verify the new method works |
Comments suppressed due to low confidence (1)
musica/test/test_carma.py:64
- The test only prints the result but doesn't verify the returned gas properties. Consider adding assertions to validate that the returned CARMAGasConfig object has expected properties or matches the configuration.
print(carma.get_gas_properties(1))
|
📄 Documentation for this branch is available at: https://ncar.github.io/musica/branch/544-wrap-the-carmagas_get-function/ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #548 +/- ##
=======================================
Coverage 80.20% 80.20%
=======================================
Files 52 52
Lines 5748 5748
=======================================
Hits 4610 4610
Misses 1138 1138 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
closes #544
No need to go into fortran, the information provided in the gas configuration can be returned directly