From bc499b807f11ba4b016f912a775b9c6343f843c3 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 1 Mar 2018 10:09:56 -0500 Subject: [PATCH 1/2] MAINT: Add dev install option, update CONTRIBUTING --- CONTRIBUTING.md | 5 +++-- nipype/info.py | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a6b91a52ab..4380612287 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,8 +57,9 @@ Make sure to [keep your fork up to date][link_updateupstreamwiki] with the maste If you're adding a new tool from an existing neuroimaging toolkit (e.g., 3dDeconvolve from AFNI), check out the [guide for adding new interfaces to Nipype][link_new_interfaces]. To confirm that your changes worked as intended, [clone your fork][link_cloning] to create a local directory. -In this local directory, run `python setup.py develop`. -This will add your version of nipype to your local python environment. +In this local directory, run `pip install -e .[dev]`. +This will add your version of nipype to your local python environment and +install dependencies needed for development. Then, in this local nipype directory, run `make check-before-commit`. If you get no errors, you're ready to submit your changes! diff --git a/nipype/info.py b/nipype/info.py index 7cee71d6bd..224f62b3e8 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -167,7 +167,12 @@ def get_nipype_gitversion(): # 'mesh': ['mayavi'] # Enable when it works } +_list_union = lambda x: list(set(sum(x, []))) + # Enable a handle to install all extra dependencies at once -EXTRA_REQUIRES['all'] = [val for _, val in list(EXTRA_REQUIRES.items())] +EXTRA_REQUIRES['all'] = _list_union(EXTRA_REQUIRES.values()) +# dev = doc + tests + specs +EXTRA_REQUIRES['dev'] = _list_union(EXTRA_REQUIRES[key] + for key in ('doc', 'tests', 'specs')) STATUS = 'stable' From c1fd509eaf9ba3807cea5a2dc1e2ab7dc7330c07 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 1 Mar 2018 10:46:36 -0500 Subject: [PATCH 2/2] FIX: Work around install weirdness --- nipype/info.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nipype/info.py b/nipype/info.py index 224f62b3e8..0964d69dbf 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -167,12 +167,15 @@ def get_nipype_gitversion(): # 'mesh': ['mayavi'] # Enable when it works } -_list_union = lambda x: list(set(sum(x, []))) + +def _list_union(iterable): + return list(set(sum(iterable, []))) + # Enable a handle to install all extra dependencies at once EXTRA_REQUIRES['all'] = _list_union(EXTRA_REQUIRES.values()) # dev = doc + tests + specs -EXTRA_REQUIRES['dev'] = _list_union(EXTRA_REQUIRES[key] - for key in ('doc', 'tests', 'specs')) +EXTRA_REQUIRES['dev'] = _list_union(val for key, val in EXTRA_REQUIRES.items() + if key in ('doc', 'tests', 'specs')) STATUS = 'stable'