-
Notifications
You must be signed in to change notification settings - Fork 572
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
Make travis run all tests (not SKIPPED tests) #356
Conversation
I have the feeling that this might have somthign to do with 1db4edc which changed the command but not the test? |
Looks like no latex is installed on travis?
|
And now it fails: https://travis-ci.org/jupyter/nbconvert/jobs/151315097#L485 |
This now runs all tests in travis (no more SKIPPED tests -> the "purpose" of this PR is therefore accomplished), but that exposed quite a lot of failures: https://travis-ci.org/jupyter/nbconvert/jobs/151317439 |
And now we are in trouble:
But according to this SO answer this file isn't in the version of |
Travis does have a beta option to use Trusty (14.04) for builds. I don't know what the queue time is like for those. |
Looks like the queue is not too bad, at least at the moment - those builds had started within a couple of minutes of your commit. |
The builds seems to run for a similar amount of time to those on master, which is a good sign if we can get them working. |
This is interesting: the test actually sets
|
I cherrypicked e1f1e11 into this PR, lets see what happens... |
Now it runs into a kernel startup timeout on py3.3: https://travis-ci.org/jupyter/nbconvert/jobs/151344622 ??? |
That may be a random failure, I've restarted it to see if it passes. |
seems to be, now it's green :-) |
seems like my weird choices have uncovered yet another bug 😉 great work fixing it! |
it’s not breaking anything, but it disables a sandbox: malicious LaTeX code could do bad things with it. so the question is if we trust all LaTeX code we encounter, or if adding |
My vote (still :-)) goes to removing the minted package: in IRkernel there are two ways to highlight source code of a displayed function (NOT the code in a cell, but things like |
Bad things as in arbitrary code execution? I would say that's not an expected result of running nbconvert to convert a document. I'd be OK with doing that on trusted notebooks (reusing the trust database we already use for opening notebooks in the browser). But then what do we do with untrusted notebooks? |
maybe catch the error in the LaTeX output and give a user friendly warning that this specific notebook can only be converted to PDF if it’s trusted? |
Maybe, but I'm wary of anything that fails on untrusted notebooks, because it's very easy to end up with users going "whatever, I'll trust this so I can do what I want". That's the 'enable macros' curse - you can't rely on users reading a security warning if it's blocking the path to what they want to do. If |
yeah, minted calls into pygments and therefore needs to access external commands. without it, TeX can only create files, not execute things. (which can also be used to cause mayhem of course) we just have to think about some things before deciding this: do we already have output formats that can have arbitrary code execution on creation? if not i’d agree to removing the minted line again, switch the default of |
I agree that arbitrary external code execution on format conversion sounds like something we should avoid... @takluyver's comment about the "curse of macros" is on-point. If users pass Given my admittedly limited understanding of the issue, I lean towards @JanSchulz's suggestion of dropping minted altogether. |
And I don't think any of our other export formats allow arbitrary code execution from the notebook (though we haven't closely audited that). |
Or we could do what we already do in kernelspecs, and allow metadata to specify names for a codemirror mode and a pygments lexer to override a more general specifier. |
why not just serve it as |
That's also possible, but it requires them to handle outputs with a much larger range of mimetypes. It's also a breaking change: frontends and tools not aware of the change processing output/notebooks from things that are will show no output (or they'll need a second copy included as My idea also allows a frontend to distinguish between e.g. an HTML output ( |
that was the idea. we can then remove that one later
good point. still, it isn’t text/plain, so serving it as such is a lie… maybe there’s something better still |
I think sending as Also, I don't think it's a lie to call source code |
i’m convinced. i think that that metadata describes the “most specific programming/markup language mimetype”, and we should base its name on that. maybe |
I don't have a strong opinion on the name; |
#363 is the issue for that feature. |
can @JanSchulz just remove it in this PR? then we’ll also see if this runs without i sent a repr PR anyway: IRkernel/repr#77 |
I'm curious, why don't we enable a flag when invoking nbconvert that allows it to pass |
The command used to invoke Latex is already configurable. I'd be wary of:
|
rebased on top of master: IMO this is ready to merge |
@@ -1,3 +1,6 @@ | |||
sudo: required |
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.
Am I right that sudo: required
is necessary in order to use trusty? If so, a comment to that effect would be good; hopefully that will change at some point in the future, and then we can stop requiring sudo again.
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.
done
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.
Thanks. Then I think this is fine, but I'm tired, so I'll leave it for others to have a look at in case I'm overlooking something.
This is a test to see if thats the problem which lead the pdf test not beeing run #350