Skip to content

Commit f4f91dc

Browse files
committed
FIX: No longer depending on pydotplus (networkx >=2.0 update)
Fixes: #3244
1 parent 8c4a8b0 commit f4f91dc

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

nipype/info.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def get_nipype_gitversion():
9999

100100
# versions
101101
NIBABEL_MIN_VERSION = "2.1.0"
102-
NETWORKX_MIN_VERSION = "1.9"
102+
NETWORKX_MIN_VERSION = "2.0"
103103
NUMPY_MIN_VERSION = "1.13"
104104
# Numpy bug in python 3.7:
105105
# https://www.opensourceanswers.com/blog/you-shouldnt-use-python-37-for-data-science-right-now.html
@@ -143,7 +143,6 @@ def get_nipype_gitversion():
143143
"packaging",
144144
"prov>=%s" % PROV_VERSION,
145145
"pydot>=%s" % PYDOT_MIN_VERSION,
146-
"pydotplus",
147146
"python-dateutil>=%s" % DATEUTIL_MIN_VERSION,
148147
"rdflib>=%s" % RDFLIB_MIN_VERSION,
149148
"scipy>=%s" % SCIPY_MIN_VERSION,

nipype/interfaces/cmtk/nx.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,9 @@ def compute_singlevalued_measures(ntwk, weighted=True, calculate_cliques=False):
289289
iflogger.info("Computing single valued measures:")
290290
measures = {}
291291
iflogger.info("...Computing degree assortativity (pearson number) ...")
292-
try:
293-
measures["degree_pearsonr"] = nx.degree_pearsonr(ntwk)
294-
except AttributeError: # For NetworkX 1.6
295-
measures["degree_pearsonr"] = nx.degree_pearson_correlation_coefficient(ntwk)
292+
measures["degree_pearsonr"] = nx.degree_pearson_correlation_coefficient(ntwk)
296293
iflogger.info("...Computing degree assortativity...")
297-
try:
298-
measures["degree_assortativity"] = nx.degree_assortativity(ntwk)
299-
except AttributeError:
300-
measures["degree_assortativity"] = nx.degree_assortativity_coefficient(ntwk)
294+
measures["degree_assortativity"] = nx.degree_assortativity_coefficient(ntwk)
301295
iflogger.info("...Computing transitivity...")
302296
measures["transitivity"] = nx.transitivity(ntwk)
303297
iflogger.info("...Computing number of connected_components...")

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Auto-generated by tools/update_requirements.py
22
click>=6.6.0
3-
networkx>=1.9
3+
networkx>=2.0
44
nibabel>=2.1.0
55
numpy>=1.13 ; python_version < "3.7"
66
numpy>=1.15.3 ; python_version >= "3.7"
77
packaging
88
prov>=1.5.2
99
pydot>=1.2.3
10-
pydotplus
1110
python-dateutil>=2.2
1211
rdflib>=5.0.0
1312
scipy>=0.14

0 commit comments

Comments
 (0)