Skip to content

wrapping group get#545

Merged
K20shores merged 11 commits intomainfrom
541-wrap-carmagroup_get
Aug 1, 2025
Merged

wrapping group get#545
K20shores merged 11 commits intomainfrom
541-wrap-carmagroup_get

Conversation

@K20shores
Copy link
Copy Markdown
Collaborator

Closes #541

I didn't add a test because I don't know what values to get, except for calling it from python which makes sure it doesn't segfault and fail

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

github-actions bot commented Aug 1, 2025

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 implements a new function to retrieve group properties from CARMA, addressing issue #541. The implementation provides access to detailed group-specific parameters like bin radii, masses, optical properties, and element configurations through a new get_group method.

  • Adds GetGroup method to C++ CARMA class that retrieves comprehensive group properties
  • Implements Fortran interface function internal_get_carma_parameters that calls CARMAGROUP_Get
  • Exposes group property retrieval functionality through Python bindings

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/carma/interface.F90 Adds Fortran interface function to retrieve group parameters via CARMAGROUP_Get
src/carma/carma.cpp Implements GetGroup method and updates constructor to store both C++ and C-compatible parameters
musica/test/test_carma.py Adds test call to verify get_group functionality
musica/carma.py Implements Python get_group method and fixes line length formatting issues
musica/carma.cpp Adds Python binding for _get_group method
include/musica/carma/carma_c_interface.hpp Declares InternalGetGroupProperties C interface function
include/musica/carma/carma.hpp Adds CARMAGroupProperties struct and GetGroup method declaration
Comments suppressed due to low confidence (1)

musica/test/test_carma.py:63

  • The test only prints the result but doesn't verify the returned group properties. Consider adding assertions to validate the structure and values of the returned group data.
    print(carma.get_group(1))

subroutine internal_get_carma_parameters(carma_cptr, group_index, nbin, nwav, nelem, bin_radius_ptr, bin_radius_lower_bound_ptr, &
bin_radius_upper_bound_ptr, bin_width_ptr, bin_mass_ptr, &
bin_width_mass_ptr, bin_volume_ptr, projected_area_ratio_ptr, &
radius_ratio_ptr, porusity_ratio_ptr, extinction_coefficient_ptr, &
Copy link

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

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

The variable name 'porusity_ratio_ptr' contains a spelling error. It should be 'porosity_ratio_ptr' (porosity, not porusity).

Copilot uses AI. Check for mistakes.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 1, 2025

Codecov Report

❌ Patch coverage is 9.45946% with 67 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.20%. Comparing base (7be2099) to head (6ffbba5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/carma/interface.F90 0.00% 38 Missing ⚠️
src/carma/carma.cpp 17.14% 29 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #545      +/-   ##
==========================================
- Coverage   81.14%   80.20%   -0.94%     
==========================================
  Files          52       52              
  Lines        5679     5748      +69     
==========================================
+ Hits         4608     4610       +2     
- Misses       1071     1138      +67     

☔ 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 74f5cf5 into main Aug 1, 2025
69 checks passed
@K20shores K20shores deleted the 541-wrap-carmagroup_get branch August 1, 2025 18:29
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 CARMAGROUP_Get

4 participants