diff --git a/python/lsst/ap/verify/workspace.py b/python/lsst/ap/verify/workspace.py index b22a33df..bbbb4b17 100644 --- a/python/lsst/ap/verify/workspace.py +++ b/python/lsst/ap/verify/workspace.py @@ -114,6 +114,15 @@ def dbLocation(self): Shall be a pathname to a database suitable for the backend of `Apdb`. """ + @property + @abc.abstractmethod + def dbConfigLocation(self): + """The absolute location of the config file for the source association + database to be created or updated by the pipeline(`str`, read-only). + + The location is assumed to be a Python (`lsst.pex.config.Config`) file. + """ + @property @abc.abstractmethod def alertLocation(self): @@ -189,6 +198,10 @@ def pipelineDir(self): def dbLocation(self): return os.path.join(self._location, 'association.db') + @property + def dbConfigLocation(self): + return os.path.join(self._location, 'apdb.py') + @property def alertLocation(self): return os.path.join(self._location, 'alerts') diff --git a/tests/test_workspace.py b/tests/test_workspace.py index 12149f90..cea1312c 100644 --- a/tests/test_workspace.py +++ b/tests/test_workspace.py @@ -106,6 +106,15 @@ def testDatabase(self): # Workspace spec allows these to be URIs or paths, whatever the Butler accepts self._assertNotInDir(self._testbed.dbLocation, url2pathname(self._testbed.repo)) + def testDbConfig(self): + """Verify that a WorkspaceGen3 requests a database config in the target + directory, but not in any repository. + """ + root = self._testWorkspace + self._assertInDir(self._testbed.dbConfigLocation, root) + # Workspace spec allows these to be URIs or paths, whatever the Butler accepts + self._assertNotInDir(self._testbed.dbConfigLocation, url2pathname(self._testbed.repo)) + def testAlerts(self): """Verify that a WorkspaceGen3 requests an alert dump in the target directory, but not in any repository.