Skip to content

FIX: catch write_graph errors for 'hierarchical/colored #1944

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
Apr 12, 2017

Conversation

mgxd
Copy link
Member

@mgxd mgxd commented Apr 6, 2017

@codecov-io
Copy link

codecov-io commented Apr 7, 2017

Codecov Report

Merging #1944 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1944      +/-   ##
==========================================
- Coverage   72.49%   72.48%   -0.01%     
==========================================
  Files        1063     1063              
  Lines       54159    54161       +2     
  Branches     7811     7812       +1     
==========================================
  Hits        39260    39260              
- Misses      13680    13681       +1     
- Partials     1219     1220       +1
Flag Coverage Δ
#smoketests 72.48% <0%> (-0.01%) ⬇️
#unittests 70.03% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
nipype/pipeline/engine/workflows.py 76.23% <0%> (-0.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3107a6d...d4c5ffb. Read the comment docs.

@@ -425,6 +425,9 @@ def write_graph(self, dotfilename='graph.dot', graph2use='hierarchical',
base_dir = os.getcwd()
base_dir = make_output_dir(base_dir)
if graph2use in ['hierarchical', 'colored']:
if self.name[:1].isdigit(): # these graphs break if int
raise ValueError('{} graph failed, workflow name cannot begin '
'with a number'.format(graph2use))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if workflow name cannot begin with a number, shouldn't this be a check when a workflow/node is created/cloned? why is a workflow name check in graph generation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@satra the error only occurs when the workflow graph is generated if graph2use is specified as either hierarchical/colored - the other options generate graphs just fine. I'm fine with moving the check to the Workflow initialization if we want to go in that direction - was trying to affect the smallest range of legacy workflows

@satra satra merged commit 7306d54 into nipy:master Apr 12, 2017
@mgxd mgxd deleted the fix/wfgraph branch April 12, 2017 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants