From 47e77463d98f05250a58299cf7be625fd2e5f7c4 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 13 May 2022 17:43:12 +0200 Subject: [PATCH 01/21] add missing CONTRIBUTIN.rst file to make the ci doc job success --- CONTRIBUTING.rst | 197 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 CONTRIBUTING.rst diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 000000000..6f947cb58 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,197 @@ +Contributing to the Jupyter Notebook +==================================== + +If you're reading this section, you're probably interested in contributing to +Jupyter. Welcome and thanks for your interest in contributing! + +Please take a look at the Contributor documentation, familiarize yourself with +using the Jupyter Notebook, and introduce yourself on the mailing list and +share what area of the project you are interested in working on. + +General Guidelines +------------------ + +For general documentation about contributing to Jupyter projects, see the +`Project Jupyter Contributor Documentation`__. + +__ https://jupyter.readthedocs.io/en/latest/contributing/content-contributor.html + + +Setting Up a Development Environment +------------------------------------ + +Installing Node.js and npm +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Building the Notebook from its GitHub source code requires some tools to +create and minify JavaScript components and the CSS, +specifically Node.js and Node's package manager, ``npm``. +It should be node version ≥ 6.0. + +If you use ``conda``, you can get them with:: + + conda install -c conda-forge nodejs + +If you use `Homebrew `_ on Mac OS X:: + + brew install node + +Installation on Linux may vary, but be aware that the `nodejs` or `npm` packages +included in the system package repository may be too old to work properly. + +You can also use the installer from the `Node.js website `_. + + +Installing the Jupyter Notebook +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Once you have installed the dependencies mentioned above, use the following +steps:: + + pip install --upgrade setuptools pip + git clone https://github.com/jupyter/notebook + cd notebook + pip install -e . + +If you are using a system-wide Python installation and you only want to install the notebook for you, +you can add ``--user`` to the install commands. + +Once you have done this, you can launch the master branch of Jupyter notebook +from any directory in your system with:: + + jupyter notebook + +Verification +^^^^^^^^^^^^ + +While running the notebook, select one of your notebook files (the file will have the extension ``.ipynb``). +In the top tab you will click on "Help" and then click on "About". In the pop window you will see information about the version of Jupyter that you are running. You will see "The version of the notebook server is:". +If you are working in development mode, you will see that your version of Jupyter notebook will include the word "dev". If it does not include the word "dev", you are currently not working in development mode and should follow the steps below to uninstall and reinstall Jupyter. + +Troubleshooting the Installation +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you do not see that your Jupyter Notebook is not running on dev mode, it's possible that you are +running other instances of Jupyter Notebook. You can try the following steps: + +1. Uninstall all instances of the notebook package. These include any installations you made using + pip or conda. +2. Run ``python3 -m pip install -e .`` in the notebook repository to install the notebook from there. +3. Run ``npm run build`` to make sure the Javascript and CSS are updated and compiled. +4. Launch with ``python3 -m notebook --port 8989``, and check that the browser is pointing to ``localhost:8989`` + (rather than the default 8888). You don't necessarily have to launch with port 8989, as long as you use + a port that is neither the default nor in use, then it should be fine. +5. Verify the installation with the steps in the previous section. + + +Rebuilding JavaScript and CSS +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +There is a build step for the JavaScript and CSS in the notebook. +To make sure that you are working with up-to-date code, you will need to run +this command whenever there are changes to JavaScript or LESS sources:: + + npm run build + +**IMPORTANT:** Don't forget to run ``npm run build`` after switching branches. +When switching between branches of different versions (e.g. ``4.x`` and +``master``), run ``pip install -e .``. If you have tried the above and still +find that the notebook is not reflecting the current source code, try cleaning +the repo with ``git clean -xfd`` and reinstalling with ``pip install -e .``. + +Development Tip +""""""""""""""" + +When doing development, you can use this command to automatically rebuild +JavaScript and LESS sources as they are modified:: + + npm run build:watch + +Git Hooks +""""""""" + +If you want to automatically update dependencies and recompile JavaScript and +CSS after checking out a new commit, you can install post-checkout and +post-merge hooks which will do it for you:: + + git-hooks/install-hooks.sh + +See ``git-hooks/README.md`` for more details. + + +Running Tests +------------- + +Python Tests +^^^^^^^^^^^^ + +Install dependencies:: + + pip install -e '.[test]' + +To run the Python tests, use:: + + pytest + +If you want coverage statistics as well, you can run:: + + py.test --cov notebook -v --pyargs notebook + +JavaScript Tests +^^^^^^^^^^^^^^^^ + +To run the JavaScript tests, you will need to have PhantomJS and CasperJS +installed:: + + npm install -g casperjs phantomjs-prebuilt + +Then, to run the JavaScript tests:: + + python -m notebook.jstest [group] + +where ``[group]`` is an optional argument that is a path relative to +``notebook/tests/``. +For example, to run all tests in ``notebook/tests/notebook``:: + + python -m notebook.jstest notebook + +or to run just ``notebook/tests/notebook/deletecell.js``:: + + python -m notebook.jstest notebook/deletecell.js + + +Building the Documentation +-------------------------- + +To build the documentation you'll need `Sphinx `_, +`pandoc `_ and a few other packages. + +To install (and activate) a conda environment named ``notebook_docs`` +containing all the necessary packages (except pandoc), use:: + + conda create -n notebook_docs pip + conda activate notebook_docs # Linux and OS X + activate notebook_docs # Windows + pip install .[docs] + +If you want to install the necessary packages with ``pip``, use the following instead:: + + pip install .[docs] + +Once you have installed the required packages, you can build the docs with:: + + cd docs + make html + +After that, the generated HTML files will be available at +``build/html/index.html``. You may view the docs in your browser. + +You can automatically check if all hyperlinks are still valid:: + + make linkcheck + +Windows users can find ``make.bat`` in the ``docs`` folder. + +You should also have a look at the `Project Jupyter Documentation Guide`__. + +__ https://jupyter.readthedocs.io/en/latest/contributing/docs-contributions/index.html From 3460d024349c3e3c51128c2a71495b3c98506d83 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 13 May 2022 18:14:22 +0200 Subject: [PATCH 02/21] ci docs job to change folder to run pytest nbval --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0f0faba1e..20f4e96b5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -48,5 +48,5 @@ jobs: run: | EXIT_STATUS=0 make -C docs/ html || EXIT_STATUS=$? - pytest --nbval --current-env docs || EXIT_STATUS=$? + cd docs/source && pytest --nbval --current-env .. || EXIT_STATUS=$? exit $EXIT_STATUS From fe44f79452180ac74471ba6cde2d3955397548f8 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Tue, 17 May 2022 13:09:54 +0200 Subject: [PATCH 03/21] align contributing.rst to nbclassic --- CONTRIBUTING.rst | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 6f947cb58..9a03a16f4 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,11 +1,11 @@ -Contributing to the Jupyter Notebook +Contributing to the Jupyter NbClassic ==================================== If you're reading this section, you're probably interested in contributing to Jupyter. Welcome and thanks for your interest in contributing! Please take a look at the Contributor documentation, familiarize yourself with -using the Jupyter Notebook, and introduce yourself on the mailing list and +using the Jupyter NbClassic, and introduce yourself on the mailing list and share what area of the project you are interested in working on. General Guidelines @@ -23,7 +23,7 @@ Setting Up a Development Environment Installing Node.js and npm ^^^^^^^^^^^^^^^^^^^^^^^^^^ -Building the Notebook from its GitHub source code requires some tools to +Building the NbClassic from its GitHub source code requires some tools to create and minify JavaScript components and the CSS, specifically Node.js and Node's package manager, ``npm``. It should be node version ≥ 6.0. @@ -42,7 +42,7 @@ included in the system package repository may be too old to work properly. You can also use the installer from the `Node.js website `_. -Installing the Jupyter Notebook +Installing the Jupyter NbClassic ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Once you have installed the dependencies mentioned above, use the following @@ -71,8 +71,8 @@ If you are working in development mode, you will see that your version of Jupyte Troubleshooting the Installation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you do not see that your Jupyter Notebook is not running on dev mode, it's possible that you are -running other instances of Jupyter Notebook. You can try the following steps: +If you do not see that your Jupyter NbClassic is not running on dev mode, it's possible that you are +running other instances of Jupyter NbClassic. You can try the following steps: 1. Uninstall all instances of the notebook package. These include any installations you made using pip or conda. @@ -87,7 +87,7 @@ running other instances of Jupyter Notebook. You can try the following steps: Rebuilding JavaScript and CSS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -There is a build step for the JavaScript and CSS in the notebook. +There is a build step for the JavaScript and CSS in the nbclassic. To make sure that you are working with up-to-date code, you will need to run this command whenever there are changes to JavaScript or LESS sources:: @@ -147,17 +147,17 @@ installed:: Then, to run the JavaScript tests:: - python -m notebook.jstest [group] + python -m nbclassic.jstest [group] where ``[group]`` is an optional argument that is a path relative to ``notebook/tests/``. For example, to run all tests in ``notebook/tests/notebook``:: - python -m notebook.jstest notebook + python -m nbclassic.jstest notebook or to run just ``notebook/tests/notebook/deletecell.js``:: - python -m notebook.jstest notebook/deletecell.js + python -m nbclassic.jstest notebook/deletecell.js Building the Documentation @@ -166,12 +166,12 @@ Building the Documentation To build the documentation you'll need `Sphinx `_, `pandoc `_ and a few other packages. -To install (and activate) a conda environment named ``notebook_docs`` +To install (and activate) a conda environment named ``nbclassic_docs`` containing all the necessary packages (except pandoc), use:: - conda create -n notebook_docs pip - conda activate notebook_docs # Linux and OS X - activate notebook_docs # Windows + conda create -n nbclassic_docs pip + conda activate nbclassic_docs # Linux and OS X + activate nbclassic_docs # Windows pip install .[docs] If you want to install the necessary packages with ``pip``, use the following instead:: From 88225926baedc2de5ecae2aecff2ae7b6df27ae3 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Wed, 18 May 2022 17:19:14 +0200 Subject: [PATCH 04/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9a03a16f4..c0aa37b74 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -49,7 +49,7 @@ Once you have installed the dependencies mentioned above, use the following steps:: pip install --upgrade setuptools pip - git clone https://github.com/jupyter/notebook + git clone https://github.com/jupyter/nbclassic cd notebook pip install -e . From b18f42a0dcb87994555547aac23969cb17ed0f0d Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Wed, 18 May 2022 17:19:20 +0200 Subject: [PATCH 05/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index c0aa37b74..472874785 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -59,7 +59,7 @@ you can add ``--user`` to the install commands. Once you have done this, you can launch the master branch of Jupyter notebook from any directory in your system with:: - jupyter notebook + jupyter nbclassic Verification ^^^^^^^^^^^^ From 327ea9f09cf795bce1719467b3b20d696b4b6172 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Wed, 18 May 2022 17:19:25 +0200 Subject: [PATCH 06/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 472874785..cdb93f76c 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -135,7 +135,7 @@ To run the Python tests, use:: If you want coverage statistics as well, you can run:: - py.test --cov notebook -v --pyargs notebook + py.test --cov nbclassic -v --pyargs notebook JavaScript Tests ^^^^^^^^^^^^^^^^ From 314e4bd1664d242ffd09ef91689d93a641004580 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Wed, 18 May 2022 19:50:40 +0200 Subject: [PATCH 07/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index cdb93f76c..aefabe074 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -78,7 +78,7 @@ running other instances of Jupyter NbClassic. You can try the following steps: pip or conda. 2. Run ``python3 -m pip install -e .`` in the notebook repository to install the notebook from there. 3. Run ``npm run build`` to make sure the Javascript and CSS are updated and compiled. -4. Launch with ``python3 -m notebook --port 8989``, and check that the browser is pointing to ``localhost:8989`` +4. Launch with ``python3 -m nbclassic --port 8989``, and check that the browser is pointing to ``localhost:8989`` (rather than the default 8888). You don't necessarily have to launch with port 8989, as long as you use a port that is neither the default nor in use, then it should be fine. 5. Verify the installation with the steps in the previous section. From f77254e15d4630bdbbde2029c4571b008edf6c9b Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:19:29 +0200 Subject: [PATCH 08/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index aefabe074..cce22081d 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,5 +1,5 @@ Contributing to the Jupyter NbClassic -==================================== +===================================== If you're reading this section, you're probably interested in contributing to Jupyter. Welcome and thanks for your interest in contributing! From 2048d39f3ceb73f09c071fa9f2130dca24cb49fd Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:19:38 +0200 Subject: [PATCH 09/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index cce22081d..eb09ae4cc 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -50,7 +50,7 @@ steps:: pip install --upgrade setuptools pip git clone https://github.com/jupyter/nbclassic - cd notebook + cd nbclassic pip install -e . If you are using a system-wide Python installation and you only want to install the notebook for you, From 9908aa4197d4a657829e27f4642eca6606103d4d Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:19:44 +0200 Subject: [PATCH 10/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index eb09ae4cc..fe8b5e40f 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -53,7 +53,7 @@ steps:: cd nbclassic pip install -e . -If you are using a system-wide Python installation and you only want to install the notebook for you, +If you are using a system-wide Python installation and you only want to install NbClassic for you, you can add ``--user`` to the install commands. Once you have done this, you can launch the master branch of Jupyter notebook From 7d07ea63c19fe7cca9143b29f9387eee10094198 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:19:50 +0200 Subject: [PATCH 11/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index fe8b5e40f..754714133 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -56,7 +56,7 @@ steps:: If you are using a system-wide Python installation and you only want to install NbClassic for you, you can add ``--user`` to the install commands. -Once you have done this, you can launch the master branch of Jupyter notebook +Once you have done this, you can launch the main branch of Jupyter NbClassic from any directory in your system with:: jupyter nbclassic From e39e8a6faf575bcc235ed6f7ee15012bb2eaa22c Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:19:56 +0200 Subject: [PATCH 12/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 754714133..758ca8ddb 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -64,7 +64,7 @@ from any directory in your system with:: Verification ^^^^^^^^^^^^ -While running the notebook, select one of your notebook files (the file will have the extension ``.ipynb``). +While running NbClassic, select one of your notebook files (the file will have the extension ``.ipynb``). In the top tab you will click on "Help" and then click on "About". In the pop window you will see information about the version of Jupyter that you are running. You will see "The version of the notebook server is:". If you are working in development mode, you will see that your version of Jupyter notebook will include the word "dev". If it does not include the word "dev", you are currently not working in development mode and should follow the steps below to uninstall and reinstall Jupyter. From 878698b85318296d21b58eb7375005f1ab2deb66 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:20:29 +0200 Subject: [PATCH 13/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 758ca8ddb..25aaa5713 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -66,7 +66,7 @@ Verification While running NbClassic, select one of your notebook files (the file will have the extension ``.ipynb``). In the top tab you will click on "Help" and then click on "About". In the pop window you will see information about the version of Jupyter that you are running. You will see "The version of the notebook server is:". -If you are working in development mode, you will see that your version of Jupyter notebook will include the word "dev". If it does not include the word "dev", you are currently not working in development mode and should follow the steps below to uninstall and reinstall Jupyter. +If you are working in development mode, you will see that your version of Jupyter NbClassic will include the word "dev". If it does not include the word "dev", you are currently not working in development mode and should follow the steps below to uninstall and reinstall Jupyter. Troubleshooting the Installation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From a54a279f2425b35f218738f7546f3419a17b57a2 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:20:35 +0200 Subject: [PATCH 14/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 25aaa5713..95869666f 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -74,7 +74,7 @@ Troubleshooting the Installation If you do not see that your Jupyter NbClassic is not running on dev mode, it's possible that you are running other instances of Jupyter NbClassic. You can try the following steps: -1. Uninstall all instances of the notebook package. These include any installations you made using +1. Uninstall all instances of the NbClassic package. These include any installations you made using pip or conda. 2. Run ``python3 -m pip install -e .`` in the notebook repository to install the notebook from there. 3. Run ``npm run build`` to make sure the Javascript and CSS are updated and compiled. From 9e17c2f36d4fa95a55d6be7b73067523be3cd38f Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:20:40 +0200 Subject: [PATCH 15/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 95869666f..038583969 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -76,7 +76,7 @@ running other instances of Jupyter NbClassic. You can try the following steps: 1. Uninstall all instances of the NbClassic package. These include any installations you made using pip or conda. -2. Run ``python3 -m pip install -e .`` in the notebook repository to install the notebook from there. +2. Run ``python3 -m pip install -e .`` in the NbClassic repository to install NbClassic from there. 3. Run ``npm run build`` to make sure the Javascript and CSS are updated and compiled. 4. Launch with ``python3 -m nbclassic --port 8989``, and check that the browser is pointing to ``localhost:8989`` (rather than the default 8888). You don't necessarily have to launch with port 8989, as long as you use From 22c032582f892c955e926f6c8e5e384adb1837e2 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:20:46 +0200 Subject: [PATCH 16/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 038583969..ab7058a7a 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -96,7 +96,7 @@ this command whenever there are changes to JavaScript or LESS sources:: **IMPORTANT:** Don't forget to run ``npm run build`` after switching branches. When switching between branches of different versions (e.g. ``4.x`` and ``master``), run ``pip install -e .``. If you have tried the above and still -find that the notebook is not reflecting the current source code, try cleaning +find that NbClassic is not reflecting the current source code, try cleaning the repo with ``git clean -xfd`` and reinstalling with ``pip install -e .``. Development Tip From 012bd18a276f91f44e26562829c76e673294b6b1 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:20:57 +0200 Subject: [PATCH 17/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index ab7058a7a..58d7c2f57 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -150,7 +150,7 @@ Then, to run the JavaScript tests:: python -m nbclassic.jstest [group] where ``[group]`` is an optional argument that is a path relative to -``notebook/tests/``. +``nbclassic/tests/``. For example, to run all tests in ``notebook/tests/notebook``:: python -m nbclassic.jstest notebook From d29893ba57c2a8f40ce9d3e73c47e814b8ca34d8 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:21:05 +0200 Subject: [PATCH 18/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 58d7c2f57..1666c766e 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -151,7 +151,7 @@ Then, to run the JavaScript tests:: where ``[group]`` is an optional argument that is a path relative to ``nbclassic/tests/``. -For example, to run all tests in ``notebook/tests/notebook``:: +For example, to run all tests in ``nbclassic/tests/notebook``:: python -m nbclassic.jstest notebook From 1be1e67de554d171997085fd20b477ecefae4a8c Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:21:14 +0200 Subject: [PATCH 19/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 1666c766e..d773faeee 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -155,7 +155,7 @@ For example, to run all tests in ``nbclassic/tests/notebook``:: python -m nbclassic.jstest notebook -or to run just ``notebook/tests/notebook/deletecell.js``:: +or to run just ``nbclassic/tests/notebook/deletecell.js``:: python -m nbclassic.jstest notebook/deletecell.js From 7a7710b004eea0afb316cad3709121dc988d9cb5 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:21:27 +0200 Subject: [PATCH 20/21] Update CONTRIBUTING.rst Co-authored-by: Afshin Taylor Darian --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index d773faeee..9d9f693f8 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -95,7 +95,7 @@ this command whenever there are changes to JavaScript or LESS sources:: **IMPORTANT:** Don't forget to run ``npm run build`` after switching branches. When switching between branches of different versions (e.g. ``4.x`` and -``master``), run ``pip install -e .``. If you have tried the above and still +``main``), run ``pip install -e .``. If you have tried the above and still find that NbClassic is not reflecting the current source code, try cleaning the repo with ``git clean -xfd`` and reinstalling with ``pip install -e .``. From 4ee16e00e8f2a5246f32eb9d820c855da1bb4aa3 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Fri, 20 May 2022 10:24:42 +0200 Subject: [PATCH 21/21] update contributing.rst --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9d9f693f8..fa0390fbc 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -135,7 +135,7 @@ To run the Python tests, use:: If you want coverage statistics as well, you can run:: - py.test --cov nbclassic -v --pyargs notebook + py.test --cov nbclassic -v --pyargs nbclassic JavaScript Tests ^^^^^^^^^^^^^^^^