Skip to content

Commit

Permalink
Rename tests/data/registry/datasets-uuid.yaml to datasets.yaml.
Browse files Browse the repository at this point in the history
As we do not have non-UUID manager anymore, there is no point
keeping two dataset.yaml files.
  • Loading branch information
andy-slac committed Dec 1, 2023
1 parent 085ea3f commit 6795678
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 163 deletions.
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/registry/tests/_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def testFindDataset(self):
# Search more than one collection, in which two have the right
# dataset type and another does not.
registry.registerRun("empty")
self.loadData(registry, "datasets-uuid.yaml")
self.loadData(registry, "datasets.yaml")
bias1 = registry.findDataset("bias", instrument="Cam1", detector=2, collections=["imported_g"])
self.assertIsNotNone(bias1)
bias2 = registry.findDataset("bias", instrument="Cam1", detector=2, collections=["imported_r"])
Expand Down
138 changes: 0 additions & 138 deletions tests/data/registry/datasets-uuid.yaml

This file was deleted.

26 changes: 13 additions & 13 deletions tests/data/registry/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ data:
run: imported_g
records:
-
dataset_id: 1001
dataset_id: !uuid e15ab039-bc8b-4135-87c5-90902a7c0b22
data_id:
instrument: Cam1
detector: 1
path: placeholder
-
dataset_id: 1002
dataset_id: !uuid 51352db4-a47a-447c-b12d-a50b206b17cd
data_id:
instrument: Cam1
detector: 2
path: placeholder
-
dataset_id: 1003
dataset_id: !uuid e06b6f3c-5b3e-46d0-bdde-4ef972301116
data_id:
instrument: Cam1
detector: 3
Expand All @@ -50,23 +50,23 @@ data:
run: imported_g
records:
-
dataset_id: 1010
dataset_id: !uuid 60c8a65c-7290-4c38-b1de-e3b1cdcf872d
data_id:
instrument: Cam1
detector: 2
physical_filter: Cam1-G
band: g
path: placeholder
-
dataset_id: 1020
dataset_id: !uuid 84239e7f-c41f-46d5-97b9-a27976b98ceb
data_id:
instrument: Cam1
detector: 3
physical_filter: Cam1-G
band: g
path: placeholder
-
dataset_id: 1030
dataset_id: !uuid fd51bce1-2848-49d6-a378-f8a122f5139a
data_id:
instrument: Cam1
detector: 4
Expand All @@ -82,19 +82,19 @@ data:
run: imported_r
records:
-
dataset_id: 2001
dataset_id: !uuid 87f3e68d-258d-41b7-8ea5-edf3557ccb30
data_id:
instrument: Cam1
detector: 2
path: placeholder
-
dataset_id: 2002
dataset_id: !uuid dc0ef017-dc94-4118-b431-d65b1ef89a5f
data_id:
instrument: Cam1
detector: 3
path: placeholder
-
dataset_id: 2003
dataset_id: !uuid e255067d-dcc5-4f39-9824-0baa5817d3e5
data_id:
instrument: Cam1
detector: 4
Expand All @@ -105,31 +105,31 @@ data:
run: imported_r
records:
-
dataset_id: 2010
dataset_id: !uuid d0bb04cd-d697-4a83-ba53-cdfcd58e3a0c
data_id:
instrument: Cam1
detector: 1
physical_filter: Cam1-R1
band: r
path: placeholder
-
dataset_id: 2020
dataset_id: !uuid c1296796-56c5-4acf-9b49-40d920c6f840
data_id:
instrument: Cam1
detector: 2
physical_filter: Cam1-R1
band: r
path: placeholder
-
dataset_id: 2030
dataset_id: !uuid 393972aa-57ab-41c2-b3bc-03541ca6bc6e
data_id:
instrument: Cam1
detector: 3
physical_filter: Cam1-R2
band: r
path: placeholder
-
dataset_id: 2040
dataset_id: !uuid 37185f04-1cea-4ddd-a065-a5e0be9e19de
data_id:
instrument: Cam1
detector: 4
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cliCmdQueryDataIds.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def testWhere(self):

def testDatasetsAndCollections(self):
"""Test constraining via datasets and collections."""
butler = self.loadData("base.yaml", "datasets-uuid.yaml")
butler = self.loadData("base.yaml", "datasets.yaml")
# See that the data IDs returned are constrained by that collection's
# contents.
res, msg = self._queryDataIds(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def create_factory_dependency():

# Populate the test server.
server_butler.import_(filename=os.path.join(TESTDIR, "data", "registry", "base.yaml"))
server_butler.import_(filename=os.path.join(TESTDIR, "data", "registry", "datasets-uuid.yaml"))
server_butler.import_(filename=os.path.join(TESTDIR, "data", "registry", "datasets.yaml"))

@classmethod
def tearDownClass(cls):
Expand Down
10 changes: 1 addition & 9 deletions tests/test_simpleButler.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SimpleButlerTestCase(unittest.TestCase):
datasetsManager = (
"lsst.daf.butler.registry.datasets.byDimensions.ByDimensionsDatasetRecordStorageManagerUUID"
)
datasetsImportFile = "datasets-uuid.yaml"
datasetsImportFile = "datasets.yaml"

def setUp(self):
self.root = makeTestTempDir(TESTDIR)
Expand Down Expand Up @@ -657,13 +657,5 @@ def testWildcardQueries(self):
self.assertEqual(set(result), expected)


class SimpleButlerMixedUUIDTestCase(SimpleButlerTestCase):
"""Same as SimpleButlerTestCase but uses UUID-based datasets manager and
loads datasets from YAML file with integer IDs.
"""

datasetsImportFile = "datasets.yaml"


if __name__ == "__main__":
unittest.main()

0 comments on commit 6795678

Please sign in to comment.