Skip to content

Test and document saving movement datasets to Zarr#869

Open
Tushar7012 wants to merge 6 commits intoneuroinformatics-unit:mainfrom
Tushar7012:feat/45-test-document-zarr
Open

Test and document saving movement datasets to Zarr#869
Tushar7012 wants to merge 6 commits intoneuroinformatics-unit:mainfrom
Tushar7012:feat/45-test-document-zarr

Conversation

@Tushar7012
Copy link
Contributor

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Closes #45. Movement datasets can be large and users working with cloud storage or chunked workflows need a way to persist datasets to disk beyond netCDF. Zarr is natively supported by xarray and is well-suited for these use cases. This PR tests and documents that support.

What does this PR do?

  • Adds tests/test_integration/test_zarr.py with integration tests that verify movement datasets of various types (poses, bboxes, processed, derived variables, datetime index) can be saved to Zarr stores using xarray's native to_zarr() method and loaded back with open_zarr(), with full state preserved.
  • Adds a Saving and loading with Zarr section to the Input/Output user guide, directing users to xarray's native methods and linking to the xarray Zarr docs.

No wrapper functions are introduced. This follows the same approach taken for netCDF in #606. No pyproject.toml changes are needed — zarr is already available via the xarray[io] extra, which is part of movement's core dependencies.

References

Closes #45
See also: #606 (the netCDF equivalent that this PR mirrors)

How has this PR been tested?

The Zarr round-trip has been tested in tests/test_integration/test_zarr.py, mirroring the structure of test_netcdf.py. The test suite covers:

  • 8 dataset variants (poses, bboxes, processed, derived variables, datetime index) via test_ds_save_and_load_zarr
  • A single DataArray round-trip via test_da_save_and_load_zarr
  • 9 test cases total, all passing locally

The full test suite (1036 tests) passes with no regressions.

Is this a breaking change?

No.

Does this PR require an update to the documentation?

Yes — a Saving and loading with Zarr section has been added to docs/source/user_guide/input_output.md, immediately after the netCDF section.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copilot AI review requested due to automatic review settings March 5, 2026 17:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8d49d6a) to head (ad16b30).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #869   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           38        38           
  Lines         2284      2284           
=========================================
  Hits          2284      2284           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export pose tracking data to zarr

2 participants