Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIX: No longer depending on pydotplus (networkx >=2.0 update) #3251

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 1 commit into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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