lsst-felis 28.0.0rc1__tar.gz → 28.2024.4500__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-28.0.0rc1/python/lsst_felis.egg-info → lsst_felis-28.2024.4500}/PKG-INFO +1 -1
  2. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/db/utils.py +17 -17
  3. lsst_felis-28.2024.4500/python/felis/version.py +2 -0
  4. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500/python/lsst_felis.egg-info}/PKG-INFO +1 -1
  5. lsst_felis-28.0.0rc1/python/felis/version.py +0 -2
  6. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/COPYRIGHT +0 -0
  7. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/LICENSE +0 -0
  8. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/README.rst +0 -0
  9. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/pyproject.toml +0 -0
  10. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/__init__.py +0 -0
  11. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/cli.py +0 -0
  12. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/datamodel.py +0 -0
  13. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/db/__init__.py +0 -0
  14. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/db/dialects.py +0 -0
  15. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/db/sqltypes.py +0 -0
  16. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/db/variants.py +0 -0
  17. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/metadata.py +0 -0
  18. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/py.typed +0 -0
  19. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/schemas/tap_schema_std.yaml +0 -0
  20. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/tap.py +0 -0
  21. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/tap_schema.py +0 -0
  22. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/tests/__init__.py +0 -0
  23. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/tests/postgresql.py +0 -0
  24. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/tests/utils.py +0 -0
  25. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/felis/types.py +0 -0
  26. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/lsst_felis.egg-info/SOURCES.txt +0 -0
  27. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/lsst_felis.egg-info/dependency_links.txt +0 -0
  28. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/lsst_felis.egg-info/entry_points.txt +0 -0
  29. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/lsst_felis.egg-info/requires.txt +0 -0
  30. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/lsst_felis.egg-info/top_level.txt +0 -0
  31. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/python/lsst_felis.egg-info/zip-safe +0 -0
  32. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/setup.cfg +0 -0
  33. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/tests/test_cli.py +0 -0
  34. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/tests/test_datamodel.py +0 -0
  35. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/tests/test_metadata.py +0 -0
  36. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/tests/test_postgres.py +0 -0
  37. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/tests/test_tap.py +0 -0
  38. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/tests/test_tap_schema.py +0 -0
  39. {lsst_felis-28.0.0rc1 → lsst_felis-28.2024.4500}/tests/test_tap_schema_postgres.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lsst-felis
3
- Version: 28.0.0rc1
3
+ Version: 28.2024.4500
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+)
@@ -280,7 +280,12 @@ class DatabaseContext:
280
280
  create a new schema. For other variants, this is an unsupported
281
281
  operation.
282
282
  """
283
+ if self.engine.dialect.name == "sqlite":
284
+ # Initialization is unneeded for sqlite.
285
+ return
283
286
  schema_name = self.metadata.schema
287
+ if schema_name is None:
288
+ raise ValueError("Schema name is required to initialize the schema.")
284
289
  try:
285
290
  if self.dialect_name == "mysql":
286
291
  logger.debug(f"Checking if MySQL database exists: {schema_name}")
@@ -304,11 +309,6 @@ class DatabaseContext:
304
309
  raise ValueError(f"PostgreSQL schema '{schema_name}' already exists.")
305
310
  logger.debug(f"Creating PG schema: {schema_name}")
306
311
  self.execute(CreateSchema(schema_name))
307
- elif self.dialect_name == "sqlite":
308
- # Just silently ignore this operation for SQLite. The database
309
- # will still be created if it does not exist and the engine
310
- # URL is valid.
311
- pass
312
312
  else:
313
313
  raise ValueError(f"Initialization not supported for: {self.dialect_name}")
314
314
  except SQLAlchemyError as e:
@@ -326,24 +326,24 @@ class DatabaseContext:
326
326
  Notes
327
327
  -----
328
328
  In MySQL, this will drop a database. In PostgreSQL, it will drop a
329
- schema. For other variants, this is an unsupported operation.
329
+ schema. A SQlite database will have all its tables dropped. For other
330
+ database variants, this is currently an unsupported operation.
330
331
  """
331
- schema_name = self.metadata.schema
332
- if not self.engine.dialect.name == "sqlite" and self.metadata.schema is None:
333
- raise ValueError("Schema name is required to drop the schema.")
334
332
  try:
335
- if self.dialect_name == "mysql":
336
- logger.debug(f"Dropping MySQL database if exists: {schema_name}")
337
- self.execute(text(f"DROP DATABASE IF EXISTS {schema_name}"))
338
- elif self.dialect_name == "postgresql":
339
- logger.debug(f"Dropping PostgreSQL schema if exists: {schema_name}")
340
- self.execute(DropSchema(schema_name, if_exists=True, cascade=True))
341
- elif self.dialect_name == "sqlite":
333
+ if self.dialect_name == "sqlite":
342
334
  if isinstance(self.engine, Engine):
343
335
  logger.debug("Dropping tables in SQLite schema")
344
336
  self.metadata.drop_all(bind=self.engine)
345
337
  else:
346
- raise ValueError(f"Drop operation not supported for: {self.dialect_name}")
338
+ schema_name = self.metadata.schema
339
+ if schema_name is None:
340
+ raise ValueError("Schema name is required to drop the schema.")
341
+ if self.dialect_name == "mysql":
342
+ logger.debug(f"Dropping MySQL database if exists: {schema_name}")
343
+ self.execute(text(f"DROP DATABASE IF EXISTS {schema_name}"))
344
+ elif self.dialect_name == "postgresql":
345
+ logger.debug(f"Dropping PostgreSQL schema if exists: {schema_name}")
346
+ self.execute(DropSchema(schema_name, if_exists=True, cascade=True))
347
347
  except SQLAlchemyError as e:
348
348
  logger.error(f"Error dropping schema: {e}")
349
349
  raise
@@ -0,0 +1,2 @@
1
+ __all__ = ["__version__"]
2
+ __version__ = "28.2024.4500"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lsst-felis
3
- Version: 28.0.0rc1
3
+ Version: 28.2024.4500
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,2 +0,0 @@
1
- __all__ = ["__version__"]
2
- __version__ = "28.0.0rc1"