Skip to content

Commit ffdfce1

Browse files
committed
renamed Spec and specification to Def and definition
1 parent 35641b1 commit ffdfce1

36 files changed

+1748
-1731
lines changed

docs/changes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Release Notes
108108
---
109109

110110
* big changes in ``ShellTask``, ``DockerTask`` and ``SingularityTask``
111-
* customized input specification and output specification for ``Task``\s
111+
* customized input definition and output definition for ``Task``\s
112112
* adding singularity checks to Travis CI
113113
* binding all input files to the container
114114
* changes in ``Workflow``

docs/components.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Shell Command Tasks
6666
The *Task* can accommodate more complex shell commands by allowing the user to
6767
customize inputs and outputs of the commands.
6868
One can generate an input
69-
specification to specify names of inputs, positions in the command, types of
69+
definition to specify names of inputs, positions in the command, types of
7070
the inputs, and other metadata.
7171
As a specific example, FSL's BET command (Brain
7272
Extraction Tool) can be called on the command line as:
@@ -76,7 +76,7 @@ Shell Command Tasks
7676
bet input_file output_file -m
7777
7878
Each of the command argument can be treated as a named input to the
79-
``ShellCommandTask``, and can be included in the input specification.
79+
``ShellCommandTask``, and can be included in the input definition.
8080
As shown next, even an output is specified by constructing
8181
the *out_file* field form a template:
8282

@@ -97,7 +97,7 @@ Shell Command Tasks
9797
( "mask", bool,
9898
{ "help_string": "create binary mask",
9999
"argstr": "-m", } ) ],
100-
bases=(ShellSpec,) )
100+
bases=(ShellDef,) )
101101
102102
ShellCommandTask(executable="bet",
103103
input_spec=bet_input_spec)

docs/input_spec.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Input Specification
55

66
As it was mentioned in :ref:`shell_command_task`, the user can customize the input and output
77
for the `ShellCommandTask`.
8-
In this section, more examples of the input specification will be provided.
8+
In this section, more examples of the input definition will be provided.
99

1010

1111
Let's start from the previous example:
@@ -27,29 +27,29 @@ Let's start from the previous example:
2727
( "mask", bool,
2828
{ "help_string": "create binary mask",
2929
"argstr": "-m", } ) ],
30-
bases=(ShellSpec,) )
30+
bases=(ShellDef,) )
3131
3232
ShellCommandTask(executable="bet",
3333
input_spec=bet_input_spec)
3434
3535
3636
37-
In order to create an input specification, a new `SpecInfo` object has to be created.
37+
In order to create an input definition, a new `SpecInfo` object has to be created.
3838
The field `name` specifies the type of the spec and it should be always "Input" for
39-
the input specification.
40-
The field `bases` specifies the "base specification" you want to use (can think about it as a
41-
`parent class`) and it will usually contains `ShellSpec` only, unless you want to build on top of
42-
your other specification (this will not be cover in this section).
39+
the input definition.
40+
The field `bases` specifies the "base definition" you want to use (can think about it as a
41+
`parent class`) and it will usually contains `ShellDef` only, unless you want to build on top of
42+
your other definition (this will not be cover in this section).
4343
The part that should be always customised is the `fields` part.
44-
Each element of the `fields` is a separate input field that is added to the specification.
44+
Each element of the `fields` is a separate input field that is added to the definition.
4545
In this example, three-elements tuples - with name, type and dictionary with additional
4646
information - are used.
4747
But this is only one of the supported syntax, more options will be described below.
4848

49-
Adding a New Field to the Spec
49+
Adding a New Field to the Def
5050
------------------------------
5151

52-
Pydra uses `attr` classes to represent the input specification, and the full syntax for each field
52+
Pydra uses `attr` classes to represent the input definition, and the full syntax for each field
5353
is:
5454

