Skip to content

get gas config#548

Merged
K20shores merged 3 commits intomainfrom
544-wrap-the-carmagas_get-function
Aug 1, 2025
Merged

get gas config#548
K20shores merged 3 commits intomainfrom
544-wrap-the-carmagas_get-function

Conversation

@K20shores
Copy link
Copy Markdown
Collaborator

closes #544

No need to go into fortran, the information provided in the gas configuration can be returned directly

@K20shores K20shores linked an issue Aug 1, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 return CARMAGasConfig objects 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))

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 1, 2025

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.20%. Comparing base (872d066) to head (41e57e0).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@K20shores K20shores merged commit 9a77625 into main Aug 1, 2025
69 checks passed
@K20shores K20shores deleted the 544-wrap-the-carmagas_get-function branch August 1, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrap the CARMAGAS_Get function

4 participants