Skip to content

REL: 1.2.3 #3038

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 11 commits into from
Sep 23, 2019
361 changes: 167 additions & 194 deletions .mailmap

Large diffs are not rendered by default.

62 changes: 36 additions & 26 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"creators": [
{
"affiliation": "Department of Psychology, Stanford University",
"name": "Gorgolewski, Krzysztof J.",
"orcid": "0000-0003-3321-7583"
},
{
"affiliation": "Department of Psychology, Stanford University",
"name": "Esteban, Oscar",
Expand Down Expand Up @@ -150,15 +145,20 @@
"affiliation": "Concordia University",
"name": "Benderoff, Erin"
},
{
"affiliation": "Dartmouth College: Hanover, NH, United States",
"name": "Halchenko, Yaroslav O.",
"orcid": "0000-0003-3456-2493"
},
{
"affiliation": "Institute for Biomedical Engineering, ETH and University of Zurich",
"name": "Christian, Horea",
"orcid": "0000-0001-7037-2449"
},
{
"affiliation": "Dartmouth College: Hanover, NH, United States",
"name": "Halchenko, Yaroslav O.",
"orcid": "0000-0003-3456-2493"
"affiliation": "The Centre for Addiction and Mental Health",
"name": "Joseph, Michael",
"orcid": "0000-0002-0068-230X"
},
{
"affiliation": "UC San Diego",
Expand Down Expand Up @@ -202,11 +202,6 @@
"name": "Varoquaux, Gael",
"orcid": "0000-0003-1076-5122"
},
{
"affiliation": "The Centre for Addiction and Mental Health",
"name": "Joseph, Michael",
"orcid": "0000-0002-0068-230X"
},
{
"affiliation": "Athena EPI, Inria Sophia-Antipolis",
"name": "Wassermann, Demian",
Expand Down Expand Up @@ -250,14 +245,14 @@
"affiliation": "Nathan s Kline institute for psychiatric research",
"name": "Sikka, Sharad"
},
{
"name": "Forbes, Jessica"
},
{
"affiliation": "University College London",
"name": "Mancini, Matteo",
"orcid": "0000-0001-7194-4568"
},
{
"name": "Forbes, Jessica"
},
{
"affiliation": "Duke University",
"name": "Iqbal, Shariq",
Expand Down Expand Up @@ -295,10 +290,6 @@
{
"name": "Kent, James"
},
{
"name": "Heinsfeld, Anibal S\u00f3lon",
"orcid": "0000-0002-2050-0614"
},
{
"name": "Watanabe, Aimi"
},
Expand All @@ -325,6 +316,10 @@
"name": "Eshaghi, Arman",
"orcid": "0000-0002-6652-3512"
},
{
"name": "Heinsfeld, Anibal S\u00f3lon",
"orcid": "0000-0002-2050-0614"
},
{
"name": "Ginsburg, Daniel"
},
Expand Down Expand Up @@ -352,14 +347,14 @@
"affiliation": "UniversityHospital Heidelberg, Germany",
"name": "Kleesiek, Jens"
},
{
"name": "Erickson, Drew"
},
{
"affiliation": "NIMH IRP",
"name": "Lee, John A.",
"orcid": "0000-0001-5884-4247"
},
{
"name": "Erickson, Drew"
},
{
"affiliation": "Child Mind Institute",
"name": "Giavasis, Steven"
Expand All @@ -378,6 +373,9 @@
{
"name": "K\u00fcttner, Ren\u00e9"
},
{
"name": "Perez-Guevara, Martin"
},
{
"name": "Millman, Jarrod"
},
Expand Down Expand Up @@ -412,6 +410,11 @@
"name": "Stadler, J\u00f6rg",
"orcid": "0000-0003-4313-129X"
},
{
"affiliation": "Korea Advanced Institute of Science and Technology",
"name": "Kim, Sin",
"orcid": "0000-0003-4652-3758"
},
{
"affiliation": "University College London",
"name": "P\u00e9rez-Garc\u00eda, Fernando",
Expand Down Expand Up @@ -524,6 +527,11 @@
{
"name": "Matsubara, K"
},
{
"affiliation": "University of Pennsylvania",
"name": "Junhao WEN",
"orcid": "0000-0003-2077-3070"
},
{
"name": "Cheung, Brian"
},
Expand Down Expand Up @@ -679,9 +687,6 @@
"name": "Pellman, John",
"orcid": "0000-0001-6810-4461"
},
{
"name": "Perez-Guevara, Martin"
},
{
"name": "Khanuja, Ranjeet"
},
Expand All @@ -701,6 +706,11 @@
{
"name": "Lai, Jeff"
},
{
"affiliation": "Department of Psychology, Stanford University",
"name": "Gorgolewski, Krzysztof J.",
"orcid": "0000-0003-3321-7583"
},
{
"affiliation": "MIT, HMS",
"name": "Ghosh, Satrajit",
Expand Down
21 changes: 21 additions & 0 deletions doc/changelog/1.X.X-changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
1.2.3 (September 23, 2019)
==========================

Python 1.2.3 will be the last version to support Python 3.4.

##### [Full changelog](https://github.com/nipy/nipype/milestone/35?closed=1)

* FIX: Patch Path.mkdir for Python 2 (https://github.com/nipy/nipype/pull/3037)
* FIX: Drop deprecated message argument to ``FileNotFoundError`` (https://github.com/nipy/nipype/pull/3035)
* FIX: Handle NIFTI extensions in ``afni.Qwarp`` (https://github.com/nipy/nipype/pull/3028)
* FIX: Disallow returning ``None`` in ``pipeline.utils.load_resultfile`` (https://github.com/nipy/nipype/pull/3023)
* ENH: Allow afni.CatMatvec to accept empty string opkeys (https://github.com/nipy/nipype/pull/2943)
* ENH: Add ``mrrtrix3.MRResize`` interface (https://github.com/nipy/nipype/pull/3031)
* ENH: Add version check / telemetry to Nipype (https://github.com/nipy/nipype/pull/3027)
* ENH: Update MCFLIRT outputs for FSL 6+ (https://github.com/nipy/nipype/pull/3029)
* ENH: Lightweight node cache checking (https://github.com/nipy/nipype/pull/3026)
* ENH: Avoid loading result from file when writing reports (https://github.com/nipy/nipype/pull/3024)
* ENH: replace portalocker with filelock (https://github.com/nipy/nipype/pull/3025)
* MAINT: Set minimum yapf for `checkspecs` to 0.27 (https://github.com/nipy/nipype/pull/3033)


1.2.2 (September 07, 2019)
==========================

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
# The short X.Y version.
version = nipype.__version__
# The full version, including alpha/beta/rc tags.
release = "1.2.2"
release = "1.2.3"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# nipype version information
# Remove -dev for release
__version__ = '1.2.3-dev'
__version__ = '1.2.3'


def get_nipype_gitversion():
Expand Down
4 changes: 4 additions & 0 deletions tools/feedstock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ Updating feedstock to release branch

* URL = https://github.com/$SRCREPO/archive/$REF.tar.gz
* SHA256 = \`$SHA256\`

---

@conda-forge-admin, please rerender.
END
fi

Expand Down
130 changes: 65 additions & 65 deletions tools/update_zenodo.py
Original file line number Diff line number Diff line change
@@ -1,52 +1,21 @@
#!/usr/bin/env python3
"""Update and sort the creators list of the zenodo record."""
import sys
import shutil
from pathlib import Path
import json
from fuzzywuzzy import fuzz, process
import shutil
import os
import subprocess as sp

if os.path.exists('line-contributions.txt'):
with open('line-contributions.txt', 'rt') as fp:
lines = fp.readlines()
else:
if shutil.which('git-line-summary'):
print("Running git-line-summary on nipype repo")
lines = sp.check_output(['git-line-summary']).decode().split('\n')
else:
raise RuntimeError("Install Git Extras to view git contributors")

data = [' '.join(line.strip().split()[1:-1]) for line in lines if '%' in line]

# load zenodo from master
with open('.zenodo.json', 'rt') as fp:
zenodo = json.load(fp)
zen_names = [' '.join(val['name'].split(',')[::-1]).strip()
for val in zenodo['creators']]

name_matches = []

for ele in data:
matches = process.extract(ele, zen_names, scorer=fuzz.token_sort_ratio,
limit=2)
# matches is a list [('First match', % Match), ('Second match', % Match)]
if matches[0][1] > 80:
val = zenodo['creators'][zen_names.index(matches[0][0])]
else:
# skip unmatched names
print("No entry to sort:", ele)
continue

if val not in name_matches:
name_matches.append(val)

# These ORCIDs should go last
CREATORS_LAST = ['Gorgolewski, Krzysztof J.', 'Ghosh, Satrajit']
# for entries not found in line-contributions
missing_entries = [
MISSING_ENTRIES = [
{"name": "Varada, Jan"},
{"name": "Schwabacher, Isaac"},
{"affiliation": "Child Mind Institute / Nathan Kline Institute",
"name": "Pellman, John",
"orcid": "0000-0001-6810-4461"},
{"name": "Perez-Guevara, Martin"},
{"name": "Khanuja, Ranjeet"},
{"affiliation":
"Medical Imaging & Biomarkers, Bioclinica, Newark, CA, USA.",
Expand All @@ -61,31 +30,62 @@
{"name": "Lai, Jeff"}
]

for entry in missing_entries:
name_matches.append(entry)
if __name__ == '__main__':
contrib_file = Path('line-contributors.txt')
lines = []
if contrib_file.exists():
print('WARNING: Reusing existing line-contributors.txt file.', file=sys.stderr)
lines = contrib_file.read_text().splitlines()


def fix_position(creators):
# position first / last authors
f_authr = None
l_authr = None

for i, info in enumerate(creators):
if info['name'] == 'Gorgolewski, Krzysztof J.':
f_authr = i
if info['name'] == 'Ghosh, Satrajit':
l_authr = i

if f_authr is None or l_authr is None:
raise AttributeError('Missing important people')

creators.insert(0, creators.pop(f_authr))
creators.insert(len(creators), creators.pop(l_authr + 1))
return creators


zenodo['creators'] = fix_position(name_matches)

with open('.zenodo.json', 'wt') as fp:
json.dump(zenodo, fp, indent=2, sort_keys=True)
fp.write('\n')
git_line_summary_path = shutil.which('git-line-summary')
if not lines and git_line_summary_path:
print("Running git-line-summary on nipype repo")
lines = sp.check_output([git_line_summary_path]).decode().splitlines()
contrib_file.write_text('\n'.join(lines))

if not lines:
raise RuntimeError("""\
Could not find line-contributors from git repository.%s""" % """ \
git-line-summary not found, please install git-extras. """ * (git_line_summary_path is None))

data = [' '.join(line.strip().split()[1:-1]) for line in lines if '%' in line]

# load zenodo from master
zenodo_file = Path('.zenodo.json')
zenodo = json.loads(zenodo_file.read_text())
zen_names = [' '.join(val['name'].split(',')[::-1]).strip()
for val in zenodo['creators']]
total_names = len(zen_names) + len(MISSING_ENTRIES)

name_matches = []
position = 1
for ele in data:
matches = process.extract(ele, zen_names, scorer=fuzz.token_sort_ratio,
limit=2)
# matches is a list [('First match', % Match), ('Second match', % Match)]
if matches[0][1] > 80:
val = zenodo['creators'][zen_names.index(matches[0][0])]
else:
# skip unmatched names
print("No entry to sort:", ele)
continue

if val not in name_matches:
if val['name'] not in CREATORS_LAST:
val['position'] = position
position += 1
else:
val['position'] = total_names + CREATORS_LAST.index(val['name'])
name_matches.append(val)

for missing in MISSING_ENTRIES:
missing['position'] = position
position += 1
name_matches.append(missing)

zenodo['creators'] = sorted(name_matches, key=lambda k: k['position'])
# Remove position
for creator in zenodo['creators']:
del creator['position']

zenodo_file.write_text('%s\n' % json.dumps(zenodo, indent=2, sort_keys=True))