Skip to content

Commit

Permalink
Switch to JupyterLab 4 (#115)
Browse files Browse the repository at this point in the history
* Update for lab 4.0

Relax more versions to get a valid resolution

Fix typo

Further resolution fixes

More unpinning and bumping (need recent Python to install Lab 4)

Commend out offline notebook extension

Unpin invoke, comment out C kernel

Formatting for pip

Reinstate x stack

Try without leading slash

xleaflet 0.17 does not exist?

Though it is tagged: https://github.com/jupyter-xeus/xleaflet/releases/tag/0.17.0

Unpin x stack

Comment out all x stack except for xeus-cling

Co-authored-by: krassowski <5832902+krassowski@users.noreply.github.com>

* Try fixing setup-miniconda config
> The env file works locally...

* Give anothter try

* Add note about use-only-tar-bz2

* Test no r packages on binder

* Restore r installation

* Don't use nodefaults for r task

* Pre install r packages
This will optimize the cached layer and hopefully solve the postBuild bug

* Another try

* back to the working commit without r

* Restore nodefaults for r task as we skip it for now.

---------

Co-authored-by: krassowski <5832902+krassowski@users.noreply.github.com>
  • Loading branch information
fcollonval and krassowski authored Jun 12, 2023
1 parent d4e63f2 commit 5adbb27
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 33 deletions.
45 changes: 23 additions & 22 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,35 @@ channels:
- nodefaults
dependencies:
# !! you can only use single `=` to set a version. Otherwise it will break the update job
- invoke=1.7.3
- invoke=2.1.2
- packaging
- pyyaml
# applications
- jupyterlab=3.5.0
- retrolab=0.3.21
- nbconvert=7.2.5
- jupyterlab=4.0.1
- jupyter-collaboration=1.0.0
- nbconvert=7.4.0
- pip:
- notebook==7.0.0b3
# extensions
- jupyter-offlinenotebook=0.2
- jupyterlab-fasta=3.2.0
- jupyterlab-geojson=3.3.1
- jupyterlab-link-share=0.2
- jupyter-offlinenotebook=0.2.2
- jupyterlab-fasta=3.3
- jupyterlab-geojson=3.4
# Python Kernel
- ipykernel=6.16.2
- ipykernel=6.23.1
- xeus-python=0.14.3
- ipywidgets=8.0.2
- widgetsnbextension=4.0.3
- ipyleaflet=0.17.2
- altair=4.2.0
- bqplot=0.12.36
- dask=2021.10.0
- matplotlib-base=3.5.3
- pandas=1
- ipywidgets=8
- ipyleaflet=0.17.3
- altair=5.0.1
- bqplot=0.12.39
- dask=2023.5.1
- matplotlib-base=3.7.1
- pandas=2.0.2
- python=3.9
- scikit-image=0.19.2
- scikit-learn=1.0.2
- seaborn=0.12.1
- tensorflow=2
- sympy=1.10.1
- scikit-image=0.20.0
- scikit-learn=1.2.2
- seaborn-base=0.12.2
- tensorflow=2.11.0
- sympy=1.12
- traittypes=0.2.1
# C++ Kernel
- xeus-cling=0.13.0
Expand All @@ -40,4 +40,5 @@ dependencies:
- xwidgets=0.26.1
- xleaflet=0.16.0
# CLI tools
- pip
- vim
2 changes: 1 addition & 1 deletion .binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -ex

invoke r --env-name=notebook
# invoke r --env-name=notebook
invoke demofiles
invoke talk -t demo
rm -rf demofiles
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ jobs:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('.binder/environment.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
mamba-version: ">=1.4.0"
# Defaults is added automatically
channels: conda-forge
channel-priority: "strict"
activate-environment: jupyterlab-demo
environment-file: .binder/environment.yml
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
# The following option is blocking the environment resolution (newer versions are not found)
# use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- run: |
conda info
conda list
Expand Down
8 changes: 2 additions & 6 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ def build(ctx, env_name=env_name, kernel=True):
"""

if kernel:
path = os.environ.get("PATH")
ctx.run(
f"{source!s} activate {env_name!s} && ipython kernel install --name {env_name!s} --display-name {env_name!s} --sys-prefix",
env={"PATH": f"{activate_path()}:{path}"},
f"conda run -n {env_name!s} ipython kernel install --name {env_name!s} --display-name {env_name!s} --sys-prefix"
)


Expand Down Expand Up @@ -178,10 +176,8 @@ def r(ctx, env_name=env_name):
"""
Installs the r kernel and associated libs.
"""
path = os.environ.get("PATH")
ctx.run(
f"{source!s} activate {env_name!s} && mamba install -yc conda-forge -c nodefaults r-irkernel r-ggplot2",
env={"PATH": f"{activate_path()}:{path}"},
f"mamba install -yn {env_name!s} -c conda-forge -c nodefaults r-irkernel r-ggplot2",
)


Expand Down

0 comments on commit 5adbb27

Please sign in to comment.