-
Notifications
You must be signed in to change notification settings - Fork 10
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
General validator function for checking dimensions and coordinates #294
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #294 +/- ##
=======================================
Coverage 99.77% 99.77%
=======================================
Files 14 15 +1
Lines 884 887 +3
=======================================
+ Hits 882 885 +3
Misses 2 2 ☔ View full report in Codecov by Sentry. |
14d9fc5
to
68a587c
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.
bd317e6
to
c36daf1
Compare
do note validate x,y space coordinates specifically. Co-authored-by: Chang Huan Lo <[email protected]>
c36daf1
to
3411419
Compare
Quality Gate passedIssues Measures |
Thanks again @niksirbi . Made a couple of small changes: refactor test + update old refs to |
Thanks @lochhh! Nice final touches. |
Description
What is this PR
Why is this PR needed?
See #292 and #291
What does this PR do?
Turns a previously private function for validating the existence of dimensions and coordinates into a public function in
validators/arrays.py/validate_dims_coords
. This function is then used in bothkinematics.py
andvector.py
.In kinematics, it's now also used to assert cartesian coordinates for computing displacement, velocity and acceleration.
How has this PR been tested?
Existing test were already indirectly covering this functionality, but I decided to also add some unit tests that directly test this new validator. These tests are also much stricter in checking that the thrown exception has the right error message.
Is this a breaking change?
Nope.
Does this PR require an update to the documentation?
No, API docs will be automatically updated.
Checklist:
Update 2024-09-16
This PR also exposes
compute_time_derivative
as a public function, and thus closes #311, following discussions in #291. This function is not restricted to Cartesian space.