thyra 3.7.4__tar.gz → 3.7.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. {thyra-3.7.4 → thyra-3.7.5}/PKG-INFO +2 -2
  2. {thyra-3.7.4 → thyra-3.7.5}/pyproject.toml +23 -11
  3. {thyra-3.7.4 → thyra-3.7.5}/thyra/__init__.py +1 -1
  4. {thyra-3.7.4 → thyra-3.7.5}/thyra/converters/spatialdata/_chunking.py +20 -5
  5. {thyra-3.7.4 → thyra-3.7.5}/.gitignore +0 -0
  6. {thyra-3.7.4 → thyra-3.7.5}/LICENSE +0 -0
  7. {thyra-3.7.4 → thyra-3.7.5}/README.md +0 -0
  8. {thyra-3.7.4 → thyra-3.7.5}/thyra/__main__.py +0 -0
  9. {thyra-3.7.4 → thyra-3.7.5}/thyra/alignment/__init__.py +0 -0
  10. {thyra-3.7.4 → thyra-3.7.5}/thyra/alignment/affine.py +0 -0
  11. {thyra-3.7.4 → thyra-3.7.5}/thyra/alignment/teaching_points.py +0 -0
  12. {thyra-3.7.4 → thyra-3.7.5}/thyra/config.py +0 -0
  13. {thyra-3.7.4 → thyra-3.7.5}/thyra/convert.py +0 -0
  14. {thyra-3.7.4 → thyra-3.7.5}/thyra/converters/__init__.py +0 -0
  15. {thyra-3.7.4 → thyra-3.7.5}/thyra/converters/spatialdata/__init__.py +0 -0
  16. {thyra-3.7.4 → thyra-3.7.5}/thyra/converters/spatialdata/base_spatialdata_converter.py +0 -0
  17. {thyra-3.7.4 → thyra-3.7.5}/thyra/converters/spatialdata/converter.py +0 -0
  18. {thyra-3.7.4 → thyra-3.7.5}/thyra/converters/spatialdata/spatialdata_2d_converter.py +0 -0
  19. {thyra-3.7.4 → thyra-3.7.5}/thyra/converters/spatialdata/spatialdata_3d_converter.py +0 -0
  20. {thyra-3.7.4 → thyra-3.7.5}/thyra/converters/spatialdata/streaming_converter.py +0 -0
  21. {thyra-3.7.4 → thyra-3.7.5}/thyra/core/__init__.py +0 -0
  22. {thyra-3.7.4 → thyra-3.7.5}/thyra/core/base_converter.py +0 -0
  23. {thyra-3.7.4 → thyra-3.7.5}/thyra/core/base_extractor.py +0 -0
  24. {thyra-3.7.4 → thyra-3.7.5}/thyra/core/base_reader.py +0 -0
  25. {thyra-3.7.4 → thyra-3.7.5}/thyra/core/registry.py +0 -0
  26. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/__init__.py +0 -0
  27. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/extractors/__init__.py +0 -0
  28. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/extractors/bruker_extractor.py +0 -0
  29. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/extractors/imzml_extractor.py +0 -0
  30. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/extractors/phi_extractor.py +0 -0
  31. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/extractors/waters_extractor.py +0 -0
  32. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/ontology/__init__.py +0 -0
  33. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/ontology/_ims.py +0 -0
  34. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/ontology/_ms.py +0 -0
  35. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/ontology/_uo.py +0 -0
  36. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/ontology/cache.py +0 -0
  37. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/__init__.py +0 -0
  38. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/builder.py +0 -0
  39. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/cli.py +0 -0
  40. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/generate.py +0 -0
  41. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/metaspace.py +0 -0
  42. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/models.py +0 -0
  43. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/msi_metadata.linkml.yaml +0 -0
  44. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/msi_metadata_schema_v0_1.json +0 -0
  45. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/store_io.py +0 -0
  46. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/validate.py +0 -0
  47. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/schema/vocab.py +0 -0
  48. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/types.py +0 -0
  49. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/uns_compat.py +0 -0
  50. {thyra-3.7.4 → thyra-3.7.5}/thyra/metadata/validator.py +0 -0
  51. {thyra-3.7.4 → thyra-3.7.5}/thyra/preview.py +0 -0
  52. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/__init__.py +0 -0
  53. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/__init__.py +0 -0
  54. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/base_bruker_reader.py +0 -0
  55. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/folder_structure.py +0 -0
  56. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/mis_parser.py +0 -0
  57. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/rapiflex/__init__.py +0 -0
  58. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/rapiflex/rapiflex_reader.py +0 -0
  59. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/__init__.py +0 -0
  60. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/sdk/__init__.py +0 -0
  61. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/sdk/dll/LICENCE-BRUKER.txt +0 -0
  62. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/sdk/dll/README.md +0 -0
  63. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/sdk/dll/timsdata.dll +0 -0
  64. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/sdk/dll/timsdata.so +0 -0
  65. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/sdk/dll_manager.py +0 -0
  66. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/sdk/platform_detector.py +0 -0
  67. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/sdk/sdk_functions.py +0 -0
  68. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/timstof_reader.py +0 -0
  69. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/utils/__init__.py +0 -0
  70. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/utils/batch_processor.py +0 -0
  71. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/utils/coordinate_cache.py +0 -0
  72. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/utils/mass_axis_builder.py +0 -0
  73. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/bruker/timstof/utils/memory_manager.py +0 -0
  74. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/imzml/__init__.py +0 -0
  75. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/imzml/imzml_reader.py +0 -0
  76. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/phi/__init__.py +0 -0
  77. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/phi/event_stream.py +0 -0
  78. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/phi/mass_axis.py +0 -0
  79. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/phi/phi_header.py +0 -0
  80. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/phi/phi_reader.py +0 -0
  81. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/waters/__init__.py +0 -0
  82. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/waters/imaging_grid.py +0 -0
  83. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/waters/lib/MLReader.dll +0 -0
  84. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/waters/lib/MassLynxRaw.dll +0 -0
  85. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/waters/lib/libMLReader.so +0 -0
  86. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/waters/lib/libMassLynxRaw.so +0 -0
  87. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/waters/masslynx_lib.py +0 -0
  88. {thyra-3.7.4 → thyra-3.7.5}/thyra/readers/waters/waters_reader.py +0 -0
  89. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/__init__.py +0 -0
  90. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/common_axis.py +0 -0
  91. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/constants.py +0 -0
  92. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/data_characteristics.py +0 -0
  93. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/decision_tree.py +0 -0
  94. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/gaps.py +0 -0
  95. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/instrument_detectors.py +0 -0
  96. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/mass_axis/__init__.py +0 -0
  97. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/mass_axis/base_generator.py +0 -0
  98. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/mass_axis/fticr_generator.py +0 -0
  99. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/mass_axis/linear_generator.py +0 -0
  100. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/mass_axis/linear_tof_generator.py +0 -0
  101. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/mass_axis/orbitrap_generator.py +0 -0
  102. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/mass_axis/reflector_tof_generator.py +0 -0
  103. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/strategies/__init__.py +0 -0
  104. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/strategies/base.py +0 -0
  105. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/strategies/nearest_neighbor.py +0 -0
  106. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/strategies/tic_preserving.py +0 -0
  107. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/tic.py +0 -0
  108. {thyra-3.7.4 → thyra-3.7.5}/thyra/resampling/types.py +0 -0
  109. {thyra-3.7.4 → thyra-3.7.5}/thyra/tools/__init__.py +0 -0
  110. {thyra-3.7.4 → thyra-3.7.5}/thyra/tools/check_ontology.py +0 -0
  111. {thyra-3.7.4 → thyra-3.7.5}/thyra/tools/make_example_data.py +0 -0
  112. {thyra-3.7.4 → thyra-3.7.5}/thyra/utils/__init__.py +0 -0
  113. {thyra-3.7.4 → thyra-3.7.5}/thyra/utils/bruker_exceptions.py +0 -0
  114. {thyra-3.7.4 → thyra-3.7.5}/thyra/utils/logging_config.py +0 -0
  115. {thyra-3.7.4 → thyra-3.7.5}/thyra/utils/pyimzml_direct.py +0 -0
  116. {thyra-3.7.4 → thyra-3.7.5}/thyra/utils/windows_paths.py +0 -0
  117. {thyra-3.7.4 → thyra-3.7.5}/thyra/utils/zarr_atomic_write.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: thyra