5555
.. code-block:: python
@@ -152,15 +152,15 @@ In the example we used multiple keys in the metadata dictionary including `help_
152152
`output_file_template` (`str`):
153153
If provided, the field is treated also as an output field and it is added to the output spec.
154154
The template can use other fields, e.g. `{file1}`.
155-
Used in order to create an output specification.
155+
Used in order to create an output definition.
156156
157157
`output_field_name` (`str`, used together with `output_file_template`)
158158
If provided the field is added to the output spec with changed name.
159-
Used in order to create an output specification.
159+
Used in order to create an output definition.
160160
161161
`keep_extension` (`bool`, default: `True`):
162162
A flag that specifies if the file extension should be removed from the field value.
163-
Used in order to create an output specification.
163+
Used in order to create an output definition.
164164
165165
`readonly` (`bool`, default: `False`):
166166
If `True` the input field can't be provided by the user but it aggregates other input fields

docs/output_spec.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Output Specification
55

66
As it was mentioned in :ref:`shell_command_task`, the user can customize the input and output
77
for the `ShellCommandTask`.
8-
In this section, the output specification will be covered.
8+
In this section, the output definition will be covered.
99

1010

1111
Instead of using field with `output_file_template` in the customized `input_spec` to specify an output field,
@@ -29,26 +29,26 @@ a customized `output_spec` can be used, e.g.:
2929
),
3030
)
3131
],
32-
bases=(ShellOutSpec,),
32+
bases=(ShellOutDef,),
3333
)
3434
3535
ShellCommandTask(executable=executable,
3636
output_spec=output_spec)
3737
3838
3939
40-
Similarly as for `input_spec`, in order to create an output specification,
40+
Similarly as for `input_spec`, in order to create an output definition,
4141
a new `SpecInfo` object has to be created.
4242
The field `name` specifies the type of the spec and it should be always "Output" for
43-
the output specification.
44-
The field `bases` specifies the "base specification" you want to use (can think about it as a
45-
`parent class`) and it will usually contains `ShellOutSpec` only, unless you want to build on top of
46-
your other specification (this will not be cover in this section).
43+
the output definition.
44+
The field `bases` specifies the "base definition" you want to use (can think about it as a
45+
`parent class`) and it will usually contains `ShellOutDef` only, unless you want to build on top of
46+
your other definition (this will not be cover in this section).
4747
The part that should be always customised is the `fields` part.
48-
Each element of the `fields` is a separate output field that is added to the specification.
48+
Each element of the `fields` is a separate output field that is added to the definition.
4949
In this example, a three-elements tuple - with name, type and dictionary with additional
5050
information - is used.
51-
See :ref:`Input Specification section` for other recognized syntax for specification's fields
51+
See :ref:`Input Specification section` for other recognized syntax for definition's fields
5252
and possible types.
5353

5454

new-docs/source/index.rst

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,21 @@
33
Pydra
44
=====
55

6-
Pydra is a new lightweight dataflow engine written in Python, which provides a simple way to
7-
implement scientific workflows that use a mix of shell commands and Python functions.
8-
9-
Pydra is developed as an open-source project in the neuroimaging community,
10-
but it is designed as a general-purpose dataflow engine to support any scientific domain.
6+
Pydra is a lightweight, Python 3.11+ dataflow engine for computational graph construction,
7+
manipulation, and distributed execution. Designed as a successor to created for [Nipype](https://github.com/nipy/nipype),
8+
Pydra is a general-purpose engine that supports analytics in any scientific domain.
9+
Pydra helps build reproducible, scalable, reusable, and fully automated, provenance
10+
tracked scientific workflows that combine Python functions and shell commands.
11+
12+
The power of Pydra lies in ease of workflow creation and execution for complex
13+
multiparameter map-reduce operations, and the use of global cache.
14+
15+
Pydra's key features are:
16+
- Modular execution backends (see [Advanced execution](../tutorial/advanced-execution.html))
17+
- Map-reduce like semantics (see [Splitting and combining](../explanation/splitting-combining.html))
18+
- Global cache support to reduce recomputation (see [Hashing and caching](../explanation/hashing-caching.html))
19+
- Support for execution of Tasks in containerized environments (see [Environments](../explanation/environments.html))
20+
- Strong type-checking and type-hinting support (see [Typing](../explanation/typing.html))
1121

1222
See :ref:`Design philosophy` for more an explanation of the design of Pydra.
1323

@@ -64,7 +74,7 @@ Indices and tables
6474

6575
.. toctree::
6676
:maxdepth: 2
67-
:caption: Execution
77+
:caption: Task execution
6878
:hidden:
6979

7080
tutorial/getting-started

new-docs/source/tutorial/advanced-execution.ipynb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"## Plugins"
14+
"## Workers\n",
15+
"\n",
16+
"Pydra supports several workers with which to execute tasks\n",
17+
"\n",
18+
"- `ConcurrentFutures`\n",
19+
"- `SLURM`\n",
20+
"- `Dask` (experimental)\n",
21+
"- `Serial` (for debugging)"
1522
]
1623
},
1724
{

0 commit comments

Comments
 (0)