From 113a99a04984d5f150d3d0fc9df67f84214bf56b Mon Sep 17 00:00:00 2001 From: Nabrissa Khan Date: Mon, 14 Nov 2022 15:27:14 -0700 Subject: [PATCH 01/11] usercontrolandfreedom --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 635be72a7e..d1e6774f08 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Jupyter Notebook +# Jupyter Notebookwhoops ![Github Actions Status](https://github.com/jupyter/notebook/workflows/Build/badge.svg) [![Documentation Status](https://readthedocs.org/projects/jupyter-notebook/badge/?version=latest)](https://jupyter-notebook.readthedocs.io/en/latest/?badge=latest) From 61be667aad30056d1f058c3df9818de6ab06e370 Mon Sep 17 00:00:00 2001 From: Nabrissa Khan Date: Mon, 14 Nov 2022 15:28:41 -0700 Subject: [PATCH 02/11] reverse change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d1e6774f08..635be72a7e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Jupyter Notebookwhoops +# Jupyter Notebook ![Github Actions Status](https://github.com/jupyter/notebook/workflows/Build/badge.svg) [![Documentation Status](https://readthedocs.org/projects/jupyter-notebook/badge/?version=latest)](https://jupyter-notebook.readthedocs.io/en/latest/?badge=latest) From d17b95f48d7a9fa452f4a29569bd3848da18f098 Mon Sep 17 00:00:00 2001 From: Nabrissa Khan Date: Mon, 14 Nov 2022 17:56:33 -0700 Subject: [PATCH 03/11] adding configuration documentation. --- CONFIGURATION.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 CONFIGURATION.md diff --git a/CONFIGURATION.md b/CONFIGURATION.md new file mode 100644 index 0000000000..cfcdf4851f --- /dev/null +++ b/CONFIGURATION.md @@ -0,0 +1,56 @@ +# Configuration Overview + +Beyond the default configuration settings, you can configure a rich array of options to suit your workflow. Here are areas that are commonly configured when using Jupyter Notebook: + +Jupyter’s common configuration system + +Notebook server + +Notebook front-end client + +Notebook extensions + +Let’s look at highlights of each area. + +Jupyter’s Common Configuration system +Jupyter applications, from the Notebook to JupyterHub to nbgrader, share a common configuration system. The process for creating a configuration file and editing settings is similar for all the Jupyter applications. + +# Jupyter’s Common Configuration Approach + +Common Directories and File Locations + +Language kernels + +traitlets provide a low-level architecture for configuration. + +# Notebook server + +The Notebook server runs the language kernel and communicates with the front-end Notebook client (i.e. the familiar notebook interface). + +Configuring the Notebook server + +To create a jupyter_notebook_config.py file in the .jupyter directory, with all the defaults commented out, use the following command: + + $ jupyter notebook --generate-config + +:ref:`Command line arguments for configuration ` settings are +documented in the configuration file and the user documentation. +Running a Notebook server + +Related: Configuring a language kernel to run in the Notebook server enables your server to run other languages, like R or Julia. + +# Notebook front-end client + +Configuring the notebook frontend +How front end configuration works +Example - Changing the notebook’s default indentation +Example - Restoring the notebook’s default indentation +Persisting configuration settings + +# Notebook extensions +Distributing Jupyter Extensions as Python Packages + +Extending the Notebook + +Security in Jupyter notebooks: Since security policies vary from organization to organization, we encourage you to consult with your security team on settings that would be best for your use cases. Our documentation offers some responsible security practices, and we recommend becoming familiar with the practices. + From ec83e828aba875fb8615024a55234579f4f093e6 Mon Sep 17 00:00:00 2001 From: Nabrissa Khan Date: Fri, 25 Nov 2022 21:47:24 -0700 Subject: [PATCH 04/11] Updated Contributor Documentation for rst file --- docs/source/contributor.rst | 148 ++++++++++++++++++++++++++++++++++-- 1 file changed, 140 insertions(+), 8 deletions(-) diff --git a/docs/source/contributor.rst b/docs/source/contributor.rst index cba95d0246..26dc1fa68f 100644 --- a/docs/source/contributor.rst +++ b/docs/source/contributor.rst @@ -1,10 +1,142 @@ -=========== -Contributor -=========== +==========# Contributing to Jupyter Notebook -.. toctree:: - :maxdepth: 1 - :caption: Contributor Documentation +Thanks for contributing to Jupyter Notebook! - contributing - development_faq +Make sure to follow [Project Jupyter's Code of Conduct](https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md) +for a friendly and welcoming collaborative environment. + +## Setting up a development environment + +Note: You will need NodeJS to build the extension package. + +The `jlpm` command is JupyterLab's pinned version of [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use +`yarn` or `npm` in lieu of `jlpm` below. + +**Note**: we recomment using `mamba` to speed the creating of the environment. + +```bash +# create a new environment +mamba create -n notebook -c conda-forge python nodejs -y + +# activate the environment +mamba activate notebook + +# Install package in development mode +pip install -e ".[dev,test]" + +# Link the notebook extension and @jupyter-notebook schemas +jlpm develop + +# Enable the server extension +jupyter server extension enable notebook +``` + +`notebook` follows a monorepo structure. To build all the packages at once: + +```bash +jlpm build +``` + +There is also a `watch` script to watch for changes and rebuild the app automatically: + +```bash +jlpm watch +``` + +To make sure the `notebook` server extension is installed: + +```bash +$ jupyter server extension list +Config dir: /home/username/.jupyter + +Config dir: /home/username/miniforge3/envs/notebook/etc/jupyter + jupyterlab enabled + - Validating jupyterlab... + jupyterlab 3.0.0 OK + notebook enabled + - Validating notebook... + notebook 7.0.0a0 OK + +Config dir: /usr/local/etc/jupyter +``` + +Then start Jupyter Notebook with: + +```bash +jupyter notebook +``` + +## Running Tests + +To run the tests: + +```bash +jlpm run build:test +jlpm run test +``` + +There are also end to end tests to cover higher level user interactions, located in the `ui-tests` folder. To run these tests: + +```bash +cd ui-tests +# start a new Jupyter server in a terminal +jlpm start + +# in a new terminal, run the tests +jlpm test +``` + +The `test` script calls the Playwright test runner. You can pass additional arguments to `playwright` by appending parameters to the command. For example to run the test in headed mode, `jlpm test --headed`. + +Checkout the [Playwright Command Line Reference](https://playwright.dev/docs/test-cli/) for more information about the available command line options. + +Running the end to end tests in headful mode will trigger something like the following: + +![playwight-headed-demo](https://user-images.githubusercontent.com/591645/141274633-ca9f9c2f-eef6-430e-9228-a35827f8133d.gif) + +## Code Styling + +All non-python source code is formatted using [prettier](https://prettier.io) and python source code is formatted using [black](https://github.com/psf/black)s +When code is modified and committed, all staged files will be +automatically formatted using pre-commit git hooks (with help from +[pre-commit](https://github.com/pre-commit/pre-commit). The benefit of +using a code formatters like `prettier` and `black` is that it removes the topic of +code style from the conversation when reviewing pull requests, thereby +speeding up the review process. + +As long as your code is valid, +the pre-commit hook should take care of how it should look. +`pre-commit` and its associated hooks will automatically be installed when +you run `pip install -e ".[dev,test]"` + +To install `pre-commit` manually, run the following: + +```shell +pip install pre-commit +pre-commit install +``` + +You can invoke the pre-commit hook by hand at any time with: + +```shell +pre-commit run +``` + +which should run any autoformatting on your code +and tell you about any errors it couldn't fix automatically. +You may also install [black integration](https://github.com/psf/black#editor-integration) +into your text editor to format code automatically. + +If you have already committed files before setting up the pre-commit +hook with `pre-commit install`, you can fix everything up using +`pre-commit run --all-files`. You need to make the fixing commit +yourself after that. + +You may also use the prettier npm script (e.g. `npm run prettier` or +`yarn prettier` or `jlpm prettier`) to format the entire code base. +We recommend installing a prettier extension for your code editor and +configuring it to format your code with a keyboard shortcut or +automatically on save. + +Some of the hooks only run on CI by default, but you can invoke them by +running with the `--hook-stage manual` argument. From cfe15ccf741678bdc4d5fab32dfaf89c74e4402a Mon Sep 17 00:00:00 2001 From: Nabrissa Khan Date: Fri, 25 Nov 2022 21:49:07 -0700 Subject: [PATCH 05/11] Edited and made changes to contributor.rst --- docs/source/contributor.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/contributor.rst b/docs/source/contributor.rst index 26dc1fa68f..ee4c384ceb 100644 --- a/docs/source/contributor.rst +++ b/docs/source/contributor.rst @@ -1,3 +1,8 @@ +.. _contributing: + +Contributing to Jupyter Notebook +====================== + ==========# Contributing to Jupyter Notebook Thanks for contributing to Jupyter Notebook! From 00440069fdc327e3bc6993677c9816ce7a72e70a Mon Sep 17 00:00:00 2001 From: Nabrissa Khan Date: Fri, 25 Nov 2022 21:50:29 -0700 Subject: [PATCH 06/11] Made edits to contributor.rst --- docs/source/contributor.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/source/contributor.rst b/docs/source/contributor.rst index ee4c384ceb..76dca05e4b 100644 --- a/docs/source/contributor.rst +++ b/docs/source/contributor.rst @@ -3,8 +3,6 @@ Contributing to Jupyter Notebook ====================== -==========# Contributing to Jupyter Notebook - Thanks for contributing to Jupyter Notebook! Make sure to follow [Project Jupyter's Code of Conduct](https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md) From f21712bb5377de470e817565f726ae3fc8a0e25f Mon Sep 17 00:00:00 2001 From: Nabrissa Khan Date: Fri, 25 Nov 2022 21:54:25 -0700 Subject: [PATCH 07/11] Edits and corrections to contributor.rst --- docs/source/contributor.rst | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/docs/source/contributor.rst b/docs/source/contributor.rst index 76dca05e4b..5eb0846cff 100644 --- a/docs/source/contributor.rst +++ b/docs/source/contributor.rst @@ -8,7 +8,8 @@ Thanks for contributing to Jupyter Notebook! Make sure to follow [Project Jupyter's Code of Conduct](https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md) for a friendly and welcoming collaborative environment. -## Setting up a development environment +Setting up a development environment +------------------------------------- Note: You will need NodeJS to build the extension package. @@ -21,18 +22,26 @@ The `jlpm` command is JupyterLab's pinned version of [yarn](https://yarnpkg.com/ # create a new environment mamba create -n notebook -c conda-forge python nodejs -y -# activate the environment -mamba activate notebook +Activate the environment +------------------------------------- -# Install package in development mode -pip install -e ".[dev,test]" + mamba activate notebook -# Link the notebook extension and @jupyter-notebook schemas -jlpm develop +Install package in development mode +------------------------------------- -# Enable the server extension -jupyter server extension enable notebook -``` + pip install -e ".[dev,test]" + +Link the notebook extension and @jupyter-notebook schemas +------------------------------------- + + jlpm develop + +Enable the server extension +------------------------------------- + + jupyter server extension enable notebook + ``` `notebook` follows a monorepo structure. To build all the packages at once: @@ -97,7 +106,8 @@ Running the end to end tests in headful mode will trigger something like the fol ![playwight-headed-demo](https://user-images.githubusercontent.com/591645/141274633-ca9f9c2f-eef6-430e-9228-a35827f8133d.gif) -## Code Styling +Code Styling +------------------------------------- All non-python source code is formatted using [prettier](https://prettier.io) and python source code is formatted using [black](https://github.com/psf/black)s When code is modified and committed, all staged files will be From 235be48056d19d8eefe28695ccdd3c776e7e21f2 Mon Sep 17 00:00:00 2001 From: Nabrissa Khan Date: Fri, 25 Nov 2022 21:55:23 -0700 Subject: [PATCH 08/11] Updates to the contributor.rst file --- docs/source/contributor.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/source/contributor.rst b/docs/source/contributor.rst index 5eb0846cff..85bdb9c0f4 100644 --- a/docs/source/contributor.rst +++ b/docs/source/contributor.rst @@ -78,7 +78,8 @@ Then start Jupyter Notebook with: jupyter notebook ``` -## Running Tests +Running Tests +------------------------------------- To run the tests: @@ -94,7 +95,9 @@ cd ui-tests # start a new Jupyter server in a terminal jlpm start -# in a new terminal, run the tests +In a new terminal, run the tests +------------------------------------- + jlpm test ``` From e4fac72a77627d3972921328904e91d238f4d68e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 26 Nov 2022 05:02:28 +0000 Subject: [PATCH 09/11] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CONFIGURATION.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CONFIGURATION.md b/CONFIGURATION.md index cfcdf4851f..2506f9ef95 100644 --- a/CONFIGURATION.md +++ b/CONFIGURATION.md @@ -23,7 +23,7 @@ Language kernels traitlets provide a low-level architecture for configuration. -# Notebook server +# Notebook server The Notebook server runs the language kernel and communicates with the front-end Notebook client (i.e. the familiar notebook interface). @@ -31,7 +31,9 @@ Configuring the Notebook server To create a jupyter_notebook_config.py file in the .jupyter directory, with all the defaults commented out, use the following command: - $ jupyter notebook --generate-config +``` +$ jupyter notebook --generate-config +``` :ref:`Command line arguments for configuration ` settings are documented in the configuration file and the user documentation. @@ -48,9 +50,9 @@ Example - Restoring the notebook’s default indentation Persisting configuration settings # Notebook extensions + Distributing Jupyter Extensions as Python Packages Extending the Notebook Security in Jupyter notebooks: Since security policies vary from organization to organization, we encourage you to consult with your security team on settings that would be best for your use cases. Our documentation offers some responsible security practices, and we recommend becoming familiar with the practices. - From 928bd621d0399e908ff1748d98313f58605aeef6 Mon Sep 17 00:00:00 2001 From: Nabrissa Date: Thu, 9 Mar 2023 19:16:59 -0700 Subject: [PATCH 10/11] Edit test --- .idea/inspectionProfiles/Project_Default.xml | 13 +++++ .../inspectionProfiles/profiles_settings.xml | 6 +++ .idea/modules.xml | 8 +++ .idea/notebook.iml | 8 +++ .idea/vcs.xml | 6 +++ .idea/workspace.xml | 49 +++++++++++++++++++ 6 files changed, 90 insertions(+) create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/notebook.iml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000000..17b127335d --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000000..105ce2da2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..ece60ae084 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/notebook.iml b/.idea/notebook.iml new file mode 100644 index 0000000000..d0876a78d0 --- /dev/null +++ b/.idea/notebook.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..94a25f7f4c --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000..875868b5c7 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + 1676832322745 + + + + + + + \ No newline at end of file From 0bfc84d513aefc48b0d6767fe81b048cbe22ef92 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 10 Mar 2023 02:17:15 +0000 Subject: [PATCH 11/11] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .idea/inspectionProfiles/Project_Default.xml | 2 +- .idea/inspectionProfiles/profiles_settings.xml | 2 +- .idea/modules.xml | 2 +- .idea/notebook.iml | 2 +- .idea/vcs.xml | 2 +- .idea/workspace.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 17b127335d..d7137f5c42 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -10,4 +10,4 @@ - \ No newline at end of file + diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml index 105ce2da2d..cc5462daf8 100644 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -3,4 +3,4 @@ - \ No newline at end of file +