Repository navigation
[MRG+2] DOC build pdf when master or version branch - #7747
Conversation
c20f030 to
45c7be2
Compare
|
LGTM; at least worth trying! |
|
I'm using two github account to check the behaviour after PR. Let me get back at you after that's checked. |
| # Build and install scikit-learn in dev mode | ||
| python setup.py develop | ||
|
|
||
| if [[ "$CIRCLE_BRANCH" =~ ^master$|^[0-9]+\.[0-9]+\.X$ ]] |
There was a problem hiding this comment.
Any reason why the && -z "$CI_PULL_REQUEST" has disappeared from my latest comment here.
My understanding is that we should never build the pdf in pull requests because it takes too much time
My expectation is that CIRCLE_BRANCH is going to be master in a PR (because the PR is targeting master). I may be wrong about that.
There was a problem hiding this comment.
Actually thinking about it, I remember now that CircleCI builds in branches and not (as you kind of would expect from Travis) on the result of the merge of the PR into master, so CIRCLE_BRANCH may be the name of the branch in the fork.
Still it's better to make sure that we never build the pdf in a PR, for example some beginners create PRs from their master branch sometimes.
There was a problem hiding this comment.
Hm but it would allow us to build pdf on PR branches if we want to.
There was a problem hiding this comment.
Indeed, from what I understand, when you do a PR, the build is done on the branch once. In this first build, we'll have CIRCLE_BRANCH = "name_of_the_branch_on_your_fork" and CI_PULL_REQUEST="something"
Then I think, when you merge it to master, this generates another build which will be build from merged master with CI_PULL_REQUEST = nothing. That's what I'm trying to check right now but I keep having time out errors and error from Travis for some reasons I don't get...
There was a problem hiding this comment.
Hm but it would allow us to build pdf on PR branches if we want to.
I assume we wanted to mirror the behaviour of #7671, i.e. only build the pdf doc on pushes into master or into release branches and never inside a PR.
There was a problem hiding this comment.
yeah probably... depends on how long it takes.
There was a problem hiding this comment.
optipng certainly takes too long for doing it in branches.
|
What happened to optipng? But I'm happy to merge this one first. LGTM |
|
@amueller right now, I have a lot of timeout issues on my side when trying to build on circleCI so I'd rather do another PR later after I'm sure this PR is working well since I'm afraid optipng would take more time (that's what I understand from your previous discussion). |
|
ok fair. |
|
Have you tried to run What may happen is that you have a latex error and you end up hitting the usual latex interactive prompt in case of error asking you to type |
|
It looks like you don't have the raised (to 1 hour) timeout either. I would try to rebase your branch on master to see whether your problem just disappear ... |
|
Ok, I'll try that ASAP. Thanks for the help ! |
DOC build pdf when master or version branch
45c7be2 to
a8a880c
Compare
|
Alright it seems to work as expected after a merge (it uses make dist instead of make html when it's a merge on master but not on PR). But it still times out so I have to take care of that... |
2be1176 to
bda7e74
Compare
Do you have a log with the timeout somewhere that we could look at? Also it would be great to run make dist locally to have some idea of how long it takes. If everything else fails, there is a way to set up SSH access in a CircleCI so we could try that. |
|
I think I fixed it. I had two different errors. One were due to the mldata returning error 500. I didn't fix it because it works sometimes (and once it works, I think it caches the data so we're okay). But I'll open an issue on that since it is troublesome. The other issue is that sphinx needed more latex dependencies so I added them in the build.sh. I ran it on circleCI on my own account and it takes 1 hour and 10 minutes (compared with the 38 minutes for the |
|
Thanks! This is before including optipng, though? So the time is to vastly increase. |
|
Yes. it's without optipng. I think we should think a bit more carefully before including it since it might be taking a bit too long with optipng on to build on each push to master. Maybe we could do something like use a [make pdf] tag that would trigger a specific pdf build ? We should discuss that on a separate issue or PR I think. |
|
Since it takes 30 minutes more, I'd be in favour of making sure that we never build the pdf in PRs as I said in #7747 (comment). |
|
Other than that it's great that you got it working! |
|
LGTM. Once this is merged we should monitor the build of the merge into master to make sure the pdf doc is built and there is no error. |
|
I can monitor it on my own master first |
|
It works (and took 40 minutes only) |
|
I'm okay with merging this without optipng, but optipng does make a big We should always consider the solution that for the very occasional task of On 28 October 2016 at 23:49, waterponey [email protected] wrote:
|
|
Does a lot of people download the pdf documentation ? I agree with the manual build. There is already a feature that allows you to skip or force the build by adding a tag in the commit message so we might want to do that for the pdf build. |
|
No, but if we don't have it, people request it. :) On 29 October 2016 at 23:06, waterponey [email protected] wrote:
|
|
Which means, I suppose, that it's better there and big than absent! On 29 October 2016 at 23:22, Joel Nothman [email protected] wrote:
|
|
Thanks! Let's see how this goes... |
Reference Issue
Takeover of PR #7671 for issue #7543
What does this implement/fix? Explain your changes.
This modify the circleCI build to make it build pdf documentation when branch is master or a version number.