Skip to content

[ENH] Add all DIPY workflows dynamically #2905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 18, 2019
Merged

Conversation

skoudoro
Copy link
Member

This PR is a follow up of #2830. It permits to add automatically all DIPY workflows following your DIPY version. This should fix this comment from @arokem and @chrisfilo.

Originally, the goal was to fix this issue but thanks to @mgxd who already did it!

I tag @Garyfallidis and @satra just to keep them updated.

@codecov-io
Copy link

codecov-io commented Mar 28, 2019

Codecov Report

Merging #2905 into master will decrease coverage by 0.05%.
The diff coverage is 51.02%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2905      +/-   ##
=========================================
- Coverage   67.56%   67.5%   -0.06%     
=========================================
  Files         343     344       +1     
  Lines       43604   43648      +44     
  Branches     5427    5438      +11     
=========================================
+ Hits        29461   29466       +5     
- Misses      13438   13471      +33     
- Partials      705     711       +6
Flag Coverage Δ
#smoketests 50.47% <ø> (ø) ⬆️
#unittests 64.96% <51.02%> (-0.06%) ⬇️
Impacted Files Coverage Δ
nipype/interfaces/dipy/tracks.py 27.32% <0%> (-5.07%) ⬇️
nipype/interfaces/dipy/reconstruction.py 28.63% <0%> (-4.38%) ⬇️
nipype/interfaces/dipy/stats.py 100% <100%> (ø)
nipype/interfaces/dipy/base.py 76.99% <100%> (+0.41%) ⬆️
nipype/interfaces/dipy/preprocess.py 27.37% <100%> (+3.84%) ⬆️
nipype/interfaces/dipy/registration.py 31.25% <11.11%> (-68.75%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcbe28e...bdd4d21. Read the comment docs.

Copy link
Member

@arokem arokem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Just a couple of comments/questions from me.

return [(m, obj) for m, obj in inspect.getmembers(module)
if inspect.isclass(obj) and
issubclass(obj, module.Workflow) and
m not in ['Workflow', 'CombinedWorkflow']]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in dipy/dipy#1800, I suggest that you set this list to be a module-level constant.

BTW: the fact that you are using this same code there suggests that this might be a pattern worth including in the dipy library code, instead of here.

@@ -33,9 +34,19 @@
DTIModel = dipy_to_nipype_interface("DTIModel", ReconstDtiFlow)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you want to remove these from here?

@satra
Copy link
Member

satra commented Apr 18, 2019

@skoudoro - this looks great. do you want to address @arokem comments?

@skoudoro
Copy link
Member Author

No problem @satra, I just did it!

@satra satra merged commit ba34191 into nipy:master Apr 18, 2019
@effigies effigies added this to the 1.2.0 milestone Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removed/renamed DetTrackPAMFlow?
5 participants