Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick bug fix: subset_do does not need space kwarg #78

Merged
merged 1 commit into from
Feb 26, 2025
Merged

Conversation

anchal-physics
Copy link
Collaborator

space keyword argument was being used in subset_do when use_nodes was true but this requried unnecessary creation of empty dummy input when use_nodes was not true.

With _parent fields in IMASdd ids, we can actually get the space object corresponding to a grid subset. So new functions have been added to get the parent objects:

get_grid_ggd: gets parent grid_ggd from space or grid_subset
get_space: gets corresponding space of a grid_subset from the parent.

New tests for testing subset_tools have been added as well.

Since the previous 3.0.0 has a bug because of this, minor version has been rolled up.

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.59%. Comparing base (d88fbe9) to head (443eddd).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #78      +/-   ##
==========================================
+ Coverage   32.00%   40.59%   +8.59%     
==========================================
  Files           4        4              
  Lines         600      606       +6     
==========================================
+ Hits          192      246      +54     
+ Misses        408      360      -48     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

space keyword argument was being used in subset_do when use_nodes
was true but this requried unnecessary creation of empty dummy input
when use_nodes was not true.

With _parent fields in IMASdd ids, we can actually get the space object
corresponding to a grid subset. So new functions have been added to
get the parent objects:

get_grid_ggd: gets parent grid_ggd from space or grid_subset
get_space: gets corresponding space of a grid_subset from the parent.

Additionally, a minor bug in deepcopy_subset has been fixed.

New tests for testing subset_tools have been added as well.

Since the previous 3.0.0 has a bug because of this, minor version
has been rolled up.
@anchal-physics anchal-physics merged commit 52f4fb9 into master Feb 26, 2025
5 checks passed
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.

1 participant