Skip to content

Commit 7f0c81c

Browse files
committed
[skip ci] updated README
1 parent b66ccbf commit 7f0c81c

File tree

1 file changed

+79
-1
lines changed

1 file changed

+79
-1
lines changed

README.rst

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,83 @@
11
Nipype2Pydra
22
============
3+
.. image:: https://github.com/nipype/nipype2pydra/actions/workflows/tests.yml/badge.svg
4+
:target: https://github.com/nipype/nipype2pydra/actions/workflows/tests.yml
5+
.. image:: https://codecov.io/gh/nipype/nipype2pydra/branch/main/graph/badge.svg?token=UIS0OGPST7
6+
:target: https://codecov.io/gh/nipype/nipype2pydra
7+
.. image:: https://img.shields.io/pypi/pyversions/nipype2pydra.svg
8+
:target: https://pypi.python.org/pypi/nipype2pydra/
9+
:alt: Supported Python versions
10+
.. image:: https://img.shields.io/pypi/v/nipype2pydra.svg
11+
:target: https://pypi.python.org/pypi/nipype2pydra/
12+
:alt: Latest Version
313

4-
CLI tool for porting Nipype code to Pydra
14+
Nipype2Pydra is a command-line tool for semi-automatically porting command interfaces
15+
and workflows written from the Nipype_ workflow engine to its successor Pydra_. It has
16+
been designed so that any required manual-specifications are stored in separate YAML
17+
specification files, which is read ahead of the conversion, so once designed the
18+
conversion can be re-run to pick up changes in newer versions of the Nipype_ code without
19+
having to redo the manual steps.
520

21+
22+
Basic Usage
23+
-----------
24+
25+
To convert a Nipype_ interface to a Pydra_ task run the `nipype2pydra task` command and
26+
pass it the conversion specification YAML file and the root of the package to save the
27+
generated module, e.g.::
28+
29+
$ nipype2pydra task ants_registration_registration.yaml /Users/youruser/git/pydra-ants/
30+
31+
32+
Conversion Specifications
33+
-------------------------
34+
35+
While the conversions aim to as automatic as possible, there are structural
36+
differences between Nipype_ and Pydra_ that require manual specification, and it might
37+
be desirable to rename some of the inputs/outputs to more intuitive names. Such
38+
specifications are stored in YAML_ format, such as the ANTs registration conversion
39+
specification,
40+
41+
.. code-block::yaml
42+
43+
task_name: Registration
44+
nipype_module: nipype.interfaces.ants.registration
45+
output_requirements:
46+
output_warped_image: ["fixed_image", "moving_image", "output_transform_prefix"]
47+
output_templates:
48+
output_warped_image: "{output_transform_prefix}warped"
49+
doctest:
50+
fixed_image: test.nii.gz
51+
moving_image: test.nii.gz
52+
cmdline: >-
53+
antsRegistration --output [ output_, output_warped_image.nii.gz ]
54+
--metric Mattes[ test.nii, test.nii, 1, 32, Random, 0.05 ]
55+
tests_inputs: []
56+
tests_outputs:
57+
- AttributeError
58+
59+
*Detailed description of the different options to go here*
60+
61+
Installation
62+
------------
63+
64+
*Nipype2Pydra* can be installed for Python >= 3.7 from PyPI with
65+
66+
.. code-block:: bash
67+
68+
$ python3 -m pip nipype2pydra
69+
70+
71+
License
72+
-------
73+
74+
This work is licensed under a
75+
`Creative Commons Attribution 4.0 International License <http://creativecommons.org/licenses/by/4.0/>`_
76+
77+
.. image:: https://i.creativecommons.org/l/by/4.0/88x31.png
78+
:target: http://creativecommons.org/licenses/by/4.0/
79+
:alt: Creative Commons Attribution 4.0 International License
80+
81+
.. _Pydra: https://pydra.readthedocs.io
82+
.. _Nipype: https://nipype.readthedocs.io/en/latest/
83+
.. _YAML: https://yaml.org

0 commit comments

Comments
 (0)