1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jupyterlab_ynh.git synced 2024-09-03 19:26:35 +02:00

Merge pull request #83 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-04-13 13:14:33 +02:00 committed by GitHub
commit 76643860b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 36 additions and 64 deletions

View file

@ -11,7 +11,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
## Overview
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:** 3.0.10
**Shipped version:** 3.0.14
## Screenshots
@ -39,8 +39,8 @@ How to configure this app: by an admin panel, a plain file with SSH.
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jupyterlab%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jupyterlab/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jupyterlab%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jupyterlab/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jupyterlab.svg)](https://ci-apps.yunohost.org/ci/apps/jupyterlab/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jupyterlab.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jupyterlab/)
## Links

View file

@ -11,7 +11,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
## Vue densemble
JupyterLab est une interface utilisateur de nouvelle génération pour le projet Jupyter offrant tous les modules de Jupyter Notebook (interpréteur Python, terminal, éditeur de texte, navigateur de fichiers, etc.) dans une interface utilisateur flexible et puissante. JupyterLab remplacera à terme Jupyter Notebook.
**Version incluse :** 3.0.10
**Version incluse :** 3.0.14
## Captures décran
@ -39,8 +39,8 @@ Comment configurer cette application : via le panneau d'administration, un fichi
#### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jupyterlab%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jupyterlab/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jupyterlab%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jupyterlab/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jupyterlab.svg)](https://ci-apps.yunohost.org/ci/apps/jupyterlab/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jupyterlab.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jupyterlab/)
## Liens

View file

@ -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": "3.0.10~ynh1",
"version": "3.0.13~ynh1",
"url": "https://jupyterlab.readthedocs.io/en/stable/",
"license": "BSD-3-Clause",
"maintainer": {

View file

@ -7,9 +7,9 @@
# dependencies used by the app
pkg_dependencies="python3-dev python3-pip libffi-dev libzmq3-dev"
nodejs_version="14"
nodejs_version="15"
jupyterlab_version="3.0.10"
jupyterlab_version="3.0.14"
#=================================================
# PERSONAL HELPERS

View file

@ -33,6 +33,23 @@ port_hub=$(ynh_app_setting_get --app=$app --key=port_hub)
port_http_proxy=$(ynh_app_setting_get --app=$app --key=port_http_proxy)
admin=$(ynh_app_setting_get --app=$app --key=admin)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
# Restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CHECK WHICH PARTS SHOULD BE CHANGED
#=================================================
@ -93,21 +110,10 @@ fi
# CONFIGURE JUPYTERLAB
#=================================================
ynh_backup_if_checksum_is_different --file="$final_path/config/jupyterhub_config.py"
domain=$new_domain
path_url=$new_path
path=${new_path%/}
cp -f ../conf/jupyterhub_config.py $final_path/config/jupyterhub_config.py
ynh_replace_string --match_string="__URL__" --replace_string="https://$domain" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PORT_HUB__" --replace_string="$port_hub" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PORT_HTTP_PROXY__" --replace_string="$port_http_proxy" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/config/jupyterhub_config.py"
ynh_store_file_checksum --file="$final_path/config/jupyterhub_config.py"
ynh_add_config --template="../conf/jupyterhub_config.py" --destination="$final_path/config/jupyterhub_config.py"
#=================================================
# GENERIC FINALISATION

View file

@ -134,29 +134,11 @@ ynh_add_systemd_config
mkdir -p "$final_path/config"
# JupyterHub configuration
cp -f ../conf/jupyterhub_config.py $final_path/config/jupyterhub_config.py
path=${path_url%/}
ynh_replace_string --match_string="__URL__" --replace_string="https://$domain" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PORT_HUB__" --replace_string="$port_hub" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PORT_HTTP_PROXY__" --replace_string="$port_http_proxy" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/config/jupyterhub_config.py"
ynh_add_config --template="../conf/jupyterhub_config.py" --destination="$final_path/config/jupyterhub_config.py"
# Jupyter notebook configuration
cp -f ../conf/jupyter_notebook_config.py $final_path/config/jupyter_notebook_config.py
ynh_replace_string --match_string="__ENABLE_TERMINAL__" --replace_string="$enable_terminal" --target_file="$final_path/config/jupyter_notebook_config.py"
#=================================================
# STORE THE CONFIG FILE CHECKSUM
#=================================================
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$final_path/config/jupyterhub_config.py"
ynh_store_file_checksum --file="$final_path/config/jupyter_notebook_config.py"
ynh_add_config --template="../conf/jupyter_notebook_config.py" --destination="$final_path/config/jupyter_notebook_config.py"
#=================================================
# GENERIC FINALIZATION

View file

@ -108,7 +108,7 @@ yunohost service add $app --description="$app daemon" --log="$app"
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=5
ynh_systemd_action --service_name=$app --action="start" --line_match="JupyterHub is now running at" --log_path="systemd"
ynh_systemd_action --service_name=$app --action=start --line_match="JupyterHub is now running at" --log_path="systemd"
#=================================================
# GENERIC FINALIZATION

View file

@ -132,29 +132,13 @@ fi
# STORE THE CONFIG FILE CHECKSUM
#=================================================
ynh_backup_if_checksum_is_different --file="$final_path/config/jupyterhub_config.py"
mkdir -p "$final_path/config"
cp -f ../conf/jupyterhub_config.py $final_path/config/jupyterhub_config.py
ynh_replace_string --match_string="__URL__" --replace_string="https://$domain" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PORT_HUB__" --replace_string="$port_hub" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__PORT_HTTP_PROXY__" --replace_string="$port_http_proxy" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="$final_path/config/jupyterhub_config.py"
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/config/jupyterhub_config.py"
path=${path_url%/}
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$final_path/config/jupyterhub_config.py"
ynh_add_config --template="../conf/jupyterhub_config.py" --destination="$final_path/config/jupyterhub_config.py"
ynh_backup_if_checksum_is_different --file="$final_path/config/jupyter_notebook_config.py"
cp -f ../conf/jupyter_notebook_config.py $final_path/config/jupyter_notebook_config.py
ynh_replace_string --match_string="__ENABLE_TERMINAL__" --replace_string="$enable_terminal" --target_file="$final_path/config/jupyter_notebook_config.py"
ynh_store_file_checksum --file="$final_path/config/jupyter_notebook_config.py"
ynh_add_config --template="../conf/jupyter_notebook_config.py" --destination="$final_path/config/jupyter_notebook_config.py"
#=================================================
# SETUP SYSTEMD
@ -187,7 +171,7 @@ yunohost service add $app --description="$app daemon" --log="$app"
#=================================================
ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --line_match="JupyterHub is now running at" --log_path="systemd"
ynh_systemd_action --service_name=$app --action=start --line_match="JupyterHub is now running at" --log_path="systemd"
#=================================================
# RELOAD NGINX