Skip to content

Wrap CARMA step function#533

Merged
mattldawson merged 2 commits intomainfrom
develop-486-carma-step
Jul 31, 2025
Merged

Wrap CARMA step function#533
mattldawson merged 2 commits intomainfrom
develop-486-carma-step

Conversation

@mattldawson
Copy link
Copy Markdown
Collaborator

Exposes the CARMASTATE_Step() function to the C and Python APIs.

closes #486

@mattldawson mattldawson requested review from K20shores and Copilot July 31, 2025 17:05
@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 exposes the CARMASTATE_Step() function to the C and Python APIs, allowing users to perform single simulation steps with configurable parameters instead of running the full simulation.

  • Adds new data structures for surface properties and step configuration
  • Implements the step function across the C interface, C++ wrapper, and Python binding
  • Updates test cases to use the new step functionality

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/carma/carma_parameters.F90 Defines Fortran types for surface properties and step configuration
src/carma/interface.F90 Implements the Fortran interface for the step function
include/musica/carma/carma_c_interface.hpp Declares C interface structures and function
include/musica/carma/carma_state.hpp Adds C++ structures and step method declaration
src/carma/carma_state.cpp Implements the C++ step method with parameter conversion
musica/carma.cpp Implements Python binding with parameter parsing
musica/carma.py Adds Python classes and step method
musica/test/test_carma.py Updates test to use step function instead of run
src/test/unit/carma/carma_c_api.cpp Adds C++ unit test for step functionality

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 31, 2025

Codecov Report

❌ Patch coverage is 78.57143% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.68%. Comparing base (1aba63f) to head (21d647e).

Files with missing lines Patch % Lines
src/carma/interface.F90 62.96% 10 Missing ⚠️
src/carma/carma_state.cpp 90.90% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #533      +/-   ##
==========================================
- Coverage   83.73%   83.68%   -0.06%     
==========================================
  Files          51       51              
  Lines        5355     5411      +56     
==========================================
+ Hits         4484     4528      +44     
- Misses        871      883      +12     

☔ 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 5e7156a into main Jul 31, 2025
71 checks passed
@mattldawson mattldawson deleted the develop-486-carma-step branch July 31, 2025 18:18
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 CARMASTATE_Step function

4 participants