3
- Version: 3.7.4
3
+ Version: 3.7.5
4
4
  Summary: A modern Python library for converting Mass Spectrometry Imaging (MSI) data into SpatialData/Zarr format - your portal to spatial omics
5
5
  Project-URL: Homepage, https://github.com/M4i-Imaging-Mass-Spectrometry/thyra
6
6
  Project-URL: Repository, https://github.com/M4i-Imaging-Mass-Spectrometry/thyra
@@ -47,7 +47,7 @@ Requires-Dist: spatialdata<0.9,>=0.8.0
47
47
  Requires-Dist: tifffile>=2022.8.12
48
48
  Requires-Dist: tqdm>=4.50.0
49
49
  Requires-Dist: xarray>=2024.10.0
50
- Requires-Dist: zarr<3.2,>=3.1.4
50
+ Requires-Dist: zarr<3.2,>=3.1.6
51
51
  Description-Content-Type: text/markdown
52
52
 
53
53
  <p align="center">
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "thyra"
7
- version = "3.7.4"
7
+ version = "3.7.5"
8
8
  description = "A modern Python library for converting Mass Spectrometry Imaging (MSI) data into SpatialData/Zarr format - your portal to spatial omics"
9
9
  authors = [{ name = "Theodoros Visvikis", email = "t.visvikis@maastrichtuniversity.nl" }]
