lsst.pipe.tasks
g3ecd7dbb19+30679e58bc
python
lsst
pipe
tasks
configurableActions
tests.py
Go to the documentation of this file.
1
# This file is part of pipe_tasks.
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
from
__future__
import
annotations
22
23
__all__ = (
24
"ActionTest1"
,
25
"ActionTest2"
,
26
"ActionTest3"
,
27
"TestConfig"
,
28
)
29
30
from
lsst.pex.config
import
Config, Field
31
from
._configurableAction
import
ConfigurableAction
32
from
._configurableActionStructField
import
ConfigurableActionStructField
33
from
._configurableActionField
import
ConfigurableActionField
34
35
36
class
ActionTest1
(
ConfigurableAction
):
37
var = Field(doc=
"test field"
, dtype=int, default=0)
38
39
def
__call__
(self):
40
return
self.
var
41
42
def
validate
(self):
43
assert(self.
var
is
not
None
)
44
45
46
class
ActionTest2
(
ConfigurableAction
):
47
var = Field(doc=
"test field"
, dtype=int, default=1)
48
49
def
__call__
(self):
50
return
self.
var
51
52
def
validate
(self):
53
assert(self.
var
is
not
None
)
54
55
56
class
ActionTest3
(
ConfigurableAction
):
57
var = Field(doc=
"test field"
, dtype=int, default=3)
58
59
def
__call__
(self):
60
return
self.
var
61
62
def
validate
(self):
63
assert(self.
var
is
not
None
)
64
65
66
class
TestConfig
(Config):
67
actions =
ConfigurableActionStructField
(doc=
"Actions to be tested"
, default=
None
)
68
singleAction =
ConfigurableActionField
(doc=
"A configurable action"
, default=
None
)
lsst::pex::config
lsst.pipe.tasks.configurableActions._configurableAction.ConfigurableAction
Definition:
_configurableAction.py:33
lsst.pipe.tasks.configurableActions._configurableActionField.ConfigurableActionField
Definition:
_configurableActionField.py:34
lsst.pipe.tasks.configurableActions._configurableActionStructField.ConfigurableActionStructField
Definition:
_configurableActionStructField.py:230
lsst.pipe.tasks.configurableActions.tests.ActionTest1
Definition:
tests.py:36
lsst.pipe.tasks.configurableActions.tests.ActionTest1.var
var
Definition:
tests.py:37
lsst.pipe.tasks.configurableActions.tests.ActionTest1.__call__
def __call__(self)
Definition:
tests.py:39
lsst.pipe.tasks.configurableActions.tests.ActionTest1.validate
def validate(self)
Definition:
tests.py:42
lsst.pipe.tasks.configurableActions.tests.ActionTest2
Definition:
tests.py:46
lsst.pipe.tasks.configurableActions.tests.ActionTest2.__call__
def __call__(self)
Definition:
tests.py:49
lsst.pipe.tasks.configurableActions.tests.ActionTest2.var
var
Definition:
tests.py:47
lsst.pipe.tasks.configurableActions.tests.ActionTest2.validate
def validate(self)
Definition:
tests.py:52
lsst.pipe.tasks.configurableActions.tests.ActionTest3
Definition:
tests.py:56
lsst.pipe.tasks.configurableActions.tests.ActionTest3.var
var
Definition:
tests.py:57
lsst.pipe.tasks.configurableActions.tests.ActionTest3.__call__
def __call__(self)
Definition:
tests.py:59
lsst.pipe.tasks.configurableActions.tests.ActionTest3.validate
def validate(self)
Definition:
tests.py:62
lsst.pipe.tasks.configurableActions.tests.TestConfig
Definition:
tests.py:66
Generated on Thu Jul 21 2022 03:36:57 for lsst.pipe.tasks by
1.9.3