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

Use conda on RTD #222

Merged
merged 6 commits into from
Feb 24, 2016
Merged

Use conda on RTD #222

merged 6 commits into from
Feb 24, 2016

Conversation

minrk
Copy link
Member

@minrk minrk commented Feb 1, 2016

continuation of #184

- ipykernel
- numpydoc
- pip:
- nbsphinx
Copy link
Member

Choose a reason for hiding this comment

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

Neat, I didn't know that this was possible.

@takluyver
Copy link
Member

Now, unfortunately, it has merge conflicts.

Have you tested this on RTD?

@minrk
Copy link
Member Author

minrk commented Feb 1, 2016

Waiting for RTD build now, I'll ping back when I'm sure it works.

@takluyver
Copy link
Member

Did the RTD build go OK?

@takluyver takluyver added the docs label Feb 3, 2016
@minrk
Copy link
Member Author

minrk commented Feb 4, 2016

Sorry, lost track. It did not, looking into why, now...

@minrk minrk added this to the 4.2 milestone Feb 4, 2016
@minrk
Copy link
Member Author

minrk commented Feb 4, 2016

Lame, pandoc seems to not be loading libgmp...

@minrk minrk changed the title Use conda on RTD [WIP] Use conda on RTD Feb 4, 2016
@minrk
Copy link
Member Author

minrk commented Feb 4, 2016

Marking back as WIP, since there always seems to be something going awry.

@minrk
Copy link
Member Author

minrk commented Feb 15, 2016

Part of the problem seems to be caused by nbsphinx executing notebooks, which we don't want to happen on RTD. Is there a way to prevent that?

@minrk minrk changed the title [WIP] Use conda on RTD Use conda on RTD Feb 15, 2016
@minrk
Copy link
Member Author

minrk commented Feb 15, 2016

It works!

I just had to run locally and commit the output, to avoid nbsphinx trying to run it on RTD.

One weird bit was that the pandoc conda package doesn't seem to work with python 3, due to a missing libgmp, but it works fine with Python 2. No idea why that would be, but it works now.

@takluyver
Copy link
Member

I thought nbsphinx removed the need for pandoc to do this?

@mgeier
Copy link
Contributor

mgeier commented Feb 16, 2016

The main point for using nbsphinx was to avoid committing the notebook results to the repo and instead running the notebooks on-the-fly on readthedocs.org.

AFAICT, pandoc is still used via the Jinja filter markdown2rst, right?

@takluyver
Copy link
Member

Ah, right, I didn't realise that nbsphinx was converting notebooks to rst as an intermediate stage - I thought it was loading them directly into Sphinx, similar to what recommonmark (presumably) does for Markdown.

@mgeier
Copy link
Contributor

mgeier commented Feb 16, 2016

OK, I tried this conda thing on readthedocs, but it didn't work and reported some errors.

Then I tried it with plain old requirements.txt (even removing most of them, but temporarily adding entrypoints) and it worked perfectly: http://nbconvert-conda-experiment.readthedocs.org/en/requirements.txt/
Including executing the notebooks and everything.

Isn't this good enough? Why do you even want to switch to conda?

BTW, the dependency on entrypoints in requirements.txt will only be necessary for building the latest version of the docs until the next release of nbconvert on PyPI. For now, it's needed because of your policy to not use setuptools.

@takluyver
Copy link
Member

That's the same error I got:

Error: ERROR: placeholder '/root/miniconda3/envs/_build_placehold_placehold_placehold_placehold_placehold_p' too short in: ncurses-5.9-5

I think it comes about when the environment path, which includes the project name on RTD and the git branch name, is too long. So it should be fine in the main repo. See readthedocs/readthedocs.org#1902 for more details.

If nbsphinx needs pandoc, how is it working with requirements.txt?

@mgeier
Copy link
Contributor

mgeier commented Feb 16, 2016

I thought it was loading them directly into Sphinx, similar to what recommonmark (presumably) does for Markdown.

Initially, I wanted to convert directly to the docutils format, but I didn't have enough experience then.
So I just used the tools that were already available in nbconvert and took the detour via reST.

At some point, I might consider re-implementing it without the detour, but currently that's not my plan.

If nbsphinx needs pandoc, how is it working with requirements.txt?

I guess because pandoc is already installed on readthedocs?
http://packages.readthedocs.org/en/latest/deb/

@takluyver
Copy link
Member

Huh, I guess it makes sense that pandoc is there, but I'm surprised we didn't spot it before.

@minrk
Copy link
Member Author

minrk commented Feb 24, 2016

Any reason not to merge, then?

@takluyver
Copy link
Member

Let's find out!

takluyver added a commit that referenced this pull request Feb 24, 2016
@takluyver takluyver merged commit 4e51fb1 into jupyter:master Feb 24, 2016
@mgeier
Copy link
Contributor

mgeier commented Feb 24, 2016

I was a little bit too late to object ...

I don't think that it's a good idea to add the manually created notebook outputs after removing the manually created *.rst files in #212.

The notebooks can be auto-executed on readthedocs perfectly fine without conda and without the need to commit any auto-generated bloat to the repository. As I've shown above.

@minrk
Copy link
Member Author

minrk commented Feb 24, 2016

The notebooks can be auto-executed on readthedocs perfectly fine

I added the outputs specifically because this wasn't working, and I don't think we want to be executing notebooks on RTD.

@minrk minrk deleted the environment.yml branch February 24, 2016 11:35
@mgeier
Copy link
Contributor

mgeier commented Feb 24, 2016

I added the outputs specifically because this wasn't working

Well it is working perfectly without conda, see #222 (comment).

I don't think we want to be executing notebooks on RTD

OK, fair enough, but might I ask why?

I think it would be great to execute the notebooks on RTD, because then it is assured that the documentation is up-to-date with the implementation.
When saving the notebook outputs, one has to make sure to re-generate and re-commit them (manually) whenever any output potentially changes. In addition to being potentially out-ouf-date, this gradually adds bloat to the repository.

But probably I'm missing some disadvantages of executing them on RTD?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants