lsst-felis 27.2024.3200__tar.gz → 27.2024.3400__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.
Potentially problematic release.
This version of lsst-felis might be problematic. Click here for more details.
- {lsst_felis-27.2024.3200/python/lsst_felis.egg-info → lsst_felis-27.2024.3400}/PKG-INFO +1 -1
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/datamodel.py +26 -1
- lsst_felis-27.2024.3400/python/felis/version.py +2 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400/python/lsst_felis.egg-info}/PKG-INFO +1 -1
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/tests/test_datamodel.py +12 -0
- lsst_felis-27.2024.3200/python/felis/version.py +0 -2
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/COPYRIGHT +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/LICENSE +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/README.rst +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/pyproject.toml +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/__init__.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/cli.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/db/__init__.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/db/dialects.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/db/sqltypes.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/db/utils.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/db/variants.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/metadata.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/py.typed +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/tap.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/tests/__init__.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/tests/postgresql.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/felis/types.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/lsst_felis.egg-info/SOURCES.txt +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/lsst_felis.egg-info/dependency_links.txt +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/lsst_felis.egg-info/entry_points.txt +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/lsst_felis.egg-info/requires.txt +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/lsst_felis.egg-info/top_level.txt +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/lsst_felis.egg-info/zip-safe +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/setup.cfg +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/tests/test_cli.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/tests/test_metadata.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/tests/test_postgresql.py +0 -0
- {lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/tests/test_tap.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lsst-felis
|
|
3
|
-
Version: 27.2024.
|
|
3
|
+
Version: 27.2024.3400
|
|
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+)
|
|
@@ -492,7 +492,7 @@ class Table(BaseObject):
|
|
|
492
492
|
tap_table_index: int | None = Field(None, alias="tap:table_index")
|
|
493
493
|
"""IVOA TAP_SCHEMA table index of the table."""
|
|
494
494
|
|
|
495
|
-
mysql_engine: str | None = Field(
|
|
495
|
+
mysql_engine: str | None = Field("MyISAM", alias="mysql:engine")
|
|
496
496
|
"""MySQL engine to use for the table."""
|
|
497
497
|
|
|
498
498
|
mysql_charset: str | None = Field(None, alias="mysql:charset")
|
|
@@ -773,6 +773,31 @@ class Schema(BaseObject):
|
|
|
773
773
|
table_indicies.add(table_index)
|
|
774
774
|
return self
|
|
775
775
|
|
|
776
|
+
@model_validator(mode="after")
|
|
777
|
+
def check_unique_constraint_names(self: Schema) -> Schema:
|
|
778
|
+
"""Check for duplicate constraint names in the schema.
|
|
779
|
+
|
|
780
|
+
Raises
|
|
781
|
+
------
|
|
782
|
+
ValueError
|
|
783
|
+
Raised if duplicate constraint names are found in the schema.
|
|
784
|
+
"""
|
|
785
|
+
constraint_names = set()
|
|
786
|
+
duplicate_names = []
|
|
787
|
+
|
|
788
|
+
for table in self.tables:
|
|
789
|
+
for constraint in table.constraints:
|
|
790
|
+
constraint_name = constraint.name
|
|
791
|
+
if constraint_name in constraint_names:
|
|
792
|
+
duplicate_names.append(constraint_name)
|
|
793
|
+
else:
|
|
794
|
+
constraint_names.add(constraint_name)
|
|
795
|
+
|
|
796
|
+
if duplicate_names:
|
|
797
|
+
raise ValueError(f"Duplicate constraint names found in schema: {duplicate_names}")
|
|
798
|
+
|
|
799
|
+
return self
|
|
800
|
+
|
|
776
801
|
def _create_id_map(self: Schema) -> Schema:
|
|
777
802
|
"""Create a map of IDs to objects.
|
|
778
803
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lsst-felis
|
|
3
|
-
Version: 27.2024.
|
|
3
|
+
Version: 27.2024.3400
|
|
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+)
|
|
@@ -466,6 +466,18 @@ class SchemaTestCase(unittest.TestCase):
|
|
|
466
466
|
# Test that an invalid id raises an exception.
|
|
467
467
|
sch["#bad_id"]
|
|
468
468
|
|
|
469
|
+
def test_check_unique_constraint_names(self) -> None:
|
|
470
|
+
"""Test that constraint names are unique."""
|
|
471
|
+
test_col = Column(name="testColumn", id="#test_col_id", datatype="string", length=256)
|
|
472
|
+
test_tbl = Table(name="testTable", id="#test_table_id", columns=[test_col])
|
|
473
|
+
test_cons = UniqueConstraint(name="testConstraint", id="#test_constraint_id", columns=["testColumn"])
|
|
474
|
+
test_cons2 = UniqueConstraint(
|
|
475
|
+
name="testConstraint", id="#test_constraint2_id", columns=["testColumn"]
|
|
476
|
+
)
|
|
477
|
+
test_tbl.constraints = [test_cons, test_cons2]
|
|
478
|
+
with self.assertRaises(ValidationError):
|
|
479
|
+
Schema(name="testSchema", id="#test_id", tables=[test_tbl])
|
|
480
|
+
|
|
469
481
|
def test_model_validate(self) -> None:
|
|
470
482
|
"""Load a YAML test file and validate the schema data model."""
|
|
471
483
|
with open(TEST_YAML) as test_yaml:
|
|
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
|
{lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/lsst_felis.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/lsst_felis.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{lsst_felis-27.2024.3200 → lsst_felis-27.2024.3400}/python/lsst_felis.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|