Skip to content

Commit a485cf6

Browse files
authored
Merge pull request #3038 from nipy/rel/1.2.3
REL: 1.2.3
2 parents 6314fde + dd38a83 commit a485cf6

File tree

7 files changed

+295
-287
lines changed

7 files changed

+295
-287
lines changed

.mailmap

+167-194
Large diffs are not rendered by default.

.zenodo.json

+36-26
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"creators": [
3-
{
4-
"affiliation": "Department of Psychology, Stanford University",
5-
"name": "Gorgolewski, Krzysztof J.",
6-
"orcid": "0000-0003-3321-7583"
7-
},
83
{
94
"affiliation": "Department of Psychology, Stanford University",
105
"name": "Esteban, Oscar",
@@ -150,15 +145,20 @@
150145
"affiliation": "Concordia University",
151146
"name": "Benderoff, Erin"
152147
},
148+
{
149+
"affiliation": "Dartmouth College: Hanover, NH, United States",
150+
"name": "Halchenko, Yaroslav O.",
151+
"orcid": "0000-0003-3456-2493"
152+
},
153153
{
154154
"affiliation": "Institute for Biomedical Engineering, ETH and University of Zurich",
155155
"name": "Christian, Horea",
156156
"orcid": "0000-0001-7037-2449"
157157
},
158158
{
159-
"affiliation": "Dartmouth College: Hanover, NH, United States",
160-
"name": "Halchenko, Yaroslav O.",
161-
"orcid": "0000-0003-3456-2493"
159+
"affiliation": "The Centre for Addiction and Mental Health",
160+
"name": "Joseph, Michael",
161+
"orcid": "0000-0002-0068-230X"
162162
},
163163
{
164164
"affiliation": "UC San Diego",
@@ -202,11 +202,6 @@
202202
"name": "Varoquaux, Gael",
203203
"orcid": "0000-0003-1076-5122"
204204
},
205-
{
206-
"affiliation": "The Centre for Addiction and Mental Health",
207-
"name": "Joseph, Michael",
208-
"orcid": "0000-0002-0068-230X"
209-
},
210205
{
211206
"affiliation": "Athena EPI, Inria Sophia-Antipolis",
212207
"name": "Wassermann, Demian",
@@ -250,14 +245,14 @@
250245
"affiliation": "Nathan s Kline institute for psychiatric research",
251246
"name": "Sikka, Sharad"
252247
},
248+
{
249+
"name": "Forbes, Jessica"
250+
},
253251
{
254252
"affiliation": "University College London",
255253
"name": "Mancini, Matteo",
256254
"orcid": "0000-0001-7194-4568"
257255
},
258-
{
259-
"name": "Forbes, Jessica"
260-
},
261256
{
262257
"affiliation": "Duke University",
263258
"name": "Iqbal, Shariq",
@@ -295,10 +290,6 @@
295290
{
296291
"name": "Kent, James"
297292
},
298-
{
299-
"name": "Heinsfeld, Anibal S\u00f3lon",
300-
"orcid": "0000-0002-2050-0614"
301-
},
302293
{
303294
"name": "Watanabe, Aimi"
304295
},
@@ -325,6 +316,10 @@
325316
"name": "Eshaghi, Arman",
326317
"orcid": "0000-0002-6652-3512"
327318
},
319+
{
320+
"name": "Heinsfeld, Anibal S\u00f3lon",
321+
"orcid": "0000-0002-2050-0614"
322+
},
328323
{
329324
"name": "Ginsburg, Daniel"
330325
},
@@ -352,14 +347,14 @@
352347
"affiliation": "UniversityHospital Heidelberg, Germany",
353348
"name": "Kleesiek, Jens"
354349
},
355-
{
356-
"name": "Erickson, Drew"
357-
},
358350
{
359351
"affiliation": "NIMH IRP",
360352
"name": "Lee, John A.",
361353
"orcid": "0000-0001-5884-4247"
362354
},
355+
{
356+
"name": "Erickson, Drew"
357+
},
363358
{
364359
"affiliation": "Child Mind Institute",
365360
"name": "Giavasis, Steven"
@@ -378,6 +373,9 @@
378373
{
379374
"name": "K\u00fcttner, Ren\u00e9"
380375
},
376+
{
377+
"name": "Perez-Guevara, Martin"
378+
},
381379
{
382380
"name": "Millman, Jarrod"
383381
},
@@ -412,6 +410,11 @@
412410
"name": "Stadler, J\u00f6rg",
413411
"orcid": "0000-0003-4313-129X"
414412
},
413+
{
414+
"affiliation": "Korea Advanced Institute of Science and Technology",
415+
"name": "Kim, Sin",
416+
"orcid": "0000-0003-4652-3758"
417+
},
415418
{
416419
"affiliation": "University College London",
417420
"name": "P\u00e9rez-Garc\u00eda, Fernando",
@@ -524,6 +527,11 @@
524527
{
525528
"name": "Matsubara, K"
526529
},
530+
{
531+
"affiliation": "University of Pennsylvania",
532+
"name": "Junhao WEN",
533+
"orcid": "0000-0003-2077-3070"
534+
},
527535
{
528536
"name": "Cheung, Brian"
529537
},
@@ -679,9 +687,6 @@
679687
"name": "Pellman, John",
680688
"orcid": "0000-0001-6810-4461"
681689
},
682-
{
683-
"name": "Perez-Guevara, Martin"
684-
},
685690
{
686691
"name": "Khanuja, Ranjeet"
687692
},
@@ -701,6 +706,11 @@
701706
{
702707
"name": "Lai, Jeff"
703708
},
709+
{
710+
"affiliation": "Department of Psychology, Stanford University",
711+
"name": "Gorgolewski, Krzysztof J.",
712+
"orcid": "0000-0003-3321-7583"
713+
},
704714
{
705715
"affiliation": "MIT, HMS",
706716
"name": "Ghosh, Satrajit",

doc/changelog/1.X.X-changelog

+21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
1.2.3 (September 23, 2019)
2+
==========================
3+
4+
Python 1.2.3 will be the last version to support Python 3.4.
5+
6+
##### [Full changelog](https://github.com/nipy/nipype/milestone/35?closed=1)
7+
8+
* FIX: Patch Path.mkdir for Python 2 (https://github.com/nipy/nipype/pull/3037)
9+
* FIX: Drop deprecated message argument to ``FileNotFoundError`` (https://github.com/nipy/nipype/pull/3035)
10+
* FIX: Handle NIFTI extensions in ``afni.Qwarp`` (https://github.com/nipy/nipype/pull/3028)
11+
* FIX: Disallow returning ``None`` in ``pipeline.utils.load_resultfile`` (https://github.com/nipy/nipype/pull/3023)
12+
* ENH: Allow afni.CatMatvec to accept empty string opkeys (https://github.com/nipy/nipype/pull/2943)
13+
* ENH: Add ``mrrtrix3.MRResize`` interface (https://github.com/nipy/nipype/pull/3031)
14+
* ENH: Add version check / telemetry to Nipype (https://github.com/nipy/nipype/pull/3027)
15+
* ENH: Update MCFLIRT outputs for FSL 6+ (https://github.com/nipy/nipype/pull/3029)
16+
* ENH: Lightweight node cache checking (https://github.com/nipy/nipype/pull/3026)
17+
* ENH: Avoid loading result from file when writing reports (https://github.com/nipy/nipype/pull/3024)
18+
* ENH: replace portalocker with filelock (https://github.com/nipy/nipype/pull/3025)
19+
* MAINT: Set minimum yapf for `checkspecs` to 0.27 (https://github.com/nipy/nipype/pull/3033)
20+
21+
122
1.2.2 (September 07, 2019)
223
==========================
324

doc/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
# The short X.Y version.
8383
version = nipype.__version__
8484
# The full version, including alpha/beta/rc tags.
85-
release = "1.2.2"
85+
release = "1.2.3"
8686

8787
# The language for content autogenerated by Sphinx. Refer to documentation
8888
# for a list of supported languages.

nipype/info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# nipype version information
1111
# Remove -dev for release
12-
__version__ = '1.2.3-dev'
12+
__version__ = '1.2.3'
1313

1414

1515
def get_nipype_gitversion():

tools/feedstock.sh

+4
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ Updating feedstock to release branch
108108
109109
* URL = https://github.com/$SRCREPO/archive/$REF.tar.gz
110110
* SHA256 = \`$SHA256\`
111+
112+
---
113+
114+
@conda-forge-admin, please rerender.
111115
END
112116
fi
113117

tools/update_zenodo.py

+65-65
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,21 @@
11
#!/usr/bin/env python3
2+
"""Update and sort the creators list of the zenodo record."""
3+
import sys
4+
import shutil
5+
from pathlib import Path
26
import json
37
from fuzzywuzzy import fuzz, process
4-
import shutil
5-
import os
68
import subprocess as sp
79

8-
if os.path.exists('line-contributions.txt'):
9-
with open('line-contributions.txt', 'rt') as fp:
10-
lines = fp.readlines()
11-
else:
12-
if shutil.which('git-line-summary'):
13-
print("Running git-line-summary on nipype repo")
14-
lines = sp.check_output(['git-line-summary']).decode().split('\n')
15-
else:
16-
raise RuntimeError("Install Git Extras to view git contributors")
17-
18-
data = [' '.join(line.strip().split()[1:-1]) for line in lines if '%' in line]
19-
20-
# load zenodo from master
21-
with open('.zenodo.json', 'rt') as fp:
22-
zenodo = json.load(fp)
23-
zen_names = [' '.join(val['name'].split(',')[::-1]).strip()
24-
for val in zenodo['creators']]
25-
26-
name_matches = []
27-
28-
for ele in data:
29-
matches = process.extract(ele, zen_names, scorer=fuzz.token_sort_ratio,
30-
limit=2)
31-
# matches is a list [('First match', % Match), ('Second match', % Match)]
32-
if matches[0][1] > 80:
33-
val = zenodo['creators'][zen_names.index(matches[0][0])]
34-
else:
35-
# skip unmatched names
36-
print("No entry to sort:", ele)
37-
continue
38-
39-
if val not in name_matches:
40-
name_matches.append(val)
41-
10+
# These ORCIDs should go last
11+
CREATORS_LAST = ['Gorgolewski, Krzysztof J.', 'Ghosh, Satrajit']
4212
# for entries not found in line-contributions
43-
missing_entries = [
13+
MISSING_ENTRIES = [
4414
{"name": "Varada, Jan"},
4515
{"name": "Schwabacher, Isaac"},
4616
{"affiliation": "Child Mind Institute / Nathan Kline Institute",
4717
"name": "Pellman, John",
4818
"orcid": "0000-0001-6810-4461"},
49-
{"name": "Perez-Guevara, Martin"},
5019
{"name": "Khanuja, Ranjeet"},
5120
{"affiliation":
5221
"Medical Imaging & Biomarkers, Bioclinica, Newark, CA, USA.",
@@ -61,31 +30,62 @@
6130
{"name": "Lai, Jeff"}
6231
]
6332

64-
for entry in missing_entries:
65-
name_matches.append(entry)
33+
if __name__ == '__main__':
34+
contrib_file = Path('line-contributors.txt')
35+
lines = []
36+
if contrib_file.exists():
37+
print('WARNING: Reusing existing line-contributors.txt file.', file=sys.stderr)
38+
lines = contrib_file.read_text().splitlines()
6639

67-
68-
def fix_position(creators):
69-
# position first / last authors
70-
f_authr = None
71-
l_authr = None
72-
73-
for i, info in enumerate(creators):
74-
if info['name'] == 'Gorgolewski, Krzysztof J.':
75-
f_authr = i
76-
if info['name'] == 'Ghosh, Satrajit':
77-
l_authr = i
78-
79-
if f_authr is None or l_authr is None:
80-
raise AttributeError('Missing important people')
81-
82-
creators.insert(0, creators.pop(f_authr))
83-
creators.insert(len(creators), creators.pop(l_authr + 1))
84-
return creators
85-
86-
87-
zenodo['creators'] = fix_position(name_matches)
88-
89-
with open('.zenodo.json', 'wt') as fp:
90-
json.dump(zenodo, fp, indent=2, sort_keys=True)
91-
fp.write('\n')
40+
git_line_summary_path = shutil.which('git-line-summary')
41+
if not lines and git_line_summary_path:
42+
print("Running git-line-summary on nipype repo")
43+
lines = sp.check_output([git_line_summary_path]).decode().splitlines()
44+
contrib_file.write_text('\n'.join(lines))
45+
46+
if not lines:
47+
raise RuntimeError("""\
48+
Could not find line-contributors from git repository.%s""" % """ \
49+
git-line-summary not found, please install git-extras. """ * (git_line_summary_path is None))
50+
51+
data = [' '.join(line.strip().split()[1:-1]) for line in lines if '%' in line]
52+
53+
# load zenodo from master
54+
zenodo_file = Path('.zenodo.json')
55+
zenodo = json.loads(zenodo_file.read_text())
56+
zen_names = [' '.join(val['name'].split(',')[::-1]).strip()
57+
for val in zenodo['creators']]
58+
total_names = len(zen_names) + len(MISSING_ENTRIES)
59+
60+
name_matches = []
61+
position = 1
62+
for ele in data:
63+
matches = process.extract(ele, zen_names, scorer=fuzz.token_sort_ratio,
64+
limit=2)
65+
# matches is a list [('First match', % Match), ('Second match', % Match)]
66+
if matches[0][1] > 80:
67+
val = zenodo['creators'][zen_names.index(matches[0][0])]
68+
else:
69+
# skip unmatched names
70+
print("No entry to sort:", ele)
71+
continue
72+
73+
if val not in name_matches:
74+
if val['name'] not in CREATORS_LAST:
75+
val['position'] = position
76+
position += 1
77+
else:
78+
val['position'] = total_names + CREATORS_LAST.index(val['name'])
79+
name_matches.append(val)
80+
81+
for missing in MISSING_ENTRIES:
82+
missing['position'] = position
83+
position += 1
84+
name_matches.append(missing)
85+
86+
zenodo['creators'] = sorted(name_matches, key=lambda k: k['position'])
87+
# Remove position
88+
for creator in zenodo['creators']:
89+
del creator['position']
90+
91+
zenodo_file.write_text('%s\n' % json.dumps(zenodo, indent=2, sort_keys=True))

0 commit comments

Comments
 (0)