Skip to content
Snippets Groups Projects
Commit a4572798 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Add black and jupyterlab_code_formatter

parent 419aea3a
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ RUN conda install --quiet --yes -n jupyter \
altair=3.1 \
ase=3.18 \
beautifulsoup4 \
black \
bokeh=1.3 \
bz2file \
csentry-api \
......@@ -111,16 +112,22 @@ RUN jupyter bundlerextension enable --sys-prefix --py dashboards_bundlers \
@jupyter-widgets/jupyterlab-manager@1.0 \
jupyterlab_bokeh@1.0.0 \
@pyviz/jupyterlab_pyviz \
@ryantam626/jupyterlab_code_formatter \
&& npm cache clean --force \
&& rm -rf /opt/conda/envs/jupyter/share/jupyter/lab/staging \
&& rm -rf /home/conda/.cache/yarn \
&& rm -rf /home/conda/.node-gyp \
&& pip install --no-cache-dir jupyterlab-gitlab jupyterlab-git \
&& pip install --no-cache-dir jupyterlab-gitlab jupyterlab-git jupyterlab_code_formatter \
&& jupyter serverextension enable --py --sys-prefix jupyterlab_code_formatter \
&& jupyter serverextension enable --py --sys-prefix jupyterlab_git
# Overwrite the default jupyterlab-gitlab lab extension configuration
COPY drive.json /opt/conda/envs/jupyter/share/jupyter/lab/schemas/jupyterlab-gitlab/drive.json
# Add keyboard shortcut for jupyterlab_code_formatter
RUN mkdir -p /home/conda/.jupyter/lab/user-settings/\@jupyterlab/shortcuts-extension
COPY --chown=conda:users shortcuts.jupyterlab-settings /home/conda/.jupyter/lab/user-settings/\@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings
# In standalone mode jupyter is started with --config /home/conda/.jupyter/jupyter_notebook_config_standalone.py
# This changes which filenames are searched for!
# See http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/config.html
......
{
"shortcuts":[{
"command": "jupyterlab_code_formatter:black",
"keys": [
"Ctrl K",
"Ctrl M"
],
"selector": ".jp-Notebook.jp-mod-editMode"
}]
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment