Skip to content

Add remaining CARMA set functions#538

Merged
mattldawson merged 2 commits intomainfrom
develop-set-functions
Jul 31, 2025
Merged

Add remaining CARMA set functions#538
mattldawson merged 2 commits intomainfrom
develop-set-functions

Conversation

@mattldawson
Copy link
Copy Markdown
Collaborator

@mattldawson mattldawson commented Jul 31, 2025

Adds the remaining CARMA state set functions.

Also updates the python tests to more closely mimic the C++ tests, and fixes an incorrect call to SetBin in the python wrapper

@mattldawson mattldawson added this to the CARMA milestone Jul 31, 2025
@mattldawson mattldawson requested a review from K20shores July 31, 2025 19:07
@mattldawson mattldawson self-assigned this Jul 31, 2025
Copilot AI review requested due to automatic review settings July 31, 2025 19:07
@mattldawson mattldawson added the enhancement New feature or request label Jul 31, 2025
@github-actions
Copy link
Copy Markdown
Contributor

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 the remaining CARMA state setting functions to enable comprehensive state configuration for CARMA simulations. The changes extend the existing API to support setting temperature and air density profiles, while also enhancing the SetBin function to accept an optional surface mass parameter.

  • Adds SetTemperature and SetAirDensity functions across all language bindings (C++, Fortran, Python)
  • Enhances SetBin function with optional surface mass parameter
  • Updates test files to demonstrate and validate the new functionality

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/carma/interface.F90 Adds Fortran interface functions for temperature and air density setting, updates SetBin signature
src/carma/carma_state.cpp Implements C++ SetTemperature and SetAirDensity methods, adds surface_mass parameter to SetBin
include/musica/carma/carma_state.hpp Declares new C++ method signatures with proper documentation
include/musica/carma/carma_c_interface.hpp Adds C interface declarations for new functions
musica/carma.py Implements Python wrapper methods for temperature and air density setting
musica/carma.cpp Adds Python bindings for the new C++ functions
src/test/unit/carma/carma_c_api.cpp Updates C++ tests to use new function signatures and test new capabilities
musica/test/test_carma.py Updates Python tests to demonstrate new state setting functions

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 31, 2025

Codecov Report

❌ Patch coverage is 82.45614% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.27%. Comparing base (9c00816) to head (3544eac).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/carma/carma_state.cpp 72.72% 6 Missing ⚠️
src/carma/interface.F90 81.81% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #538      +/-   ##
==========================================
+ Coverage   83.68%   84.27%   +0.59%     
==========================================
  Files          51       51              
  Lines        5412     5464      +52     
==========================================
+ Hits         4529     4605      +76     
+ Misses        883      859      -24     

☔ 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.

@mattldawson mattldawson merged commit f3bcca9 into main Jul 31, 2025
71 checks passed
@mattldawson mattldawson deleted the develop-set-functions branch July 31, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants