Coverage for python/lsst/verify/gen2tasks/metricTask.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v6.4.1, created at 2022-06-22 01:34 -0700

1# This file is part of verify. 

2# 

3# Developed for the LSST Data Management System. 

4# This product includes software developed by the LSST Project 

5# (https://www.lsst.org). 

6# See the COPYRIGHT file at the top-level directory of this distribution 

7# for details of code ownership. 

8# 

9# This program is free software: you can redistribute it and/or modify 

10# it under the terms of the GNU General Public License as published by 

11# the Free Software Foundation, either version 3 of the License, or 

12# (at your option) any later version. 

13# 

14# This program is distributed in the hope that it will be useful, 

15# but WITHOUT ANY WARRANTY; without even the implied warranty of 

16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

17# GNU General Public License for more details. 

18# 

19# You should have received a copy of the GNU General Public License 

20# along with this program. If not, see <https://www.gnu.org/licenses/>. 

21 

22__all__ = ["MetricTask"] 

23 

24 

25import abc 

26 

27from deprecated.sphinx import deprecated 

28 

29# Avoid importing tasks, which causes circular dependency 

30from ..tasks.metricTask import MetricTask as Gen3MetricTask 

31 

32 

33# Docstring needs to have no leading whitespace for @deprecated to work 

34@deprecated( 

35 reason="Replaced by `lsst.verify.tasks.MetricTask`. " 

36 "To be removed along with daf_persistence.", 

37 version="v20.0", 

38 category=FutureWarning) 

39class MetricTask(Gen3MetricTask, metaclass=abc.ABCMeta): 

40 """A base class for tasks that compute one metric from input datasets. 

41 

42Parameters 

43---------- 

44*args 

45**kwargs 

46 Constructor parameters are the same as for 

47 `lsst.pipe.base.PipelineTask`. 

48 

49Notes 

50----- 

51In general, both the ``MetricTask``'s metric and its input data are 

52configurable. Metrics may be associated with a data ID at any level of 

53granularity, including repository-wide. 

54 

55Like `lsst.pipe.base.PipelineTask`, this class should be customized by 

56overriding `run` and by providing a `lsst.pipe.base.connectionTypes.Input` 

57for each parameter of `run`. For requirements that are specific to 

58``MetricTask``, see `run`. 

59 

60.. note:: 

61 The API is designed to make it easy to convert all ``MetricTasks`` to 

62 `~lsst.pipe.base.PipelineTask` later, but this class is *not* a 

63 `~lsst.pipe.base.PipelineTask` and does not work with activators, 

64 quanta, or `lsst.daf.butler`. 

65""" 

66 pass