-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Added the ability to append an InferenceData object to an existing netCDF file #2227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review. Thanks for the 2nd PR!
It looks like the PR adds both the option to append to an existing netCDF file and to read/write InferenceData as lower level groups within a user-given base group. Is that right?
Yeah, that's the idea! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the code is good to go now, thanks! Can you add a test too in https://github.com/arviz-devs/arviz/blob/main/arviz/tests/base_tests/test_data.py for this new arguments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last minor nit, I think it will be ready to merge after this round
arviz/tests/base_tests/test_data.py
Outdated
@@ -1294,10 +1294,11 @@ def test_io_function(self, data, eight_schools_params): | |||
os.remove(filepath) | |||
assert not os.path.exists(filepath) | |||
|
|||
@pytest.mark.parametrize("base_group", ['/','/test_group']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the initial / in the group name necessary? If so we should document it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so... not unless the NetCDF interface library requires it.
@OriolAbril is there anything else needed to merge the PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed some black complaints, should be good to go now. Sorry about the slow review cadence, thank you so much for all the PRs!
Codecov Report
@@ Coverage Diff @@
## main #2227 +/- ##
==========================================
- Coverage 87.91% 87.90% -0.01%
==========================================
Files 120 120
Lines 12424 12432 +8
==========================================
+ Hits 10922 10928 +6
- Misses 1502 1504 +2
|
No problem - thank you for the great package! Any idea when there might be a new release? I'd like to stop pinning my software to a github ref! |
Checklist
📚 Documentation preview 📚: https://arviz--2227.org.readthedocs.build/en/2227/