From a70de2f7bcab6bd585578e88443c01ebbd3bd111 Mon Sep 17 00:00:00 2001 From: Andy Salnikov Date: Tue, 11 Jul 2023 16:14:26 -0700 Subject: [PATCH 1/4] Update Execution butler builder to use `Butler._registry` I hope execution butler will disappear sooner that we need to change this to something else. --- python/lsst/pipe/base/executionButlerBuilder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/lsst/pipe/base/executionButlerBuilder.py b/python/lsst/pipe/base/executionButlerBuilder.py index d2a86594..99e018c6 100644 --- a/python/lsst/pipe/base/executionButlerBuilder.py +++ b/python/lsst/pipe/base/executionButlerBuilder.py @@ -240,7 +240,7 @@ def _export(butler: Butler, collections: Iterable[str] | None, inserts: DataSetT # export/import BackendClass = get_class_of(butler._config["repo_transfer_formats", "yaml", "export"]) backend = BackendClass(yamlBuffer, universe=butler.dimensions) - exporter = RepoExportContext(butler.registry, butler._datastore, backend, directory=None, transfer=None) + exporter = RepoExportContext(butler._registry, butler._datastore, backend, directory=None, transfer=None) # Need to ensure that the dimension records for outputs are # transferred. From c40ae881feb013cd5d5f0be7fc1f0c7ae28d5ef5 Mon Sep 17 00:00:00 2001 From: Andy Salnikov Date: Wed, 12 Jul 2023 13:10:27 -0700 Subject: [PATCH 2/4] Do pre-commit autoupdate --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 814b7628..39105874 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: trailing-whitespace - id: check-toml - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.7.0 hooks: - id: black # It is recommended to specify the latest version of Python @@ -22,6 +22,6 @@ repos: name: isort (python) - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.275 + rev: v0.0.278 hooks: - id: ruff From 98dcaee7f9563b37ad28f67b687873fe8f0e0585 Mon Sep 17 00:00:00 2001 From: Andy Salnikov Date: Wed, 12 Jul 2023 13:12:06 -0700 Subject: [PATCH 3/4] Fix noqa code --- python/lsst/pipe/base/connections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/lsst/pipe/base/connections.py b/python/lsst/pipe/base/connections.py index ab10d938..1d9195c7 100644 --- a/python/lsst/pipe/base/connections.py +++ b/python/lsst/pipe/base/connections.py @@ -172,7 +172,7 @@ class PipelineTaskConnectionsMetaclass(type): See `inputs` for additional information. """ - def __prepare__(name, bases, **kwargs): # noqa: 805 + def __prepare__(name, bases, **kwargs): # noqa: N804 # Create an instance of our special dict to catch and track all # variables that are instances of connectionTypes.BaseConnection # Copy any existing connections from a parent class From 35178033ff90cbe86f65bbcf9ecf54cb6267fa1d Mon Sep 17 00:00:00 2001 From: Andy Salnikov Date: Thu, 13 Jul 2023 10:57:13 -0700 Subject: [PATCH 4/4] Use Butler._datastore in test code to suppress warnings --- python/lsst/pipe/base/tests/simpleQGraph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/lsst/pipe/base/tests/simpleQGraph.py b/python/lsst/pipe/base/tests/simpleQGraph.py index c68d90fe..18795baa 100644 --- a/python/lsst/pipe/base/tests/simpleQGraph.py +++ b/python/lsst/pipe/base/tests/simpleQGraph.py @@ -414,7 +414,7 @@ def makeSimpleQGraph( query based on dataset existence, defaults to `DatasetQueryConstraintVariant.ALL`. makeDatastoreRecords : `bool`, optional - If `True` then add datstore records to generated quanta. + If `True` then add datastore records to generated quanta. bind : `~collections.abc.Mapping`, optional Mapping containing literal values that should be injected into the ``userQuery`` expression, keyed by the identifiers they replace. @@ -446,7 +446,7 @@ def makeSimpleQGraph( builder = GraphBuilder( registry=butler.registry, skipExistingIn=skipExistingIn, - datastore=butler.datastore if makeDatastoreRecords else None, + datastore=butler._datastore if makeDatastoreRecords else None, ) if not run: assert butler.run is not None, "Butler must have run defined"