nipype / pydra

Pydra Dataflow Engine
https://nipype.github.io/pydra/
Other
120 stars 59 forks source link

ENH: Add support for argstr formatting of any iterable #614

Closed ghisvail closed 1 year ago

ghisvail commented 1 year ago

See #613 for context. I looked at the code path @effigies suggested where the fix should be implemented.

This PR should facilitate composition of interfaces producing and consuming iterable types, not just lists. Sets and tuples provide additional guarantees which are quite nice, such as uniqueness and size boundness respectively. Since strings and bytes also satisfy the Iterable protocol in Python, these need to be discarded explicitly in the instance type check.

Closes #613

ghisvail commented 1 year ago

I took this opportunity to fix a few typos and warnings which PyCharm complained about.

codecov[bot] commented 1 year ago

Codecov Report

Base: 81.23% // Head: 81.16% // Decreases project coverage by -0.06% :warning:

Coverage data is based on head (549c018) compared to base (a9a116d). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #614 +/- ## ========================================== - Coverage 81.23% 81.16% -0.07% ========================================== Files 20 20 Lines 4391 4391 Branches 1262 1262 ========================================== - Hits 3567 3564 -3 - Misses 820 823 +3 Partials 4 4 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `81.16% <100.00%> (-0.07%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/nipype/pydra/pull/614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [pydra/engine/task.py](https://codecov.io/gh/nipype/pydra/pull/614/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHlkcmEvZW5naW5lL3Rhc2sucHk=) | `93.53% <100.00%> (ø)` | | | [pydra/engine/helpers.py](https://codecov.io/gh/nipype/pydra/pull/614/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHlkcmEvZW5naW5lL2hlbHBlcnMucHk=) | `86.05% <0.00%> (-0.71%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

effigies commented 1 year ago

LGTM.

ghisvail commented 1 year ago

Is it ok if I merge this?

djarecka commented 1 year ago

yes, sorry, thank you! I will create a new release during the weekend