-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
extend 'right' join bug fix #1718
Conversation
Regarding tests, I think this one https://github.com/arviz-devs/arviz/blob/main/arviz/tests/base_tests/test_data.py#L782 should be modified to check that not only the attributes are right but the list stored in |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
73b0d36
to
77f2a4c
Compare
i'm sorry, i'm not sure i understand |
the code file probably changed and the line is no longer right. This test https://github.com/arviz-devs/arviz/blob/main/arviz/tests/base_tests/test_data.py#L791-L808 checks that the extended inferencedata has the right attributes with |
I added some extra logic to keep the supported order for the groups (if groups are still in that order) |
Codecov Report
@@ Coverage Diff @@
## main #1718 +/- ##
==========================================
+ Coverage 90.86% 90.90% +0.04%
==========================================
Files 108 113 +5
Lines 11821 12239 +418
==========================================
+ Hits 10741 11126 +385
- Misses 1080 1113 +33
Continue to review full report at Codecov.
|
looks fixed but the test is still missing
don't we take care of that when printing? |
Hmm not sure. I can add tests to my fix pr |
If we do handle the order while printing, then I will remove that extra logic |
I remembered wrong, it's in init: https://github.com/arviz-devs/arviz/blob/main/arviz/data/inference_data.py#L142 |
Ok, I will leave in place. Thanks for checking it out |
Bug:
idata.extend(another_idata, join='right') returns two copies of every group - i.e. posterior, prior
Bug cause:
append should only happen if group not in self
Possible fix - (thanks @OriolAbril )
Note: extend(join='left') works just fine.
Feel free to suggest better fixes or tests or anything needed