neuroinformatics-unit / movement

Python tools for analysing body movements across space and time
http://movement.neuroinformatics.dev
BSD 3-Clause "New" or "Revised" License
77 stars 7 forks source link

Accessor `compute_` to only validate required `position` data variable #206

Closed lochhh closed 3 weeks ago

lochhh commented 3 weeks ago

Description

What is this PR

Why is this PR needed? This PR closes #203

What does this PR do? This PR removes the self.validate() step in move_accessor that validates the entire dataset, and validates only the required position data variable and leaves the time validation up to the compute_ function evoked. This PR also uses log_error that logs and raises an Error, in preference to logger.error + raise calls. Incorrect error types raised are also corrected in this PR (ValueError → AttributeError).

References

203

How has this PR been tested?

Affected tests have been updated accordingly and rerun.

Checklist:

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.68%. Comparing base (53a9eff) to head (a441888). Report is 1 commits behind head on main.

:exclamation: Current head a441888 differs from pull request most recent head dfe7e54

Please upload reports for the commit dfe7e54 to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #206 +/- ## ======================================= Coverage 99.68% 99.68% ======================================= Files 11 11 Lines 634 640 +6 ======================================= + Hits 632 638 +6 Misses 2 2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud