lsst-felis 27.2024.1800__py3-none-any.whl → 27.2024.2000__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.
Potentially problematic release.
This version of lsst-felis might be problematic. Click here for more details.
- felis/datamodel.py +24 -5
- felis/metadata.py +1 -1
- felis/version.py +1 -1
- {lsst_felis-27.2024.1800.dist-info → lsst_felis-27.2024.2000.dist-info}/METADATA +1 -1
- {lsst_felis-27.2024.1800.dist-info → lsst_felis-27.2024.2000.dist-info}/RECORD +11 -11
- {lsst_felis-27.2024.1800.dist-info → lsst_felis-27.2024.2000.dist-info}/COPYRIGHT +0 -0
- {lsst_felis-27.2024.1800.dist-info → lsst_felis-27.2024.2000.dist-info}/LICENSE +0 -0
- {lsst_felis-27.2024.1800.dist-info → lsst_felis-27.2024.2000.dist-info}/WHEEL +0 -0
- {lsst_felis-27.2024.1800.dist-info → lsst_felis-27.2024.2000.dist-info}/entry_points.txt +0 -0
- {lsst_felis-27.2024.1800.dist-info → lsst_felis-27.2024.2000.dist-info}/top_level.txt +0 -0
- {lsst_felis-27.2024.1800.dist-info → lsst_felis-27.2024.2000.dist-info}/zip-safe +0 -0
felis/datamodel.py
CHANGED
|
@@ -178,7 +178,7 @@ class Column(BaseObject):
|
|
|
178
178
|
datatype: DataType
|
|
179
179
|
"""The datatype of the column."""
|
|
180
180
|
|
|
181
|
-
length: int | None = None
|
|
181
|
+
length: int | None = Field(None, gt=0)
|
|
182
182
|
"""The length of the column."""
|
|
183
183
|
|
|
184
184
|
nullable: bool = True
|
|
@@ -276,6 +276,28 @@ class Column(BaseObject):
|
|
|
276
276
|
|
|
277
277
|
return values
|
|
278
278
|
|
|
279
|
+
@model_validator(mode="before")
|
|
280
|
+
@classmethod
|
|
281
|
+
def check_length(cls, values: dict[str, Any]) -> dict[str, Any]:
|
|
282
|
+
"""Check that a valid length is provided for sized types."""
|
|
283
|
+
datatype = values.get("datatype")
|
|
284
|
+
if datatype is None:
|
|
285
|
+
# Skip this validation if datatype is not provided
|
|
286
|
+
return values
|
|
287
|
+
length = values.get("length")
|
|
288
|
+
felis_type = FelisType.felis_type(datatype)
|
|
289
|
+
if felis_type.is_sized and length is None:
|
|
290
|
+
raise ValueError(
|
|
291
|
+
f"Length must be provided for type '{datatype}'"
|
|
292
|
+
+ (f" in column '{values['@id']}'" if "@id" in values else "")
|
|
293
|
+
)
|
|
294
|
+
elif not felis_type.is_sized and length is not None:
|
|
295
|
+
logger.warning(
|
|
296
|
+
f"The datatype '{datatype}' does not support a specified length"
|
|
297
|
+
+ (f" in column '{values['@id']}'" if "@id" in values else "")
|
|
298
|
+
)
|
|
299
|
+
return values
|
|
300
|
+
|
|
279
301
|
@model_validator(mode="after")
|
|
280
302
|
def check_datatypes(self, info: ValidationInfo) -> Column:
|
|
281
303
|
"""Check for redundant datatypes on columns."""
|
|
@@ -291,10 +313,7 @@ class Column(BaseObject):
|
|
|
291
313
|
datatype_func = get_type_func(datatype)
|
|
292
314
|
felis_type = FelisType.felis_type(datatype)
|
|
293
315
|
if felis_type.is_sized:
|
|
294
|
-
|
|
295
|
-
datatype_obj = datatype_func(length)
|
|
296
|
-
else:
|
|
297
|
-
raise ValueError(f"Length must be provided for sized type '{datatype}' in column '{self.id}'")
|
|
316
|
+
datatype_obj = datatype_func(length)
|
|
298
317
|
else:
|
|
299
318
|
datatype_obj = datatype_func()
|
|
300
319
|
|
felis/metadata.py
CHANGED
|
@@ -342,7 +342,7 @@ class MetaDataBuilder:
|
|
|
342
342
|
"""
|
|
343
343
|
args: dict[str, Any] = {
|
|
344
344
|
"name": constraint_obj.name or None,
|
|
345
|
-
"
|
|
345
|
+
"comment": constraint_obj.description or None,
|
|
346
346
|
"deferrable": constraint_obj.deferrable or None,
|
|
347
347
|
"initially": constraint_obj.initially or None,
|
|
348
348
|
}
|
felis/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "27.2024.
|
|
2
|
+
__version__ = "27.2024.2000"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lsst-felis
|
|
3
|
-
Version: 27.2024.
|
|
3
|
+
Version: 27.2024.2000
|
|
4
4
|
Summary: A vocabulary for describing catalogs and acting on those descriptions
|
|
5
5
|
Author-email: Rubin Observatory Data Management <dm-admin@lists.lsst.org>
|
|
6
6
|
License: GNU General Public License v3 or later (GPLv3+)
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
felis/__init__.py,sha256=THmRg3ylB4E73XhFjJX7YlnV_CM3lr_gZO_HqQFzIQ4,937
|
|
2
2
|
felis/cli.py,sha256=l_4srdXPghBLAVuOvfJVdyIVhq45kTV5KYskmYSsIUA,10279
|
|
3
|
-
felis/datamodel.py,sha256=
|
|
4
|
-
felis/metadata.py,sha256=
|
|
3
|
+
felis/datamodel.py,sha256=0LWiqjQgsgn0do4YjVWcf-_5JyJVT6UoFDuVMAULhPI,21351
|
|
4
|
+
felis/metadata.py,sha256=df64ep8F7nY7wiO-Myo1jUJNaNOq12qctSWmyIjGN5k,18910
|
|
5
5
|
felis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
felis/tap.py,sha256=fVYvvIFk_vccXqbcFYdgK2yOfp4P5E4guvsSGktsNxs,16795
|
|
7
7
|
felis/types.py,sha256=z_ECfSxpqiFSGppjxKwCO4fPP7TLBaIN3Qo1AGF16Go,4418
|
|
8
8
|
felis/validation.py,sha256=Zq0gyCvPCwRlhfQ-w_p6ccDTkjcyhxSA1-Gr5plXiZI,3465
|
|
9
|
-
felis/version.py,sha256=
|
|
9
|
+
felis/version.py,sha256=r595UnqkscsF4jOiY5JmQU_5vcab3hyxTNQu_BzY_K0,55
|
|
10
10
|
felis/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
felis/db/_variants.py,sha256=zCuXDgU_x_pTZcWkBLgqQCiOhlA6y2tBt-PUQfafwmM,3368
|
|
12
12
|
felis/db/sqltypes.py,sha256=yFlautQ1hv21MHF4AIfBp7_2m1-exKBfc76xYsMHBgk,5735
|
|
13
|
-
lsst_felis-27.2024.
|
|
14
|
-
lsst_felis-27.2024.
|
|
15
|
-
lsst_felis-27.2024.
|
|
16
|
-
lsst_felis-27.2024.
|
|
17
|
-
lsst_felis-27.2024.
|
|
18
|
-
lsst_felis-27.2024.
|
|
19
|
-
lsst_felis-27.2024.
|
|
20
|
-
lsst_felis-27.2024.
|
|
13
|
+
lsst_felis-27.2024.2000.dist-info/COPYRIGHT,sha256=bUmNy19uUxqITMpjeHFe69q3IzQpjxvvBw6oV7kR7ho,129
|
|
14
|
+
lsst_felis-27.2024.2000.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
15
|
+
lsst_felis-27.2024.2000.dist-info/METADATA,sha256=Qm49lNoYGbRIYgdYduR0mn4S0ZD5hTC6EivMDB7h9co,1191
|
|
16
|
+
lsst_felis-27.2024.2000.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
17
|
+
lsst_felis-27.2024.2000.dist-info/entry_points.txt,sha256=Gk2XFujA_Gp52VBk45g5kim8TDoMDJFPctsMqiq72EM,40
|
|
18
|
+
lsst_felis-27.2024.2000.dist-info/top_level.txt,sha256=F4SvPip3iZRVyISi50CHhwTIAokAhSxjWiVcn4IVWRI,6
|
|
19
|
+
lsst_felis-27.2024.2000.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
20
|
+
lsst_felis-27.2024.2000.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|