-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add input checking and improve test coverage #131
Conversation
Codecov Report
@@ Coverage Diff @@
## main #131 +/- ##
==========================================
+ Coverage 97.88% 99.20% +1.32%
==========================================
Files 5 5
Lines 236 251 +15
==========================================
+ Hits 231 249 +18
+ Misses 5 2 -3
... and 1 file with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Great! Note the decrease in code coverage - can we add a test for this? |
Good point. That should be straightforward. Thanks for taking a look. |
79cfbc8
to
cdf7f11
Compare
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.
Thanks for making these changes @jamesmbaazam. I've found a few places where some more input checks would be useful. These are internal functions so I appreciate that the inputs are likely to be well known and controlled, but these extra checks would still help to isolate issues during development.
Regarding the tests, some of them have expectations on (some of) the value limits, and it would be good to have these tests for all functions that return values. For functions that take a vector and return outputs, it would also be good to test that the input and output lengths correspond as expected.
15bedac
to
a50f3c3
Compare
Thanks for looking at this review again @jamesmbaazam - I had forgotten about it entirely. Just a note that the commit hashes are not linking to the diff view, but that's no big deal. I'm just wondering why this PR is active now - my impression was that {bpmodels} was being superseded by {epichains} - will these changes be reflected there too? |
They are local hashes. I'm yet to push them. They'll link up when I've pushed them.
Valid question. {epichains} shares these util functions and will benefit from this exercise. My intention is to port over these changes. |
78d270a
to
60b516b
Compare
60b516b
to
78bd84a
Compare
Thanks for reviewing this @pratikunterwegs. I've addressed your comments and will merge this as it's been inactive for a pretty long time because it was deprioritized. I'll port over the changes to {epichains} where I will accept further reviews. |
This PR addresses comments raised in #79 and fixes #113.