10
10
  maintainers = [{ name = "Theodoros Visvikis", email = "t.visvikis@maastrichtuniversity.nl" }]
@@ -91,16 +91,28 @@ dependencies = [
91
91
  # bit ome_zarr 0.12.x with newer dask, and spatialdata 0.8 requires >= 0.16.
92
92
  "ome-zarr>=0.16.0, <0.19", # tested 0.18.0
93
93
  "tqdm>=4.50.0",
94
- # Floor is 3.1.4, and it is load-bearing. anndata >= 0.13 writes every zarr v3
95
- # array with `shards="auto"`. zarr < 3.1.4 sized the auto chunk with
96
- # `max_bytes=1024` where its own comment says "aim for a 1MiB chunk" (compare
97
- # `_auto_partition` in 3.1.3 vs 3.1.4), so one shard -- one FILE -- came out at
98
- # ~1 KB. Measured on test_data/pea.imzML: 393,310 files for a single table and
99
- # 434 s of a 445 s conversion spent in the write, against 12 files and 2.7 s on
100
- # 3.1.6. Nothing in Thyra changed; the anndata 0.13 bump alone did this.
101
- # 3.1.4 is also where `array.target_shard_size_bytes` arrives, which is the
102
- # knob _chunking.table_write_config sets to claim the budget from anndata.
103
- "zarr>=3.1.4, <3.2", # tested 3.1.6
94
+ # Floor is 3.1.6, and it is load-bearing. anndata >= 0.13 writes every zarr v3
95
+ # array with `shards="auto"`, and `_auto_partition` sized the auto INNER chunk
96
+ # with `max_bytes=1024` where the line right above it says "aim for a 1MiB
97
+ # chunk". zarr-python#3603 changed that 1024 to 1048576; it merged six days
98
+ # AFTER 3.1.5 shipped, so 3.1.4 and 3.1.5 both still carry the defect
99
+ # (`chunk_grids.py:267` in each) and 3.1.6 is the first release without it.
100
+ # Do not drop the floor to 3.1.4 on the grounds that 3.1.4 is where
101
+ # `array.target_shard_size_bytes` arrives -- the knob _chunking.table_write_config
102
+ # sets to claim the budget from anndata. That knob is necessary, not sufficient.
103
+ #
104
+ # Both halves of the damage, measured on X/data of test_data/pea.imzML (60.1M
105
+ # nnz, f8, 481 MB):
106
+ # - Below 3.1.4 the knob does not exist, so a shard is 2 auto chunks -- ~1.8 KB,
107
+ # and a shard is one FILE. 393,310 files for a single table, and 434 s of a
108
+ # 445 s conversion spent in the write, against 12 files and 2.7 s on 3.1.6.
109
+ # Nothing in Thyra changed; the anndata 0.13 bump alone did this.
110
+ # - On 3.1.4/3.1.5 the 128 MiB budget IS honoured, so the file count stays sane
111
+ # (4), but the chunk inside those files is 920 B: ~145,900 separately
112
+ # compressed chunks per shard against 142 on 3.1.6, plus the shard index that
113
+ # implies. A 3.1.5 resolve buys that silently, and the shard-level assertion
114
+ # cannot see it; _chunking.MIN_TABLE_CHUNK_BYTES is what catches it.
115
+ "zarr>=3.1.6, <3.2", # tested 3.1.6
104
116
  "imagecodecs>=2024.1.1", # For reading compressed TIFF optical images
105
117
  # Floor is 0.13.2, not 0.13.0. anndata 0.13.0 imports
106
118
  # `typing_extensions.sentinel` (needs typing-extensions >= 4.16) but declares
@@ -36,7 +36,7 @@ warnings.filterwarnings(
36
36
  category=FutureWarning,
37
37
  )
38
38
 
39
- __version__ = "3.7.4"
39
+ __version__ = "3.7.5"
40
40
 
41
41
  # Import key components - avoid wildcard imports
42
42
  try:
@@ -53,13 +53,28 @@ INNER_TILE_EDGE = 512
53
53
  # began auto-sharding, so read amplification is unchanged.
54
54
  TABLE_SHARD_TARGET_BYTES = 128 * 1024 * 1024
55
55
 
56
- # zarr < 3.1.4 computed the auto chunk with ``max_bytes=1024`` where 1 MiB was
57
- # meant, so ``shards="auto"`` produced ~1 KB shards -- one file per KB of table.
58
- # It also predates ``array.target_shard_size_bytes``, making the budget above
59
- # unenforceable. pyproject pins the floor at 3.1.4 for exactly this reason;
60
- # this constant is what the regression test checks the floor still buys us.
56
+ # zarr < 3.1.6 computed the auto chunk with ``max_bytes=1024`` where 1 MiB was
57
+ # meant (zarr-python#3603, first released in 3.1.6 -- it landed after both 3.1.4
58
+ # and 3.1.5). zarr < 3.1.4 additionally predates ``array.target_shard_size_bytes``,
59
+ # making the budget above unenforceable, and there ``shards="auto"`` produced
60
+ # ~1 KB SHARDS -- one file per KB of table. pyproject pins the floor at 3.1.6 for
61
+ # both reasons.
62
+ #
63
+ # This constant guards the shard, i.e. the file, so it only ever catches that
64
+ # second, pre-3.1.4 half: on 3.1.4/3.1.5 the budget above still lands large
65
+ # shards and it is the chunk inside them that collapses. MIN_TABLE_CHUNK_BYTES
66
+ # is the half that catches those two.
61
67
  MIN_TABLE_SHARD_BYTES = 64 * 1024
62
68
 
69
+ # Minimum size for the INNER chunk of a table array -- the unit that sits inside
70
+ # a shard and the unit a random read decompresses. This is the half of the defect
71
+ # a large shard hides: on 3.1.4/3.1.5 the file count looks fine while each file
72
+ # quietly holds ~146,000 separately compressed chunks instead of ~142, and pays
73
+ # for all of them in the shard index. 64 KiB sits well above the ~800 B those
74
+ # versions hand the regression-test fixture and well below the ~200 KB 3.1.6
75
+ # hands it, so the two are never close to the threshold.
76
+ MIN_TABLE_CHUNK_BYTES = 64 * 1024
77
+
63
78
 
64
79
  @contextmanager
65
80
  def table_write_config() -> Iterator[None]:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes