Skip to content

Commit

Permalink
Add stubs to redirect import
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkannawadi committed Dec 3, 2024
1 parent d657b93 commit 19a5875
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
37 changes: 37 additions & 0 deletions python/lsst/pipe/tasks/make_direct_warp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file is part of pipe_tasks.
#
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# TODO: Remove this entire file in DM-47521.

import warnings

try:
from lsst.drp.tasks.make_direct_warp import MakeDirectWarpConfig, MakeDirectWarpTask # noqa: F401
except ImportError as error:
error.msg += ". Please import the warping tasks from drp_tasks package."
raise error
finally:
warnings.warn(
"lsst.pipe.tasks.make_direct_warp is deprecated and will be removed after v29; "
"Please use lsst.drp.tasks.make_direct_warp instead.",
DeprecationWarning,
stacklevel=2,
)
41 changes: 41 additions & 0 deletions python/lsst/pipe/tasks/make_psf_matched_warp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This file is part of pipe_tasks.
#
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# TODO: Remove this entire file in DM-47521.

import warnings

try:
from lsst.drp.tasks.make_psf_matched_warp import ( # noqa: F401
MakePsfMatchedWarpConfig,
MakePsfMatchedWarpConnections,
MakePsfMatchedWarpTask,
)
except ImportError as error:
error.msg += ". Please import the warping tasks from drp_tasks package."
raise error
finally:
warnings.warn(
"lsst.pipe.tasks.make_psf_matched_warp is deprecated and will be removed after v29; "
"Please use lsst.drp.tasks.make_psf_matched_warp instead.",
DeprecationWarning,
stacklevel=2,
)

0 comments on commit 19a5875

Please sign in to comment.