Adds tests to test reading of legacy files#92
Open
votti wants to merge 2 commits intoscverse:mainfrom
Open
Conversation
added 2 commits
February 11, 2025 10:37
I noticed errors loading h5mu files from mudata==0.1.2 To generate the test files using this mudata version, uv can be used from within the data archive directory: `uv run create_testfiles.py` The concept of the data archive for legacy files has been modeled from the `anndata` repository.
Modeled after the anndata test for backwards compatibility. Checks if loading of all tests/data/archives/vxxx/mudata.h5mu files can be loaded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a mechanism to test for backwards compatiblity of reading
mudatafiles created with oldermudataversions.This should enable automated detection of breaking of backwards compatiblity in the future and make it easier to add tests if people report backwards incompatiblities.
This test is modeled after the
anndatatests for backwards compatiblity: https://github.com/scverse/anndata/tree/main/tests/data/archiveshttps://github.com/scverse/anndata/blob/main/tests/test_io_backwards_compat.py
Considerations:
uvscritpt header forcreate_testfiles.pyto improve reproduciblity. It may be also feasible to createmudata.h5mufiles by runningcretate_testfiles.pyusing github actions before running the tests. Given how small themudata.h5mufiles are, the overhead of on-the-fly creating the python environments usinguvwould be bigger.mod1andmod2with the correct dimensions in this files. Potentially additional data could be added to make these test more comprehensive.create_testfiles.pyper version: while it may be possible to have one centralisedcreate_testfilesfile/class, It seems more flexible to have one file per version, as this would also enable to make version specific changes/adaptations to the script more easily.