Fix df_with_chain2array() silently recycling data with unequal chain lengths#499
Merged
jgabry merged 3 commits intostan-dev:masterfrom Mar 20, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #499 +/- ##
=======================================
Coverage 98.70% 98.70%
=======================================
Files 35 35
Lines 5857 5864 +7
=======================================
+ Hits 5781 5788 +7
Misses 76 76 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jgabry
requested changes
Mar 20, 2026
Member
jgabry
left a comment
There was a problem hiding this comment.
Thanks. I think this is good but the check and error should happen in validate_df_with_chain instead of df_with_chain2array. That's more consistent with how we handle checks for other input types.
jgabry
approved these changes
Mar 20, 2026
Member
jgabry
left a comment
There was a problem hiding this comment.
Thanks, looks good! I just added a couple more things to make this a little more robust. If all tests pass we can merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #498
Summary
ceiling(nrow(a) / n_chain)with the validated per-chain count