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

use Dataset.sizes instead of Dataset.dims for getting dimension sizes #153

Closed niksirbi closed 3 months ago

niksirbi commented 3 months ago

Description

What is this PR

Why is this PR needed?

Multiple instances of the following warning are being raised during tests:

FutureWarning: The return type of Dataset.dims will be changed to return a set of dimension names in future, in order to be more consistent with DataArray.dims. To access a mapping from dimension names to lengths, please use Dataset.sizes

What does this PR do?

It uses Datasets.sizes instead of Dataset.dims when getting the lengths of each dimension. Dataset.dims is still in use when we simply want the names of the dimensions.

How has this PR been tested?

Existing tests still pass.

Is this a breaking change?

No.

Does this PR require an update to the documentation?

No

Checklist:

sonarcloud[bot] commented 3 months 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

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 99.28%. Comparing base (736eaaa) to head (74d62d0).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #153 +/- ## ======================================= Coverage 99.28% 99.28% ======================================= Files 9 9 Lines 557 557 ======================================= Hits 553 553 Misses 4 4 ```

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