How to run forked version of notebook when testing contributions?

25 views
Skip to first unread message

Adam Rule

unread,
Apr 19, 2017, 2:56:55 PM4/19/17
to Project Jupyter
I'm attempting to Contribute to the Notebook and have followed the instructions for forking, branching, and making changes to the codebase.

However, when I run `jupyter notebook` in my terminal, it seems to still launch my previously installed version of the notebook software, not the modified version I've downloaded and am editing. How do I run this modified version so I can visually check that my changes are producing the behavior I expect?

sp...@draves.org

unread,
Apr 19, 2017, 3:31:33 PM4/19/17
to jup...@googlegroups.com
It depends on what codebase you are changing, but normally you have to install your changes into your working environment before they take effect.
The README from your clone should have instructions. Commonly it would be "pip install -e ."
If you can say more about what you have done (what did you clone, what files did you edit, etc) then maybe we can help more.


On Wed, Apr 19, 2017 at 2:56 PM, Adam Rule <acr...@gmail.com> wrote:
I'm attempting to Contribute to the Notebook and have followed the instructions for forking, branching, and making changes to the codebase.

However, when I run `jupyter notebook` in my terminal, it seems to still launch my previously installed version of the notebook software, not the modified version I've downloaded and am editing. How do I run this modified version so I can visually check that my changes are producing the behavior I expect?

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/ec9e5f23-d9e2-4238-a053-333d1c52469b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Thomas Kluyver

unread,
Apr 19, 2017, 4:38:12 PM4/19/17
to Project Jupyter
Hi Adam,

Do you have the necessary Javascript tools set up to rebuild Javascript and CSS if you're changing those pieces?
http://jupyter-notebook.readthedocs.io/en/latest/contributing.html

Changes to frontend stuff are also sometimes hidden by the browser cache. Usually pressing Ctrl-F5 a few times is enough to clear the cache, but if not, other tricks include trying with a different browser from normal, opening it in private/incognito mode, or starting the notebook server on a different port from the default 8888 (e.g. --port 8931).

Thomas

On 19 April 2017 at 19:56, Adam Rule <acr...@gmail.com> wrote:
I'm attempting to Contribute to the Notebook and have followed the instructions for forking, branching, and making changes to the codebase.

However, when I run `jupyter notebook` in my terminal, it seems to still launch my previously installed version of the notebook software, not the modified version I've downloaded and am editing. How do I run this modified version so I can visually check that my changes are producing the behavior I expect?

--

Adam Rule

unread,
Apr 19, 2017, 6:00:07 PM4/19/17
to Project Jupyter
I am attempting to change actions.js and notebook.js so that the three paste items in the Edit menubar call a paste action rather than the paste function directly (issue #2415). 

I have run "pip install -e ." in the folder containing the forked and cloned code and I do have node and npm installed have been running "npm run build" every time I may changes to the .js or .css codebase.

When I run "which jupyter notebook" in my terminal I get "/anaconda/bin/jupyter" when I would have expected it to point to where I have the cloned code (e.g. ~/Code/notebook). Do I have the wrong mental model of where the code is being executed from?

On Wednesday, April 19, 2017 at 1:38:12 PM UTC-7, takowl wrote:
Hi Adam,

Do you have the necessary Javascript tools set up to rebuild Javascript and CSS if you're changing those pieces?
http://jupyter-notebook.readthedocs.io/en/latest/contributing.html

Changes to frontend stuff are also sometimes hidden by the browser cache. Usually pressing Ctrl-F5 a few times is enough to clear the cache, but if not, other tricks include trying with a different browser from normal, opening it in private/incognito mode, or starting the notebook server on a different port from the default 8888 (e.g. --port 8931).

Thomas
On 19 April 2017 at 19:56, Adam Rule <acr...@gmail.com> wrote:
I'm attempting to Contribute to the Notebook and have followed the instructions for forking, branching, and making changes to the codebase.

However, when I run `jupyter notebook` in my terminal, it seems to still launch my previously installed version of the notebook software, not the modified version I've downloaded and am editing. How do I run this modified version so I can visually check that my changes are producing the behavior I expect?

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

Adam Rule

unread,
Apr 19, 2017, 7:38:55 PM4/19/17
to Project Jupyter
Could it be something with my branches? For example, I have a development branch I'm working on, but could "pip install -e ." be pulling from master?

Adam Rule

unread,
Apr 19, 2017, 7:49:45 PM4/19/17
to Project Jupyter
I just tried switching back to master, making changes, and rerunning 'pip install -e .' and 'npm run build' and my changes are still not showing up. I also uninstalled any version of jupyter notebook I had using "pip uninstall notebook" in case there was a conflict with the version I had already downloaded, and still no luck. Even tried "git clean -xfd" before 'pip install -e .' and 'npm run build' and my changes are still not showing up.

I have also tried changing some of the template HTML (i.e. notebook.html) for immediately visible changes to how menus are named, and no luck.

MinRK

unread,
Apr 20, 2017, 4:18:58 AM4/20/17
to Project Jupyter
You are doing the right things: `pip install -e .` once and `npm run build` to update js/css should be all you need.

If all of those changes aren't showing up, it leads me to think that perhaps a different installation of the notebook is actually in use. This can happen sometimes when mixing anaconda and pip. Try running `pip uninstall notebook` (repeatedly, until it says you don't have it anymore). Then try starting again with `pip install -e .`.

-Min



To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Adam Rule

unread,
Apr 20, 2017, 11:38:47 AM4/20/17
to Project Jupyter
That worked. For documentation's sake, I had to `pip uninstall notebook` and then `conda uninstall notebook` before I could install notebook from my forked and cloned notebook repository using `pip install -e .`. 
Reply all
Reply to author
Forward
0 new messages