From a3444d49e466c1407548e3a3e958dc25aed91717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Cano=20Rodr=C3=ADguez?= Date: Mon, 8 May 2023 16:18:01 +0200 Subject: [PATCH] Separate dev dependencies in default project template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix gh-2519. Signed-off-by: Juan Luis Cano Rodríguez --- .../project/{{ cookiecutter.repo_name }}/README.md | 14 +++----------- .../dev-requirements.txt | 12 ++++++++++++ .../{{ cookiecutter.repo_name }}/requirements.txt | 12 ------------ 3 files changed, 15 insertions(+), 23 deletions(-) create mode 100644 kedro/templates/project/{{ cookiecutter.repo_name }}/dev-requirements.txt diff --git a/kedro/templates/project/{{ cookiecutter.repo_name }}/README.md b/kedro/templates/project/{{ cookiecutter.repo_name }}/README.md index 9ece71ad8e..1fdca0fdd2 100644 --- a/kedro/templates/project/{{ cookiecutter.repo_name }}/README.md +++ b/kedro/templates/project/{{ cookiecutter.repo_name }}/README.md @@ -60,16 +60,14 @@ After this, if you'd like to update your project requirements, please update `re ## How to work with Kedro and notebooks > Note: Using `kedro jupyter` or `kedro ipython` to run your notebook provides these variables in scope: `context`, `catalog`, and `startup_error`. -> -> Jupyter, JupyterLab, and IPython are already included in the project requirements by default, so once you have run `pip install -r requirements.txt` you will not need to take any extra steps before you use them. -### Jupyter -To use Jupyter notebooks in your Kedro project, you need to install Jupyter: +Jupyter, JupyterLab, and IPython are not included in the project requirements by default. To install them, run the following command: ``` -pip install jupyter +pip install -r dev-requirements.txt ``` +### Jupyter After installing Jupyter, you can start a local notebook server: ``` @@ -77,12 +75,6 @@ kedro jupyter notebook ``` ### JupyterLab -To use JupyterLab, you need to install it: - -``` -pip install jupyterlab -``` - You can also start JupyterLab: ``` diff --git a/kedro/templates/project/{{ cookiecutter.repo_name }}/dev-requirements.txt b/kedro/templates/project/{{ cookiecutter.repo_name }}/dev-requirements.txt new file mode 100644 index 0000000000..47a474ccf6 --- /dev/null +++ b/kedro/templates/project/{{ cookiecutter.repo_name }}/dev-requirements.txt @@ -0,0 +1,12 @@ +black~=22.0 +flake8>=3.7.9, <5.0 +ipython>=7.31.1, <8.0; python_version < '3.8' +ipython~=8.10; python_version >= '3.8' +isort~=5.0 +jupyter~=1.0 +jupyterlab_server>=2.11.1, <2.16.0 +jupyterlab~=3.0, <3.6.0 +nbstripout~=0.4 +pytest-cov~=3.0 +pytest-mock>=1.7.1, <2.0 +pytest~=7.2 diff --git a/kedro/templates/project/{{ cookiecutter.repo_name }}/requirements.txt b/kedro/templates/project/{{ cookiecutter.repo_name }}/requirements.txt index aa7ee32014..4a72e49b27 100644 --- a/kedro/templates/project/{{ cookiecutter.repo_name }}/requirements.txt +++ b/kedro/templates/project/{{ cookiecutter.repo_name }}/requirements.txt @@ -1,14 +1,2 @@ -black~=22.0 -flake8>=3.7.9, <5.0 -ipython>=7.31.1, <8.0; python_version < '3.8' -ipython~=8.10; python_version >= '3.8' -isort~=5.0 -jupyter~=1.0 -jupyterlab_server>=2.11.1, <2.16.0 -jupyterlab~=3.0, <3.6.0 kedro~={{ cookiecutter.kedro_version }} kedro-telemetry~=0.2.0 -nbstripout~=0.4 -pytest-cov~=3.0 -pytest-mock>=1.7.1, <2.0 -pytest~=7.2