From f4a69ab235f02520f732e21c98f7be9d4f5e580b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 14 Jun 2023 18:37:26 +0200 Subject: [PATCH 01/15] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index fa7c9db..0b0c09e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -108,7 +108,7 @@ then pushd $final_path mkdir -p .venv - PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub notebook jupyterhub-ldapauthenticator pyzmq + PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub notebook jupyter_collaboration jupyterhub-ldapauthenticator pyzmq popd fi From 594c1d837012adbea62e2534a84a25599cd7767a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 14 Jun 2023 18:37:39 +0200 Subject: [PATCH 02/15] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index f9a19d9..6e97878 100644 --- a/scripts/install +++ b/scripts/install @@ -100,7 +100,7 @@ mkdir -p "$final_path" pushd $final_path mkdir -p .venv - PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub notebook jupyterhub-ldapauthenticator pyzmq jupyterlab-language-pack-fr-FR + PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub jupyter_collaboration notebook jupyterhub-ldapauthenticator pyzmq jupyterlab-language-pack-fr-FR popd #================================================= From 5aeb76eacf3a625942661fba78e176d90f3dd7f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 11:54:14 +0200 Subject: [PATCH 03/15] venv --- scripts/_common.sh | 2 +- scripts/install | 7 ++++--- scripts/upgrade | 10 ++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b067b0a..41ddd3c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="python3-dev python3-pip" +pkg_dependencies="python3-dev python3-pip python3-venv" nodejs_version="18" diff --git a/scripts/install b/scripts/install index 6e97878..a660ea3 100644 --- a/scripts/install +++ b/scripts/install @@ -99,8 +99,9 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path mkdir -p "$final_path" pushd $final_path - mkdir -p .venv - PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub jupyter_collaboration notebook jupyterhub-ldapauthenticator pyzmq jupyterlab-language-pack-fr-FR + python3 -m venv $final_path/venv + source $final_path/venv/bin/activate + ynh_exec_warn_less pip install jupyterlab==$jupyterlab_version jupyterhub jupyter_collaboration notebook jupyterhub-ldapauthenticator pyzmq jupyterlab-language-pack-fr-FR popd #================================================= @@ -116,7 +117,7 @@ ynh_add_config --template="../conf/jupyterhub_config.py" --destination="$final_p ynh_add_config --template="../conf/jupyter_notebook_config.py" --destination="$final_path/config/jupyter_notebook_config.py" chown -R root: $final_path/ -chown -R $admin: $final_path/.venv/ +chown -R $admin: $final_path/venv/ #================================================= # SETUP SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 0b0c09e..8c221c5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -94,7 +94,6 @@ ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs $ynh_npm install -g configurable-http-proxy -python3 -m pip install pipenv #================================================= # SPECIFIC UPGRADE @@ -106,9 +105,12 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Building app..." --weight=160 + ynh_secure_remove $final_path/.venv + pushd $final_path - mkdir -p .venv - PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub notebook jupyter_collaboration jupyterhub-ldapauthenticator pyzmq + python3 -m venv $final_path/venv + source $final_path/venv/bin/activate + ynh_exec_warn_less pip install jupyterlab==$jupyterlab_version jupyterhub notebook jupyter_collaboration jupyterhub-ldapauthenticator pyzmq popd fi @@ -126,7 +128,7 @@ ynh_add_config --template="../conf/jupyterhub_config.py" --destination="$final_p ynh_add_config --template="../conf/jupyter_notebook_config.py" --destination="$final_path/config/jupyter_notebook_config.py" chown -R root: $final_path/ -chown -R $admin: $final_path/.venv/ +chown -R $admin: $final_path/venv/ #================================================= # SETUP SYSTEMD From aa7f2cfa3fd6eb433bd612374f84a6278424c926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 12:04:04 +0200 Subject: [PATCH 04/15] Update systemd.service --- conf/systemd.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index a6c56ff..e6fbc31 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,8 +8,8 @@ User=root WorkingDirectory=__FINALPATH__/ Environment="LC_ALL=C.UTF-8" Environment="LANG=C.UTF-8" -Environment="__YNH_NODE_LOAD_PATH__:__FINALPATH__/.venv/bin" -ExecStart=__FINALPATH__/.venv/bin/jupyterhub -f __FINALPATH__/config/jupyterhub_config.py --upgrade-db +Environment="__YNH_NODE_LOAD_PATH__:__FINALPATH__/venv/bin" +ExecStart=__FINALPATH__/venv/bin/jupyterhub -f __FINALPATH__/config/jupyterhub_config.py --upgrade-db Restart=always RestartSec=10 From 08486bd4a8bd2c44ce5cbb5849f00235d0a53558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 12:10:54 +0200 Subject: [PATCH 05/15] Fix --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index a660ea3..8f9778c 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,7 @@ mkdir -p "$final_path" pushd $final_path python3 -m venv $final_path/venv source $final_path/venv/bin/activate - ynh_exec_warn_less pip install jupyterlab==$jupyterlab_version jupyterhub jupyter_collaboration notebook jupyterhub-ldapauthenticator pyzmq jupyterlab-language-pack-fr-FR + ynh_exec_warn_less pip install npm@latest jupyterlab==$jupyterlab_version jupyterhub jupyter_collaboration notebook jupyterhub-ldapauthenticator pyzmq jupyterlab-language-pack-fr-FR popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8c221c5..d6991b5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -110,7 +110,7 @@ then pushd $final_path python3 -m venv $final_path/venv source $final_path/venv/bin/activate - ynh_exec_warn_less pip install jupyterlab==$jupyterlab_version jupyterhub notebook jupyter_collaboration jupyterhub-ldapauthenticator pyzmq + ynh_exec_warn_less pip install npm@latest jupyterlab==$jupyterlab_version jupyterhub notebook jupyter_collaboration jupyterhub-ldapauthenticator pyzmq popd fi From 61ce9baf149b871cbb524be3435ba72ed7c31e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 12:25:36 +0200 Subject: [PATCH 06/15] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 8f9778c..a660ea3 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,7 @@ mkdir -p "$final_path" pushd $final_path python3 -m venv $final_path/venv source $final_path/venv/bin/activate - ynh_exec_warn_less pip install npm@latest jupyterlab==$jupyterlab_version jupyterhub jupyter_collaboration notebook jupyterhub-ldapauthenticator pyzmq jupyterlab-language-pack-fr-FR + ynh_exec_warn_less pip install jupyterlab==$jupyterlab_version jupyterhub jupyter_collaboration notebook jupyterhub-ldapauthenticator pyzmq jupyterlab-language-pack-fr-FR popd #================================================= From d8d684eaffa65da6cf6b4e347c54f30f4b233049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 13:04:11 +0200 Subject: [PATCH 07/15] Update restore --- scripts/restore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index c2ff4d9..e7d4bc8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -57,7 +57,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$final_path" chown -R root: $final_path/ -chown -R $admin: $final_path/.venv/ +chown -R $admin: $final_path/venv/ #================================================= # SPECIFIC RESTORATION @@ -71,7 +71,6 @@ ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs $ynh_npm install -g configurable-http-proxy -python3 -m pip install pipenv #================================================= # RESTORE SYSTEMD From 4f4ef709c2dbb19666808d3719b25eff9171b5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:57:33 +0200 Subject: [PATCH 08/15] Update upgrade --- scripts/upgrade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d6991b5..a8c7dbc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,7 +28,6 @@ enable_terminal=$(ynh_app_setting_get --app=$app --key=enable_terminal) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) @@ -105,7 +104,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Building app..." --weight=160 - ynh_secure_remove $final_path/.venv + #ynh_secure_remove $final_path/.venv pushd $final_path python3 -m venv $final_path/venv From 073f0fb00d95ba00862f12d66de6fa35f5287b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:57:46 +0200 Subject: [PATCH 09/15] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index a8c7dbc..2cfca85 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,7 +109,7 @@ then pushd $final_path python3 -m venv $final_path/venv source $final_path/venv/bin/activate - ynh_exec_warn_less pip install npm@latest jupyterlab==$jupyterlab_version jupyterhub notebook jupyter_collaboration jupyterhub-ldapauthenticator pyzmq + ynh_exec_warn_less pip install jupyterlab==$jupyterlab_version jupyterhub notebook jupyter_collaboration jupyterhub-ldapauthenticator pyzmq popd fi From 2134b951b14f1b0e7892c1b02e4c7bbce0e1c11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:57:57 +0200 Subject: [PATCH 10/15] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2cfca85..63acdac 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,7 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=83 +ynh_script_progression --message="Upgrading dependencies..." --weight=10 ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version From 156f0ef59691b5ffceb32d12b2b62f7873d3b79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 15:34:51 +0200 Subject: [PATCH 11/15] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index bffcca9..770e14a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Code console environment for running Python code interactively", "fr": "Console de code pour exécuter du code Python de manière interactive" }, - "version": "4.0.2~ynh1", + "version": "4.0.2~ynh2", "url": "https://jupyter.org", "upstream": { "license": "BSD-3-Clause", From 2b889b7af7d8d939301f403ff3e6715afc82ccff Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 11 Jul 2023 13:34:57 +0000 Subject: [PATCH 12/15] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cae8d02..0996a8a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in JupyterLab is the next-generation user interface for Project Jupyter offering all the familiar building blocks of the classic Jupyter Notebook (notebook, terminal, text editor, file browser, rich outputs, etc.) in a flexible and powerful user interface. JupyterLab will eventually replace the classic Jupyter Notebook. -**Shipped version:** 4.0.2~ynh1 +**Shipped version:** 4.0.2~ynh2 **Demo:** https://mybinder.org/v2/gh/jupyterlab/jupyterlab-demo/master?urlpath=lab/tree/demo diff --git a/README_fr.md b/README_fr.md index 2f1ecbb..c871c1e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po JupyterLab is the next-generation user interface for Project Jupyter offering all the familiar building blocks of the classic Jupyter Notebook (notebook, terminal, text editor, file browser, rich outputs, etc.) in a flexible and powerful user interface. JupyterLab will eventually replace the classic Jupyter Notebook. -**Version incluse :** 4.0.2~ynh1 +**Version incluse :** 4.0.2~ynh2 **Démo :** https://mybinder.org/v2/gh/jupyterlab/jupyterlab-demo/master?urlpath=lab/tree/demo From 201c386a231167210f2d8bab970adcdb97e2e038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 16:34:57 +0200 Subject: [PATCH 13/15] Update upgrade --- scripts/upgrade | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 63acdac..8d60997 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -92,7 +92,8 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=10 ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs -$ynh_npm install -g configurable-http-proxy + +$ynh_npm install -g configurable-http-proxy npm #================================================= # SPECIFIC UPGRADE @@ -104,11 +105,12 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Building app..." --weight=160 - #ynh_secure_remove $final_path/.venv + ynh_secure_remove $final_path/.venv + + python3 -m venv $final_path/venv + source $final_path/venv/bin/activate pushd $final_path - python3 -m venv $final_path/venv - source $final_path/venv/bin/activate ynh_exec_warn_less pip install jupyterlab==$jupyterlab_version jupyterhub notebook jupyter_collaboration jupyterhub-ldapauthenticator pyzmq popd fi From ed87127d7f6d59f1f7721a7a60fc88f5cb8abfea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 18:20:44 +0200 Subject: [PATCH 14/15] Update upgrade --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 8d60997..c2e4f90 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -106,7 +106,6 @@ then ynh_script_progression --message="Building app..." --weight=160 ynh_secure_remove $final_path/.venv - python3 -m venv $final_path/venv source $final_path/venv/bin/activate From af9fe7bd584b11b38fd8f35c2e633f36e4f7de06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 12 Jul 2023 21:36:04 +0200 Subject: [PATCH 15/15] Update upgrade --- scripts/upgrade | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index c2e4f90..871c306 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -63,9 +63,7 @@ ynh_script_progression --message="Ensuring downward compatibility..." # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/opt/$app - mkdir -p $final_path - ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi