Skip to content

task_models

CompoundTask

Bases: _BaseTask

A CompoundTask object must include both executable_init and executable attributes, and it may include the meta_init and meta attributes.

Source code in src/fractal_task_tools/task_models.py
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
class CompoundTask(_BaseTask):
    """
    A `CompoundTask` object must include both `executable_init` and
    `executable` attributes, and it may include the `meta_init` and `meta`
    attributes.
    """

    executable_init: str
    meta_init: Optional[dict[str, Any]] = None
    type: Literal["compound"] = "compound"

    @property
    def executable_non_parallel(self) -> str:
        return self.executable_init

    @property
    def meta_non_parallel(self) -> Optional[dict[str, Any]]:
        return self.meta_init

    @property
    def executable_parallel(self) -> str:
        return self.executable

    @property
    def meta_parallel(self) -> Optional[dict[str, Any]]:
        return self.meta

ConverterCompoundTask

Bases: _BaseTask

A ConverterCompoundTask task is the same as a CompoundTask, but it is executed differently in the Fractal backend.

Source code in src/fractal_task_tools/task_models.py
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
class ConverterCompoundTask(_BaseTask):
    """
    A `ConverterCompoundTask` task is the same as a `CompoundTask`, but it
    is executed differently in the Fractal backend.
    """

    executable_init: str
    meta_init: Optional[dict[str, Any]] = None
    type: Literal["converter_compound"] = "converter_compound"

    @property
    def executable_non_parallel(self) -> str:
        return self.executable_init

    @property
    def meta_non_parallel(self) -> Optional[dict[str, Any]]:
        return self.meta_init

    @property
    def executable_parallel(self) -> str:
        return self.executable

    @property
    def meta_parallel(self) -> Optional[dict[str, Any]]:
        return self.meta

ConverterNonParallelTask

Bases: _BaseTask

A ConverterNonParallelTask task is the same as a NonParallelTask, but it is executed differently in the Fractal backend.

Source code in src/fractal_task_tools/task_models.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
class ConverterNonParallelTask(_BaseTask):
    """
    A `ConverterNonParallelTask` task is the same as a `NonParallelTask`, but
    it is executed differently in the Fractal backend.
    """

    type: Literal["converter_non_parallel"] = "converter_non_parallel"

    @property
    def executable_non_parallel(self) -> str:
        return self.executable

    @property
    def meta_non_parallel(self) -> Optional[dict[str, Any]]:
        return self.meta

    @property
    def executable_parallel(self) -> None:
        return None

    @property
    def meta_parallel(self) -> None:
        return None

NonParallelTask

Bases: _BaseTask

A NonParallelTask object must include the executable attribute, and it may include the meta attribute.

Source code in src/fractal_task_tools/task_models.py
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
class NonParallelTask(_BaseTask):
    """
    A `NonParallelTask` object must include the `executable` attribute, and it
    may include the `meta` attribute.
    """

    type: Literal["non_parallel"] = "non_parallel"

    @property
    def executable_non_parallel(self) -> str:
        return self.executable

    @property
    def meta_non_parallel(self) -> Optional[dict[str, Any]]:
        return self.meta

    @property
    def executable_parallel(self) -> None:
        return None

    @property
    def meta_parallel(self) -> None:
        return None

ParallelTask

Bases: _BaseTask

A ParallelTask object must include the executable attribute, and it may include the meta attribute.

Source code in src/fractal_task_tools/task_models.py
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
class ParallelTask(_BaseTask):
    """
    A `ParallelTask` object must include the `executable` attribute, and it may
    include the `meta` attribute.
    """

    type: Literal["parallel"] = "parallel"

    @property
    def executable_non_parallel(self) -> None:
        return None

    @property
    def meta_non_parallel(self) -> None:
        return None

    @property
    def executable_parallel(self) -> str:
        return self.executable

    @property
    def meta_parallel(self) -> Optional[dict[str, Any]]:
        return self.meta