lsst-felis 29.2025.1800__tar.gz → 29.2025.1900__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.

Files changed (39) hide show
  1. {lsst_felis-29.2025.1800/python/lsst_felis.egg-info → lsst_felis-29.2025.1900}/PKG-INFO +1 -1
  2. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/cli.py +6 -1
  3. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/datamodel.py +20 -0
  4. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900/python/lsst_felis.egg-info}/PKG-INFO +1 -1
  5. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/tests/test_cli.py +5 -3
  6. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/tests/test_datamodel.py +6 -0
  7. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/COPYRIGHT +0 -0
  8. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/LICENSE +0 -0
  9. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/README.rst +0 -0
  10. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/pyproject.toml +0 -0
  11. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/__init__.py +0 -0
  12. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/db/__init__.py +0 -0
  13. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/db/dialects.py +0 -0
  14. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/db/schema.py +0 -0
  15. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/db/sqltypes.py +0 -0
  16. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/db/utils.py +0 -0
  17. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/db/variants.py +0 -0
  18. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/diff.py +0 -0
  19. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/metadata.py +0 -0
  20. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/py.typed +0 -0
  21. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/schemas/tap_schema_std.yaml +0 -0
  22. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/tap_schema.py +0 -0
  23. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/tests/__init__.py +0 -0
  24. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/tests/postgresql.py +0 -0
  25. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/tests/run_cli.py +0 -0
  26. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/felis/types.py +0 -0
  27. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/lsst_felis.egg-info/SOURCES.txt +0 -0
  28. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/lsst_felis.egg-info/dependency_links.txt +0 -0
  29. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/lsst_felis.egg-info/entry_points.txt +0 -0
  30. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/lsst_felis.egg-info/requires.txt +0 -0
  31. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/lsst_felis.egg-info/top_level.txt +0 -0
  32. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/python/lsst_felis.egg-info/zip-safe +0 -0
  33. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/setup.cfg +0 -0
  34. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/tests/test_db.py +0 -0
  35. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/tests/test_diff.py +0 -0
  36. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/tests/test_metadata.py +0 -0
  37. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/tests/test_postgres.py +0 -0
  38. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/tests/test_tap_schema.py +0 -0
  39. {lsst_felis-29.2025.1800 → lsst_felis-29.2025.1900}/tests/test_tap_schema_postgres.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsst-felis
3
- Version: 29.2025.1800
3
+ Version: 29.2025.1900
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+)
@@ -63,7 +63,10 @@ loglevel_choices = ["CRITICAL", "FATAL", "ERROR", "WARNING", "INFO", "DEBUG"]
63
63
  help="Felis log file path",
64
64
  )
65
65
  @click.option(
66
- "--id-generation", is_flag=True, help="Generate IDs for all objects that do not have them", default=False
66
+ "--id-generation/--no-id-generation",
67
+ is_flag=True,
68
+ help="Generate IDs for all objects that do not have them",
69
+ default=True,
67
70
  )
68
71
  @click.pass_context
69
72
  def cli(ctx: click.Context, log_level: str, log_file: str | None, id_generation: bool) -> None:
@@ -72,6 +75,8 @@ def cli(ctx: click.Context, log_level: str, log_file: str | None, id_generation:
72
75
  ctx.obj["id_generation"] = id_generation
73
76
  if ctx.obj["id_generation"]:
74
77
  logger.info("ID generation is enabled")
78
+ else:
79
+ logger.info("ID generation is disabled")
75
80
  if log_file:
76
81
  logging.basicConfig(filename=log_file, level=log_level)
77
82
  else:
@@ -504,6 +504,26 @@ class Column(BaseObject):
504
504
  """
505
505
  return DataType(value)
506
506
 
507
+ @model_validator(mode="after")
508
+ def check_votable_xtype(self) -> Column:
509
+ """Set the default value for the ``votable_xtype`` field, which
510
+ corresponds to an Extended Datatype or ``xtype`` in the IVOA VOTable
511
+ standard.
512
+
513
+ Returns
514
+ -------
515
+ `Column`
516
+ The column being validated.
517
+
518
+ Notes
519
+ -----
520
+ This is currently only set automatically for the Felis ``timestamp``
521
+ datatype.
522
+ """
523
+ if self.datatype == DataType.timestamp and self.votable_xtype is None:
524
+ self.votable_xtype = "timestamp"
525
+ return self
526
+
507
527
 
508
528
  class Constraint(BaseObject):
509
529
  """Table constraint model."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsst-felis
3
- Version: 29.2025.1800
3
+ Version: 29.2025.1900
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+)
@@ -82,16 +82,18 @@ class CliTestCase(unittest.TestCase):
82
82
  run_cli(["validate", TEST_YAML])
83
83
 
84
84
  def test_validate_with_id_generation(self) -> None:
85
- """Test the ``--id-generation`` flag."""
85
+ """Test that loading a schema with IDs works if ID generation is
86
+ enabled. This is the default behavior.
87
+ """
86
88
  test_yaml = os.path.join(TEST_DIR, "data", "test_id_generation.yaml")
87
89
  run_cli(["--id-generation", "validate", test_yaml])
88
90
 
89
- def test_validate_with_id_validation_error(self) -> None:
91
+ def test_validate_with_id_generation_error(self) -> None:
90
92
  """Test that loading a schema without IDs fails if ID generation is not
91
93
  enabled.
92
94
  """
93
95
  test_yaml = os.path.join(TEST_DIR, "data", "test_id_generation.yaml")
94
- run_cli(["validate", test_yaml], expect_error=True)
96
+ run_cli(["--no-id-generation", "validate", test_yaml], expect_error=True)
95
97
 
96
98
  def test_validate_with_extra_checks(self) -> None:
97
99
  """Test schema validation flags."""
@@ -231,6 +231,12 @@ class ColumnTestCase(unittest.TestCase):
231
231
  bool_coldata["value"] = True
232
232
  Column(**bool_coldata)
233
233
 
234
+ def test_timestamp(self) -> None:
235
+ """Test validation of timestamp columns."""
236
+ # Check that the votable_xtype is set correctly for timestamp columns.
237
+ col = Column(name="testColumn", id="#test_col_id", datatype="timestamp")
238
+ self.assertEqual(col.votable_xtype, "timestamp")
239
+
234
240
 
235
241
  class TableTestCase(unittest.TestCase):
236
242
  """Test Pydantic validation of the ``Table`` class."""