From b10b39a50af43bb0ff73a2286a6867d9edfa2c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Thu, 18 Jul 2024 07:49:07 -0700 Subject: [PATCH] Another couple fixes to read_database --- tests/scripts/sdss5db_too_test.sql | 8 -------- tests/test_database.py | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/scripts/sdss5db_too_test.sql b/tests/scripts/sdss5db_too_test.sql index 99114d0..6f0d95d 100644 --- a/tests/scripts/sdss5db_too_test.sql +++ b/tests/scripts/sdss5db_too_test.sql @@ -320,14 +320,6 @@ CREATE TABLE opsdb_apo.configuration ( epoch DOUBLE PRECISION, calibration_version TEXT); -CREATE TABLE opsdb_apo.configuration ( - configuration_id SERIAL PRIMARY KEY NOT NULL, - design_id INTEGER, - comment TEXT, - temperature TEXT, - epoch DOUBLE PRECISION, - calibration_version TEXT); - ALTER TABLE catalogdb.catalog ADD PRIMARY KEY (catalogid); ALTER TABLE catalogdb.sdss_id_stacked ADD PRIMARY KEY (sdss_id); ALTER TABLE catalogdb.catalog_to_gaia_dr3_source ADD PRIMARY KEY (catalogid, target_id, version_id); diff --git a/tests/test_database.py b/tests/test_database.py index 079475a..5d030b7 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -152,7 +152,7 @@ def test_update_too_targets( too_mock_sample = too_mock[0:1000] database_uri = database_uri_from_connection(catalogdb.database) - db_metadata = polars.read_database( + db_metadata = polars.read_database_uri( "SELECT * FROM catalogdb.too_metadata ORDER BY too_id", database_uri, engine="adbc", @@ -168,7 +168,7 @@ def test_update_too_targets( assert "Updating ToO entries" in caplog.record_tuples[-2][2] - db_metadata = polars.read_database( + db_metadata = polars.read_database_uri( "SELECT * FROM catalogdb.too_metadata ORDER BY too_id", database_uri, engine="adbc",