lsst-felis 27.2024.2900__py3-none-any.whl → 27.2024.3000__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 +3 -3
- felis/tap.py +24 -7
- felis/version.py +1 -1
- {lsst_felis-27.2024.2900.dist-info → lsst_felis-27.2024.3000.dist-info}/METADATA +1 -1
- {lsst_felis-27.2024.2900.dist-info → lsst_felis-27.2024.3000.dist-info}/RECORD +11 -11
- {lsst_felis-27.2024.2900.dist-info → lsst_felis-27.2024.3000.dist-info}/WHEEL +1 -1
- {lsst_felis-27.2024.2900.dist-info → lsst_felis-27.2024.3000.dist-info}/COPYRIGHT +0 -0
- {lsst_felis-27.2024.2900.dist-info → lsst_felis-27.2024.3000.dist-info}/LICENSE +0 -0
- {lsst_felis-27.2024.2900.dist-info → lsst_felis-27.2024.3000.dist-info}/entry_points.txt +0 -0
- {lsst_felis-27.2024.2900.dist-info → lsst_felis-27.2024.3000.dist-info}/top_level.txt +0 -0
- {lsst_felis-27.2024.2900.dist-info → lsst_felis-27.2024.3000.dist-info}/zip-safe +0 -0
felis/datamodel.py
CHANGED
|
@@ -26,7 +26,7 @@ from __future__ import annotations
|
|
|
26
26
|
import logging
|
|
27
27
|
from collections.abc import Mapping, Sequence
|
|
28
28
|
from enum import StrEnum, auto
|
|
29
|
-
from typing import Annotated, Any,
|
|
29
|
+
from typing import Annotated, Any, TypeAlias
|
|
30
30
|
|
|
31
31
|
from astropy import units as units # type: ignore
|
|
32
32
|
from astropy.io.votable import ucd # type: ignore
|
|
@@ -178,7 +178,7 @@ class Column(BaseObject):
|
|
|
178
178
|
tap_principal: int | None = Field(0, alias="tap:principal", ge=0, le=1)
|
|
179
179
|
"""Whether this is a TAP_SCHEMA principal column."""
|
|
180
180
|
|
|
181
|
-
votable_arraysize: int |
|
|
181
|
+
votable_arraysize: int | str | None = Field(None, alias="votable:arraysize")
|
|
182
182
|
"""VOTable arraysize of the column."""
|
|
183
183
|
|
|
184
184
|
tap_std: int | None = Field(0, alias="tap:std", ge=0, le=1)
|
|
@@ -711,7 +711,7 @@ class SchemaIdVisitor:
|
|
|
711
711
|
class Schema(BaseObject):
|
|
712
712
|
"""Database schema model.
|
|
713
713
|
|
|
714
|
-
This
|
|
714
|
+
This represents a database schema, which contains one or more tables.
|
|
715
715
|
"""
|
|
716
716
|
|
|
717
717
|
version: SchemaVersion | str | None = None
|
felis/tap.py
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
from __future__ import annotations
|
|
25
25
|
|
|
26
26
|
import logging
|
|
27
|
+
import re
|
|
27
28
|
from collections.abc import Iterable, MutableMapping
|
|
28
29
|
from typing import Any
|
|
29
30
|
|
|
@@ -125,7 +126,7 @@ def init_tables(
|
|
|
125
126
|
arraysize = Column(String(10))
|
|
126
127
|
xtype = Column(String(SIMPLE_FIELD_LENGTH))
|
|
127
128
|
# Size is deprecated
|
|
128
|
-
|
|
129
|
+
size = Column("size", Integer(), quote=True)
|
|
129
130
|
description = Column(String(TEXT_FIELD_LENGTH))
|
|
130
131
|
utype = Column(String(SIMPLE_FIELD_LENGTH))
|
|
131
132
|
unit = Column(String(SIMPLE_FIELD_LENGTH))
|
|
@@ -406,12 +407,28 @@ class TapLoadingVisitor:
|
|
|
406
407
|
felis_type = FelisType.felis_type(felis_datatype.value)
|
|
407
408
|
column.datatype = column_obj.votable_datatype or felis_type.votable_name
|
|
408
409
|
|
|
409
|
-
arraysize =
|
|
410
|
-
if felis_type.
|
|
411
|
-
arraysize =
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
410
|
+
column.arraysize = column_obj.votable_arraysize or column_obj.length
|
|
411
|
+
if (felis_type.is_timestamp or column_obj.datatype == "text") and column.arraysize is None:
|
|
412
|
+
column.arraysize = "*"
|
|
413
|
+
|
|
414
|
+
def _is_int(s: str) -> bool:
|
|
415
|
+
try:
|
|
416
|
+
int(s)
|
|
417
|
+
return True
|
|
418
|
+
except ValueError:
|
|
419
|
+
return False
|
|
420
|
+
|
|
421
|
+
# Handle the deprecated size attribute
|
|
422
|
+
arraysize = column_obj.votable_arraysize
|
|
423
|
+
if arraysize is not None and arraysize != "":
|
|
424
|
+
if isinstance(arraysize, int):
|
|
425
|
+
column.size = arraysize
|
|
426
|
+
elif _is_int(arraysize):
|
|
427
|
+
column.size = int(arraysize)
|
|
428
|
+
elif bool(re.match(r"^[0-9]+\*$", arraysize)):
|
|
429
|
+
column.size = int(arraysize.replace("*", ""))
|
|
430
|
+
if column.size is not None:
|
|
431
|
+
logger.debug(f"Set size to {column.size} for {column.column_name} from arraysize {arraysize}")
|
|
415
432
|
|
|
416
433
|
column.xtype = column_obj.votable_xtype
|
|
417
434
|
column.description = column_obj.description
|
felis/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "27.2024.
|
|
2
|
+
__version__ = "27.2024.3000"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lsst-felis
|
|
3
|
-
Version: 27.2024.
|
|
3
|
+
Version: 27.2024.3000
|
|
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,21 +1,21 @@
|
|
|
1
1
|
felis/__init__.py,sha256=THmRg3ylB4E73XhFjJX7YlnV_CM3lr_gZO_HqQFzIQ4,937
|
|
2
2
|
felis/cli.py,sha256=i5FlA9OBecqHP4SISngaveQ7YbWH8pxRGHeOzMOOMyg,14086
|
|
3
|
-
felis/datamodel.py,sha256=
|
|
3
|
+
felis/datamodel.py,sha256=vvktocPqJ3SqPXTtYZ_JE9JuP34657-XlXLfOPg_QvE,26520
|
|
4
4
|
felis/metadata.py,sha256=8r2LM86kdJLSuI0_t--oE3OtRPf-s5aH3FeIDDDAPZ8,13414
|
|
5
5
|
felis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
felis/tap.py,sha256=
|
|
6
|
+
felis/tap.py,sha256=pyLHBWzXCw4F1wDbQiyxyJYPQcye4It2yRuVFoQQK5I,21746
|
|
7
7
|
felis/types.py,sha256=m80GSGfNHQ3-NzRuTzKOyRXLJboPxdk9kzpp1SO8XdY,5510
|
|
8
|
-
felis/version.py,sha256=
|
|
8
|
+
felis/version.py,sha256=SUmRuZYe-__IIcDzR7okIYXuK8vDY9fWnke_sK6YOz4,55
|
|
9
9
|
felis/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
felis/db/dialects.py,sha256=x9ehMbW6OW-v18lwf3v614zdykhTZv0I1a0_gI_ojB0,3510
|
|
11
11
|
felis/db/sqltypes.py,sha256=UNxKCRQU-pAIIGbrXcKUkx6-JwPGqxeqd_fLyN9Oyog,11053
|
|
12
12
|
felis/db/utils.py,sha256=_vWVsPsq_kVl-WQuDeoLY3ZxElGCCEzPp3tfBTENGB8,10200
|
|
13
13
|
felis/db/variants.py,sha256=o5m101upQQbWZD_l8qlB8gt-ZQ9-VqsWZrmxQO1eEQA,5246
|
|
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.
|
|
21
|
-
lsst_felis-27.2024.
|
|
14
|
+
lsst_felis-27.2024.3000.dist-info/COPYRIGHT,sha256=vJAFLFTSF1mhy9eIuA3P6R-3yxTWKQgpig88P-1IzRw,129
|
|
15
|
+
lsst_felis-27.2024.3000.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
16
|
+
lsst_felis-27.2024.3000.dist-info/METADATA,sha256=K9MvbIiUxcXP5SJn75HCLZx4fShI9MLtMZnlRlzO3mQ,1288
|
|
17
|
+
lsst_felis-27.2024.3000.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
|
18
|
+
lsst_felis-27.2024.3000.dist-info/entry_points.txt,sha256=Gk2XFujA_Gp52VBk45g5kim8TDoMDJFPctsMqiq72EM,40
|
|
19
|
+
lsst_felis-27.2024.3000.dist-info/top_level.txt,sha256=F4SvPip3iZRVyISi50CHhwTIAokAhSxjWiVcn4IVWRI,6
|
|
20
|
+
lsst_felis-27.2024.3000.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
21
|
+
lsst_felis-27.2024.3000.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|