ngio 0.2.12__py3-none-any.whl → 0.2.13__py3-none-any.whl
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.
- ngio/tables/_validators.py +7 -4
- ngio/tables/tables_container.py +1 -1
- {ngio-0.2.12.dist-info → ngio-0.2.13.dist-info}/METADATA +1 -1
- {ngio-0.2.12.dist-info → ngio-0.2.13.dist-info}/RECORD +6 -6
- {ngio-0.2.12.dist-info → ngio-0.2.13.dist-info}/WHEEL +1 -1
- {ngio-0.2.12.dist-info → ngio-0.2.13.dist-info}/licenses/LICENSE +0 -0
ngio/tables/_validators.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from collections.abc import Iterable
|
|
2
2
|
from typing import Protocol
|
|
3
|
+
from warnings import warn
|
|
3
4
|
|
|
4
5
|
import pandas as pd
|
|
5
6
|
|
|
@@ -78,8 +79,9 @@ def validate_columns(
|
|
|
78
79
|
table_header = table_df.columns
|
|
79
80
|
for column in required_columns:
|
|
80
81
|
if column not in table_header:
|
|
81
|
-
|
|
82
|
-
f"Could not find required column: {column} in the table"
|
|
82
|
+
warn(
|
|
83
|
+
f"Could not find required column: {column} in the table",
|
|
84
|
+
stacklevel=2,
|
|
83
85
|
)
|
|
84
86
|
|
|
85
87
|
if optional_columns is None:
|
|
@@ -88,9 +90,10 @@ def validate_columns(
|
|
|
88
90
|
possible_columns = [*required_columns, *optional_columns]
|
|
89
91
|
for column in table_header:
|
|
90
92
|
if column not in possible_columns:
|
|
91
|
-
|
|
92
|
-
f"Could not find column: {column} in the list of possible columns. "
|
|
93
|
+
warn(
|
|
94
|
+
f"Could not find column: {column} in the list of possible columns. "
|
|
93
95
|
f"Possible columns are: {possible_columns}",
|
|
96
|
+
stacklevel=2,
|
|
94
97
|
)
|
|
95
98
|
|
|
96
99
|
return table_df
|
ngio/tables/tables_container.py
CHANGED
|
@@ -156,7 +156,7 @@ def _get_table_type(handler: ZarrGroupHandler) -> str:
|
|
|
156
156
|
def _get_table_version(handler: ZarrGroupHandler) -> str:
|
|
157
157
|
"""Get the version of the table from the handler."""
|
|
158
158
|
attrs = handler.load_attrs()
|
|
159
|
-
return attrs.get("fractal_table_version", "
|
|
159
|
+
return attrs.get("fractal_table_version", "1")
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
class TablesContainer:
|
|
@@ -31,8 +31,8 @@ ngio/ome_zarr_meta/v04/__init__.py,sha256=dJRzzxyYc81kf-0Hip_bqvbdManaM8XTdQX2me
|
|
|
31
31
|
ngio/ome_zarr_meta/v04/_custom_models.py,sha256=5GxiDERvLuvq4QvApcA6EiKLS6hLFX1R0R_9rSaa85A,530
|
|
32
32
|
ngio/ome_zarr_meta/v04/_v04_spec_utils.py,sha256=05tEr2eEP_XVIfBMOAWLT7lzJV4KS5eYrpK8l94tn3w,15876
|
|
33
33
|
ngio/tables/__init__.py,sha256=gxvNvAgLePgrngOm06H5qU50Axc6boeIs5iCfrmqTi0,609
|
|
34
|
-
ngio/tables/_validators.py,sha256=
|
|
35
|
-
ngio/tables/tables_container.py,sha256=
|
|
34
|
+
ngio/tables/_validators.py,sha256=Y52BY4pfGh5EX3i3sdIYZofRDP4e8xyFMcHN_Cx-xHI,3397
|
|
35
|
+
ngio/tables/tables_container.py,sha256=KaIxpp6Tehes4oLdmJk0LfbdM41j3P55J6BTbsH_P70,10185
|
|
36
36
|
ngio/tables/backends/__init__.py,sha256=Y9MIFefwUaSmhhv5FDZFn7jBdYXDML2FovO-uK-vxgI,936
|
|
37
37
|
ngio/tables/backends/_abstract_backend.py,sha256=--4qeVHs4YRo5i5XsREmDm6BxMsQ5tIqc6XZ810GJno,8776
|
|
38
38
|
ngio/tables/backends/_anndata_utils.py,sha256=DBWIcR0btnH-DIvDvzlcnMXoYhhtXc9DstryiOP0Qsg,3122
|
|
@@ -51,7 +51,7 @@ ngio/utils/_errors.py,sha256=pKQ12LUjQLYE1nUawemA5h7HsgznjaSvV1n2PQU33N0,759
|
|
|
51
51
|
ngio/utils/_fractal_fsspec_store.py,sha256=7qoGLiLi8JQFh9Ej_z5WNwQQuWrujb0f6p9nj8ocsS8,548
|
|
52
52
|
ngio/utils/_logger.py,sha256=HIuqD_2ShfFGDswBddcouStbKfL0Vz_ah8cAIFGhbS8,888
|
|
53
53
|
ngio/utils/_zarr_utils.py,sha256=qOI-HL2HsfFLCj_yxsTR-aq4oHpSqS9KR13aEIvhGDY,13593
|
|
54
|
-
ngio-0.2.
|
|
55
|
-
ngio-0.2.
|
|
56
|
-
ngio-0.2.
|
|
57
|
-
ngio-0.2.
|
|
54
|
+
ngio-0.2.13.dist-info/METADATA,sha256=yUl31cHVoJ1ILC1NrIjUq9XXlSt3r8CHLoGotUlpCt0,5224
|
|
55
|
+
ngio-0.2.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
56
|
+
ngio-0.2.13.dist-info/licenses/LICENSE,sha256=UgN_a1QCeNh9rZWfz-wORQFxE3elQzLWPQaoK6N6fxQ,1502
|
|
57
|
+
ngio-0.2.13.dist-info/RECORD,,
|
|
File without changes
|