Skip to content

Commit

Permalink
Merge pull request #3251 from TheChymera/master
Browse files Browse the repository at this point in the history
FIX: No longer depending on pydotplus (networkx >=2.0 update)
  • Loading branch information
effigies authored Sep 18, 2020
2 parents 8c4a8b0 + f4f91dc commit 929de35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
3 changes: 1 addition & 2 deletions nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_nipype_gitversion():

# versions
NIBABEL_MIN_VERSION = "2.1.0"
NETWORKX_MIN_VERSION = "1.9"
NETWORKX_MIN_VERSION = "2.0"
NUMPY_MIN_VERSION = "1.13"
# Numpy bug in python 3.7:
# https://www.opensourceanswers.com/blog/you-shouldnt-use-python-37-for-data-science-right-now.html
Expand Down Expand Up @@ -143,7 +143,6 @@ def get_nipype_gitversion():
"packaging",
"prov>=%s" % PROV_VERSION,
"pydot>=%s" % PYDOT_MIN_VERSION,
"pydotplus",
"python-dateutil>=%s" % DATEUTIL_MIN_VERSION,
"rdflib>=%s" % RDFLIB_MIN_VERSION,
"scipy>=%s" % SCIPY_MIN_VERSION,
Expand Down
10 changes: 2 additions & 8 deletions nipype/interfaces/cmtk/nx.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,9 @@ def compute_singlevalued_measures(ntwk, weighted=True, calculate_cliques=False):
iflogger.info("Computing single valued measures:")
measures = {}
iflogger.info("...Computing degree assortativity (pearson number) ...")
try:
measures["degree_pearsonr"] = nx.degree_pearsonr(ntwk)
except AttributeError: # For NetworkX 1.6
measures["degree_pearsonr"] = nx.degree_pearson_correlation_coefficient(ntwk)
measures["degree_pearsonr"] = nx.degree_pearson_correlation_coefficient(ntwk)
iflogger.info("...Computing degree assortativity...")
try:
measures["degree_assortativity"] = nx.degree_assortativity(ntwk)
except AttributeError:
measures["degree_assortativity"] = nx.degree_assortativity_coefficient(ntwk)
measures["degree_assortativity"] = nx.degree_assortativity_coefficient(ntwk)
iflogger.info("...Computing transitivity...")
measures["transitivity"] = nx.transitivity(ntwk)
iflogger.info("...Computing number of connected_components...")
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Auto-generated by tools/update_requirements.py
click>=6.6.0
networkx>=1.9
networkx>=2.0
nibabel>=2.1.0
numpy>=1.13 ; python_version < "3.7"
numpy>=1.15.3 ; python_version >= "3.7"
packaging
prov>=1.5.2
pydot>=1.2.3
pydotplus
python-dateutil>=2.2
rdflib>=5.0.0
scipy>=0.14
Expand Down

0 comments on commit 929de35

Please sign in to comment.