forked from telamonian/theme-darcula
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.ci_funcs.sh
executable file
·36 lines (28 loc) · 1.09 KB
/
.ci_funcs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
set -ex
set -o pipefail
ci_install() {
# Install JupyterLab and enable the server extension
pip install -q --upgrade pip
pip --version
pip install cookiecutter jupyterlab
jupyter serverextension enable --py jupyterlab
}
ci_script() {
# set a custom user-settings directory
export JUPYTERLAB_SETTINGS_DIR="./.jupyter/lab/user-settings"
THEME_SETTINGS="${JUPYTERLAB_SETTINGS_DIR}/@jupyterlab/apputils-extension/themes.jupyterlab-settings"
# Create a theme extension using the cookiecutter default inputs
# cookiecutter . --no-input
# install theme
jupyter labextension install .
# enable the theme in user-settings
mkdir -p $(dirname $THEME_SETTINGS)
printf "%s\n" "{" " \"theme\": \"theme-gruvbox\"" "}" > $THEME_SETTINGS
# print out a confirmation that the extension is installed
jupyter labextension list
# run a test of the main JupyterLab app with the theme enabled
python -m jupyterlab.browser_check
}