nipype / nipype2pydra

Scripts for importing workflows written in Nipype to the Pydra dataflow engine syntax
Other
1 stars 2 forks source link

Restructured specs and task package auto-generation script #10

Closed tclose closed 1 year ago

tclose commented 1 year ago

This PR restructures the format for the YAML specs used to assist the conversion process the tasks, adding fields to rename the task and fields and override the inferred field types.

It also adds the scripts/create_packages.py script, which scrapes nipype.interfaces to generate separate stub git repos for each of the task packages (e.g. pydra-ants, pydra-afni, pydra-fsl, pydra-dipy, etc...) that are pre-populated with auto-generated YAML files with info inferred from doctests. See pydra-ants-autodemo for an example of what the repositories would look like.

We should be able to use the script to quickly create separate repos for each tool package in Nipype. The GH actions are designed to then have the packages automatically convert all the Nipype interfaces and publish release whenever a new nipype or nipype2pydra version is released.

The nipype2pydra conversion step will generate a unittest for each interface, that attempts to initialise the task with sensible values and run it for 10s. If it makes it that far it is considered to have passed the initialisation phase and is marked as passed. The values passed to the fields are determined by their types, and for selected file-types (e.g. NIfTI, DICOM) the fileformats package is able to provide sample filesets using a package I wrote called medimages4tests.

I have tried to explain the process in the README of pydra-ants-autodemo, let me know if it doesn't make sense with and adds scripts for auto-generating new package repos