Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-40443: Remove interfaces deprecated on DM-40441. #434

Merged
merged 2 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TallJimbo can you look at the news fragment please?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


* 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
Loading