-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Make sure notebook is pip installed when building docs #5743
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
The instructions on building the docs fail to mention that the notebook package itself needs to be installed. I was following the pip-based instructions so this fixes that case. I'm not familiar with using conda really so that case isn't fixed here. Partial jupyter#5741
@kevin-bates this fixes the pip-based instructions but doesn't resolve the issue for conda, which I don't have setup locally to test. However, looking at the diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 5d9a2ecd3..3ee8a49fa 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -176,6 +176,7 @@ containing all the necessary packages (except pandoc), use::
conda env create -f docs/environment.yml
conda activate notebook_docs # Linux and OS X
+ conda install -n notebook_docs .
activate notebook_docs # Windows
.. _conda environment: I'm not sure if |
Thanks Matt - I'm not very familiar with conda (and pip for that matter) myself. In looking into the equivalent of Since
At first, I could not reproduce the issue relative to conda but that was because I had If you don't mind adding this to the PR, that would be great. I'll probably ask for an additional reviewer relative to the conda/pip stuff to be sure no additional notes are necessary or anything like that.
Once activated, all actions are performed against the activated env, no need to name it explicitly. |
To build the docs you need the notebook package installed from the local project so this updates the contributor guide for the conda instructions. Related jupyter#5741
Done, thanks for investigating. |
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.
These changes look good and test out for me - thank you!
@blink1073 - I'm asking for your review with the hope you can sanity-check my comment to ensure we don't need additional text regarding the use of pip
within a conda env. Thank you.
With the new
This will install It's a bit cleaner than installing from the |
We might consider doing the same for Instead, we could suggest the following chunk: conda create -n notebook_docs pip
conda activate notebook_docs # Linux and OS X
activate notebook_docs # Windows
pip install .[docs] |
Cool, I didn't realize that existed. That would make the pip-based setup instructions for building docs simpler. One question, I noticed that doc-requirements.txt includes Let me know if you'd like me to change this PR to use https://github.com/jupyter/notebook/blob/master/.travis.yml#L35 |
Alternatively, we could go with the fix here and follow up with a larger PR to remove docs/environment.yml and docs/doc-requirements.txt. |
We'll need to add the Then, let's update the docs to use the We'll save removing the requirements files for a separate PR. |
With the `docs` install extra in setup.py we can simplify the setup for building the docs by avoiding the now redundant docs/doc-requirements.txt and docs/environment.yml. One change is needed in setup.py though which is to add the `sphinx-rtd-theme` package to the setup.py `docs` extra install package list which was in doc-requirements.txt and environment.yml but missing from setup.py.
Since the guide isn't using the environment.yml file anymore it doesn't make a lot of sense to link to a doc about building a conda environment from a yml file.
Thank you @Zsailer - I agree that's much cleaner and essentially alleviates the need for Steve's review, so I'm going to remove that request. Thanks for your help! |
Hi Matt - sorry about the delay here. Would you mind resolving the conflict in setup.py, then we'll get this merged? Thanks. |
Done, thanks for the heads up. |
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.
LGTM - thank you.
The instructions on building the docs fail to mention that
the notebook package itself needs to be installed.
This updates the instructions to pip install the local notebook
package include the
docs
dependencies using thedocs
extrainstall package list.
Closes #5741