Skip to content

Commit

Permalink
Merge pull request #434 from lsst/tickets/DM-40443
Browse files Browse the repository at this point in the history
DM-40443: Remove interfaces deprecated on DM-40441.
  • Loading branch information
timj authored Aug 11, 2024
2 parents 1b56416 + 76fc56e commit 9eaaaf2
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 1,106 deletions.
9 changes: 9 additions & 0 deletions doc/changes/DM-40443.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Removed deprecated code scheduled to be removed after v27:

* Removed ``lsst.pipe.base.graphBuilder``.
* Removed ``lsst.pipe.base.pipeTools``.
* Removed ``lsst.pipe.base.BaseConnection.makeDatasetType``
* Removed ``Pipeline.toExpandedPipeline`` (replaced by ``to_graph``).
* Removed ``PipelineDatasetTypes`` and ``TaskDatasetTypes``.
* Removed ``QuantumGraphBuilderError``.
* APIs no longer accept ``TaskDef``.
10 changes: 0 additions & 10 deletions python/lsst/pipe/base/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# The graphBuilder module is deprecated, but we still export its symbols for
# backwards compatibility.
import warnings

from . import automatic_connection_constants, connectionTypes, pipeline_graph, pipelineIR, utils
from ._dataset_handle import *

Expand All @@ -17,12 +13,6 @@
from .connections import *
from .executionButlerBuilder import *
from .graph import *

with warnings.catch_warnings():
warnings.simplefilter("ignore", FutureWarning)
from .graphBuilder import *
del warnings

from .pipeline import *

# We import the main PipelineGraph type and the module (above), but we don't
Expand Down
65 changes: 1 addition & 64 deletions python/lsst/pipe/base/connectionTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
from collections.abc import Callable, Iterable, Sequence
from typing import ClassVar

from deprecated.sphinx import deprecated as deprecated_sphinx # avoid clash with BaseConnection.deprecated
from lsst.daf.butler import DataCoordinate, DatasetRef, DatasetType, DimensionUniverse, Registry, StorageClass
from lsst.daf.butler import DataCoordinate, DatasetRef, DatasetType, Registry
from lsst.utils.introspection import find_outside_stacklevel


Expand Down Expand Up @@ -106,35 +105,6 @@ def __get__(self, inst, klass):
f"Connection {self.varName!r} of {klass.__name__} has been removed."
) from None

# TODO: remove on DM-40443.
@deprecated_sphinx(
reason="Deprecated in favor of PipelineGraph, and will be removed after v27.",
version="27.0",
category=FutureWarning,
)
def makeDatasetType(
self, universe: DimensionUniverse, parentStorageClass: StorageClass | str | None = None
) -> DatasetType:
"""Construct a true `~lsst.daf.butler.DatasetType` instance with
normalized dimensions.
Parameters
----------
universe : `lsst.daf.butler.DimensionUniverse`
Set of all known dimensions to be used to normalize the dimension
names specified in config.
parentStorageClass : `lsst.daf.butler.StorageClass` or `str`, optional
Parent storage class for component datasets; `None` otherwise.
Returns
-------
datasetType : `~lsst.daf.butler.DatasetType`
The `~lsst.daf.butler.DatasetType` defined by this connection.
"""
return DatasetType(
self.name, universe.empty, self.storageClass, parentStorageClass=parentStorageClass
)


@dataclasses.dataclass(frozen=True)
class DimensionedConnection(BaseConnection):
Expand Down Expand Up @@ -176,39 +146,6 @@ def __post_init__(self):
if not isinstance(self.dimensions, Iterable):
raise TypeError("Dimensions must be iterable of dimensions")

# TODO: remove on DM-40443.
@deprecated_sphinx(
reason="Deprecated in favor of PipelineGraph, and will be removed after v27.",
version="27.0",
category=FutureWarning,
)
def makeDatasetType(
self, universe: DimensionUniverse, parentStorageClass: StorageClass | str | None = None
) -> DatasetType:
"""Construct a true `~lsst.daf.butler.DatasetType` instance with
normalized dimensions.
Parameters
----------
universe : `lsst.daf.butler.DimensionUniverse`
Set of all known dimensions to be used to normalize the dimension
names specified in config.
parentStorageClass : `lsst.daf.butler.StorageClass` or `str`, optional
Parent storage class for component datasets; `None` otherwise.
Returns
-------
datasetType : `~lsst.daf.butler.DatasetType`
The `~lsst.daf.butler.DatasetType` defined by this connection.
"""
return DatasetType(
self.name,
universe.conform(self.dimensions),
self.storageClass,
isCalibration=self.isCalibration,
parentStorageClass=parentStorageClass,
)


@dataclasses.dataclass(frozen=True)
class BaseInput(DimensionedConnection):
Expand Down
190 changes: 0 additions & 190 deletions python/lsst/pipe/base/graphBuilder.py

This file was deleted.

Loading

0 comments on commit 9eaaaf2

Please sign in to comment.