-
Notifications
You must be signed in to change notification settings - Fork 532
No longer concatenating extensions #2268
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
Conversation
You'll need to merge |
@oesteban what's |
sorry @TheChymera, it is pretty standard to call
But yes, that should be adapted to whatever your remote was called (or maybe you get the same result via a different solution, which is also valid of course). EDIT - source: https://help.github.com/articles/syncing-a-fork/ |
@oesteban sorry, I though I already pulled the newest master before creating the branch (apparently I forgot), and I thought you were talking about some patch branch I am unaware of. Should be good now. |
@oesteban very strange, it still fails, and it also indicates that the previous commit was also failing: https://github.com/TheChymera/nipype/commits/png |
Well, the previous commit failed on Travis. And actually, only one build of the matrix failed for a temporary error of the apt system. This error seems related to the changes in this PR. If you check the log of the failing build, you'll see that failures pop up when buiding documentation with:
The documentation writes graphs for the workflows, so I guess that is what is now broken. |
Codecov Report
@@ Coverage Diff @@
## master #2268 +/- ##
=========================================
Coverage ? 52.15%
=========================================
Files ? 122
Lines ? 24380
Branches ? 0
=========================================
Hits ? 12715
Misses ? 11665
Partials ? 0
Continue to review full report at Codecov.
|
@oesteban ok, I figured out and fixed the initial issue. Any idea what on earth is going on here? this certainly cannot decrease coverage by 20%. Also, the travis build is failing due to what appears to be a network error:
Can you please restart it? As for CircleCI - I cannot understand what's wrong with it... |
|
@TheChymera your PR changes "X.dot.png" to "X.dot", so you'll need to change
since it is still looking for the old concatenated extension |
sorry for taking so long :-/ The build is failing during Conda install, again, I think this is unrelated to my PR:
|
@TheChymera - i've restarted travis, but couldn't restart circle since it looks like it 's run under your name. Are you sure you can't do it from you account? |
@djarecka It seems travis is still failing due to some conda issues :( Regarding circleCI, it says I need write permissions to trigger builds. |
@TheChymera - I've retried the 2 travis runs and I can see that someone started circleCI. Were you logged in when you were having problems with rebuilding? I really couldn't triggered it, and I can rebuild the ones run under nipype |
I can trigger it now, yes, and I already triggered it once before |
ok, so circleCI still fails, but I am certain this has nothing to do with my PR:
Can I merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of stylistic comments.
The failing test in Circle seems related to a missing NORMALIZE_WHITESPACE
directive. Why would this fail here but not in master?
nipype/pipeline/engine/utils.py
Outdated
@@ -1055,7 +1055,8 @@ def export_graph(graph_in, base_dir=None, show=False, use_execgraph=False, | |||
def format_dot(dotfilename, format='png'): | |||
"""Dump a directed graph (Linux only; install via `brew` on OSX)""" | |||
if format != 'dot': | |||
cmd = 'dot -T%s -O \'%s\'' % (format, dotfilename) | |||
formatted_dotfilename = os.path.splitext(dotfilename)[0]+'.'+format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces around + symbols see comment below that would remove this line.
tools/interfacedocgen.py
Outdated
@@ -228,7 +228,8 @@ def _write_graph_section(self, fname, title): | |||
|
|||
fhandle.close() | |||
os.remove(fname) | |||
os.remove(fname + ".png") | |||
bitmap_fname = os.path.splitext(dotfilename)[0]+'.png' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces around + symbol (even though formatting would be better):
bitmap_fname = '%s.png' % os.path.splitext(dotfilename)[0]
nipype/pipeline/engine/utils.py
Outdated
@@ -1055,7 +1055,8 @@ def export_graph(graph_in, base_dir=None, show=False, use_execgraph=False, | |||
def format_dot(dotfilename, format='png'): | |||
"""Dump a directed graph (Linux only; install via `brew` on OSX)""" | |||
if format != 'dot': | |||
cmd = 'dot -T%s -O \'%s\'' % (format, dotfilename) | |||
formatted_dotfilename = os.path.splitext(dotfilename)[0]+'.'+format | |||
cmd = 'dot -T{} -o"{}" "{}"'.format(format, formatted_dotfilename, dotfilename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not:
cmd = 'dot -T{0} -o"{1}.{0}" "{2}"'.format(format, os.path.splitext(dotfilename)[0], dotfilename)
and avoid the concatenation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add the indexes of the argument for format to use the first argument twice without doubling it explicitly. (ref. Chris' comment below)
@oesteban we could pull and find out? |
Can I finally merge this? It's a fairly minor change, and it's already taken forever, with the build failing due to some obviously unrelated issue. |
That would break master. I don't think it would be justified. I agree on that the failing test is probably not related to your changes. But it is telling us of something potentially wrong with nipype, and we should investigate that first. |
Why your tests still use Circle 1.0? We switched to 2.0 a while ago. Seems like your clone of the repo did not merge the new |
I've merged in master. If tests pass, are we good to merge? |
@@ -1316,7 +1316,8 @@ def export_graph(graph_in, | |||
def format_dot(dotfilename, format='png'): | |||
"""Dump a directed graph (Linux only; install via `brew` on OSX)""" | |||
if format != 'dot': | |||
cmd = 'dot -T%s -O \'%s\'' % (format, dotfilename) | |||
formatted_dotfilename = +'.'+format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Syntax error here.
git blew up in my face, new try: #2381 |
graph.png
andgraph.dot
side by side is a lot better thangraph.dot.png
andgraph.dot
- for both tab completion, and software which has trouble intelligently parsing extensions (e.g. LaTeX's\includegraphics
).