|
7 | 7 | "# Canonical task form\n", |
8 | 8 | "\n", |
9 | 9 | "Under the hood, all Python, shell and workflow tasks generated by the\n", |
10 | | - "`pydra.design.*.define` decorators/functions are translated to\n", |
| 10 | + "`pydra.compose.*.define` decorators/functions are translated to\n", |
11 | 11 | "[dataclasses](https://docs.python.org/3/library/dataclasses.html) by the\n", |
12 | 12 | "[Attrs](https://www.attrs.org/en/stable/). While the more compact syntax described\n", |
13 | 13 | "in the [Python-tasks](./4-python.html), [Shell-tasks](./5-shell.html) and [Workflow](./6-workflow.html)\n", |
|
28 | 28 | "source": [ |
29 | 29 | "## Python-tasks\n", |
30 | 30 | "\n", |
31 | | - "Python tasks in dataclass form are decorated by `pydra.design.python.define`\n", |
| 31 | + "Python tasks in dataclass form are decorated by `pydra.compose.python.define`\n", |
32 | 32 | "with inputs listed as type annotations. Outputs are similarly defined in a nested class\n", |
33 | 33 | "called `Outputs`. The function to be executed should be a staticmethod called `function`.\n", |
34 | 34 | "Default values can also be set directly, as with Attrs classes.\n", |
|
49 | 49 | "from pprint import pprint\n", |
50 | 50 | "from pydra.engine.helpers import fields_dict\n", |
51 | 51 | "from pydra.engine.specs import PythonTask, PythonOutputs\n", |
52 | | - "from pydra.design import python\n", |
| 52 | + "from pydra.compose import python\n", |
53 | 53 | "\n", |
54 | 54 | "\n", |
55 | 55 | "@python.define\n", |
|
152 | 152 | "import os\n", |
153 | 153 | "from pathlib import Path\n", |
154 | 154 | "from fileformats import generic\n", |
155 | | - "from pydra.design import shell\n", |
| 155 | + "from pydra.compose import shell\n", |
156 | 156 | "from pydra.engine.specs import ShellTask, ShellOutputs\n", |
157 | 157 | "from pydra.utils.typing import MultiInputObj\n", |
158 | 158 | "\n", |
|
200 | 200 | "metadata": {}, |
201 | 201 | "outputs": [], |
202 | 202 | "source": [ |
203 | | - "from pydra.design import python, workflow\n", |
| 203 | + "from pydra.compose import python, workflow\n", |
204 | 204 | "from pydra.engine.specs import WorkflowTask, WorkflowOutputs\n", |
205 | 205 | "\n", |
206 | 206 | "\n", |
|
0 commit comments