lsst-felis 28.0.0rc1__py3-none-any.whl → 28.0.1rc1__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/db/utils.py CHANGED
@@ -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
felis/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "28.0.0rc1"
2
+ __version__ = "28.0.1rc1"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: lsst-felis
3
- Version: 28.0.0rc1
3
+ Version: 28.0.1rc1
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+)
@@ -18,17 +18,16 @@ Requires-Python: >=3.11.0
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: COPYRIGHT
20
20
  License-File: LICENSE
21
- Requires-Dist: astropy >=4
22
- Requires-Dist: sqlalchemy >=1.4
23
- Requires-Dist: click >=7
24
- Requires-Dist: pyyaml >=6
25
- Requires-Dist: pydantic <3,>=2
26
- Requires-Dist: lsst-utils
27
- Requires-Dist: lsst-resources
28
- Provides-Extra: dev
29
- Requires-Dist: documenteer[guide] <2 ; extra == 'dev'
30
- Requires-Dist: autodoc-pydantic ; extra == 'dev'
31
- Requires-Dist: sphinx-click ; extra == 'dev'
21
+ Requires-Dist: astropy>=4
22
+ Requires-Dist: sqlalchemy>=1.4
23
+ Requires-Dist: click>=7
24
+ Requires-Dist: pyyaml>=6
25
+ Requires-Dist: pydantic<3,>=2
26
+ Requires-Dist: lsst-utils<28.100
27
+ Requires-Dist: lsst-resources<28.100
32
28
  Provides-Extra: test
33
- Requires-Dist: pytest >=3.2 ; extra == 'test'
34
-
29
+ Requires-Dist: pytest>=3.2; extra == "test"
30
+ Provides-Extra: dev
31
+ Requires-Dist: documenteer[guide]<2; extra == "dev"
32
+ Requires-Dist: autodoc_pydantic; extra == "dev"
33
+ Requires-Dist: sphinx-click; extra == "dev"
@@ -6,21 +6,21 @@ felis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  felis/tap.py,sha256=76o8-ijmwgSE8UxMVn9KTlKrCPjG72LWyyAXO8yeqFE,21564
7
7
  felis/tap_schema.py,sha256=cFZwW7lj0FiYa1BWtfX_Pbv9xi4jk0D-tp34h3jNs8E,22471
8
8
  felis/types.py,sha256=m80GSGfNHQ3-NzRuTzKOyRXLJboPxdk9kzpp1SO8XdY,5510
9
- felis/version.py,sha256=YEY65oJICLqZMPdThEm9MydhW43r59vxj-tM89VtoEQ,52
9
+ felis/version.py,sha256=aTs4bgQ3SdJ-iDGJSEbFmLXBf5y-ALZzGt-_Oq__x0w,52
10
10
  felis/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  felis/db/dialects.py,sha256=n5La-shu-8fHLIyf8rrazHDyrzATmMCdELtKV_0ymxI,3517
12
12
  felis/db/sqltypes.py,sha256=JJy97U8KzAOg5pFi2xZgSjvU8CXXgrzkvCsmo6FLRG4,11060
13
- felis/db/utils.py,sha256=8iHITnk4RcWp8r-obI0IBeP6FqrMkwSqVEli29duLHc,14157
13
+ felis/db/utils.py,sha256=SIl2ryOT2Zn5n0BqdNDxC1HcOoxh0doaKk_hMUGvwAc,14116
14
14
  felis/db/variants.py,sha256=eahthrbVeV8ZdGamWQccNmWgx6CCscGrU0vQRs5HZK8,5260
15
15
  felis/schemas/tap_schema_std.yaml,sha256=sPW-Vk72nY0PFpCvP5d8L8fWvhkif-x32sGtcfDZ8bU,7131
16
16
  felis/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  felis/tests/postgresql.py,sha256=B_xk4fLual5-viGDqP20r94okuc0pbSvytRH_L0fvMs,4035
18
18
  felis/tests/utils.py,sha256=YB7qQOXSaE3HTEjTBUqIqQx90LxGZjOZvZi2IPgoVhs,3247
19
- lsst_felis-28.0.0rc1.dist-info/COPYRIGHT,sha256=vJAFLFTSF1mhy9eIuA3P6R-3yxTWKQgpig88P-1IzRw,129
20
- lsst_felis-28.0.0rc1.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
21
- lsst_felis-28.0.0rc1.dist-info/METADATA,sha256=lkztZ4D2BFYvHmrtmsjvN9ByeFmf3eKU4VKR-NdaJdo,1315
22
- lsst_felis-28.0.0rc1.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
23
- lsst_felis-28.0.0rc1.dist-info/entry_points.txt,sha256=Gk2XFujA_Gp52VBk45g5kim8TDoMDJFPctsMqiq72EM,40
24
- lsst_felis-28.0.0rc1.dist-info/top_level.txt,sha256=F4SvPip3iZRVyISi50CHhwTIAokAhSxjWiVcn4IVWRI,6
25
- lsst_felis-28.0.0rc1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
26
- lsst_felis-28.0.0rc1.dist-info/RECORD,,
19
+ lsst_felis-28.0.1rc1.dist-info/COPYRIGHT,sha256=vJAFLFTSF1mhy9eIuA3P6R-3yxTWKQgpig88P-1IzRw,129
20
+ lsst_felis-28.0.1rc1.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
21
+ lsst_felis-28.0.1rc1.dist-info/METADATA,sha256=flgRfMX_n9SDh7-qLY1hAKNJzJuLzjxd9D4vv1X8euE,1317
22
+ lsst_felis-28.0.1rc1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
23
+ lsst_felis-28.0.1rc1.dist-info/entry_points.txt,sha256=Gk2XFujA_Gp52VBk45g5kim8TDoMDJFPctsMqiq72EM,40
24
+ lsst_felis-28.0.1rc1.dist-info/top_level.txt,sha256=F4SvPip3iZRVyISi50CHhwTIAokAhSxjWiVcn4IVWRI,6
25
+ lsst_felis-28.0.1rc1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
26
+ lsst_felis-28.0.1rc1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5