Skip to content
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

Add group for doc test #1831

Closed
wants to merge 6 commits into from
Closed

Conversation

twfenwick
Copy link

Test .travis.yml changes

@jasongrout
Copy link
Member

@fenwickipedia - The rationale for having the js and doc groups under just python 3.6 is that we'd like to not have to build those for every python version we are testing against.

@jzf2101
Copy link
Contributor

jzf2101 commented Nov 20, 2017

FYI I don't think 2.7 works for documentation and also 3.3. doesn't work with travis

@jasongrout
Copy link
Member

Do you mean the docs don't build in python 2.7? And do you mean that travis no longer supports 3.3?

@jzf2101
Copy link
Contributor

jzf2101 commented Nov 20, 2017

Yes

@jzf2101
Copy link
Contributor

jzf2101 commented Nov 20, 2017

@jasongrout
Copy link
Member

Travis seems to be building these python 3.3 tests just fine. How about we simply add a 2.7 doc group, just like in https://github.com/jupyter-widgets/ipywidgets/blob/master/.travis.yml#L30-L31.

@jasongrout jasongrout added this to the 7.0.x milestone Nov 20, 2017
@jzf2101
Copy link
Contributor

jzf2101 commented Nov 20, 2017

That's odd I don't know why it's working for us and not for jupyter notebook

@jzf2101
Copy link
Contributor

jzf2101 commented Nov 20, 2017

@fenwickipedia i think you need to fix your gitprofile

@jasongrout
Copy link
Member

We need to test on 3.3, since ipywidgets 7 supports python 3.3. I think probably all you need to check is that docs build on 2.7, by adding just a single block like https://github.com/jupyter-widgets/ipywidgets/blob/master/.travis.yml#L30-L31.

@twfenwick
Copy link
Author

twfenwick commented Nov 21, 2017 via email

@twfenwick
Copy link
Author

@jasongrout I reverted changes and added 2.7 and it's failing now on the js builds for all versions:

error Command "test:unit:" not found. Did you mean "test:unit"?
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@twfenwick
Copy link
Author

@jasongrout I got your point about js doc builds and took them out of env: section, and added 3.3 back. (js build was failing previously because where I added js to env, I didn't add browser and other params). But builds are green now :D

@jasongrout
Copy link
Member

Thanks! This looks much simpler :). Why did we delete the include: line?

@jasongrout
Copy link
Member

Looking at it, it looks like deleting the include: line in the matrix: section was maybe unintentional. Can you put it back in and then I think this will be ready to merge?

.travis.yml Outdated
@@ -26,10 +26,11 @@ script:
- 'if [[ $GROUP == doc ]] ; then bash ./scripts/travis_script_doc.sh ; fi'
- 'if [[ $GROUP == js ]] ; then bash ./scripts/travis_script_js.sh ; fi'
matrix:
include:
Copy link
Member

Choose a reason for hiding this comment

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

Can you put this line back in? I think deleting it was unintentional.

@twfenwick
Copy link
Author

Typo, my bad! Pushed the fix.

@twfenwick
Copy link
Author

twfenwick commented Nov 21, 2017

failed on the doc build stage, maybe just needs to be kicked again.

@twfenwick
Copy link
Author

Just putting a link here for the issue #1830

@jasongrout
Copy link
Member

Looks great - thanks! I'll wait for the build to pass before merging.

@twfenwick
Copy link
Author

I'm seeing that 2.7 is built when the plan executes for docs, but in docs/source/conf.py we have:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#

which probably explains No such kernel named python3 error in the log

@jzf2101
Copy link
Contributor

jzf2101 commented Nov 21, 2017

@blink1073 says regarding bugs in build of the notebooks in 2.7:

I think jupyter nbconvert --ExecutePreprocessor.kernel_name=python2 --to notebook --execute mynotebook.ipynb should do it
https://nbconvert.readthedocs.io/en/latest/execute_api.html#execution-arguments-traitlets
you should be able to use * syntax to select multiple notebooks as well.
I'd suggest testing in a local python 2 conda environment rather than poking at Travis

@jasongrout
Copy link
Member

I'm seeing that 2.7 is built when the plan executes for docs, but in docs/source/conf.py we have:
which probably explains No such kernel named python3 error in the log

To elaborate on what @blink1073 is saying - the kernel issue indicates that the notebooks have a python 3 kernel specified, and it's not finding a python 3 kernel (hence the error).

To proceed, it sounds like the thing to do is to get the docs rendering on python 2 first (i.e., set up a conda environment with python 2, and try making the docs). Fixing those errors will resolve these issues.

I don't have a ton of experience with the nbsphinx and jupyter_sphinx plugins, which is what is being used to run the doc notebooks. It doesn't look like nbsphinx has a way to pass options on to nbconvert about what kernel to use (to use the option that @blink1073 pointed out above), so fixing this may involve either writing a something that manually converts the doc notebooks to use python 2 kernels, or extending nbsphinx to be able to pass options on to nbconvert (to run notebooks with a different kernel).

Or we can say that docs build on python 3 only...

@jasongrout
Copy link
Member

Or we can say that docs build on python 3 only...

P.S. I don't know of any complaints that our docs only build on python 3. To judge the impact of the effort above - are there situations where building docs on python 3 is a problem?

@jzf2101
Copy link
Contributor

jzf2101 commented Nov 22, 2017

jupyter/notebook#2808 has a good reference to building docs only having python 3 available.

@jasongrout
Copy link
Member

jupyter/notebook#2808 has a good reference to building docs only having python 3 available.

That brings us back to the status quo - the current repo only builds docs on python 3 anyway. So...no change?

This PR is exposing the fact that building ipywidgets docs only works on python 3 right now. That's really good to know (thanks!). The question is whether it is worth it to fix it to build docs on python 2.

@jzf2101
Copy link
Contributor

jzf2101 commented Nov 22, 2017

It appears as the issue in the notebook pr has to do with not being able to call python 3 when testing. It may be useful to figure out how to build the docs if you're a python 2 contributor?

@jasongrout jasongrout modified the milestones: Patch release, Reference Feb 16, 2018
@jasongrout
Copy link
Member

I'll close this for now. If any developers on python 2 would like to push this through, please comment and we can reopen this or pursue it in a different PR.

@jasongrout jasongrout closed this Mar 16, 2018
@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 8, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants