Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jupyter-offlinenotebook to 0.2.1 #997

Closed

Conversation

manics
Copy link
Member

@manics manics commented Jan 4, 2021

This includes the JupyterLab 3 extension that does not require a build step. It remains compatible with JupyterLab 2 (but the extension must be installed separately).

As far as JupyterLab 2 is concerned there is no change. For JupyterLab3 the extension is effectively pre-installed since it's part of the PyPI package, so it should "just work" if someone choose to install JupyterLab 3.

See also:

This includes the JupyterLab 3 extension that does not require a build step. It remains compatible with JupyterLab 2 (but the extension must be installed seperately).
@manics manics mentioned this pull request Jan 4, 2021
5 tasks
@jtpio
Copy link
Contributor

jtpio commented Jan 5, 2021

Thanks!

Will the jupyter lab build --minimize=False command below still trigger a new build? Maybe it's possible to not run it if the JupyterLab version is >= 3.0?

@manics
Copy link
Member Author

manics commented Jan 5, 2021

I think that repo2docker:

  1. Installs miniforge
  2. Installs a default set of packages defined from the environment*.yml in https://github.com/jupyterhub/repo2docker/tree/d8a3d7fa0ac8b1ec151d473a86ca813535369a54/repo2docker/buildpacks/conda (which includes JupyterLab 2)
  3. Installs the user environment, which is where JupyterLab would be upgraded

Hopefully someone will correct me if I'm wrong!

@manics
Copy link
Member Author

manics commented Jan 5, 2021

The conda-forge package has also been updated to 0.2.0: https://anaconda.org/conda-forge/jupyter-offlinenotebook/files

So if we want we could switch to that as suggested in #846 #996
I'm happy to make that change in this PR if that's the preferred option.

@tomyun
Copy link
Contributor

tomyun commented Jan 5, 2021

IIUC, switching to use conda-forge package in environment.yml may help solving #961.

@betatim
Copy link
Member

betatim commented Jan 6, 2021

I think that repo2docker:

1. Installs miniforge

2. Installs a default set of packages defined from the `environment*.yml` in [`d8a3d7f`/repo2docker/buildpacks/conda](https://github.com/jupyterhub/repo2docker/tree/d8a3d7fa0ac8b1ec151d473a86ca813535369a54/repo2docker/buildpacks/conda) (which includes JupyterLab 2)

3. Installs the user environment, which is where JupyterLab would be upgraded

I also think this is what happens.

That means that by default repo2docker runs with jupyterlab 2 and in order to install offline-notebook we have to run the build step. At a later point in the build process the user might install lab 3. The new thing here is that the user won't have to run the build step again. Right now lots of repos use a postBuild to re-run the build. This is what can be removed after we merge this PR.

@betatim
Copy link
Member

betatim commented Jan 6, 2021

Any idea why the (3.8, conda) tests fail with No matching distribution found for jupyter-offlinenotebook==0.2.0?

@manics
Copy link
Member Author

manics commented Jan 6, 2021

My first guess was a stale PyPI cache, but I've re-run the tests and they're still failing so I'll need to investigate further.

@manics
Copy link
Member Author

manics commented Jan 6, 2021

The failing test uses a Python 3.5 environment, but I set the minimum Python version to 3.6
https://github.com/manics/jupyter-offlinenotebook/blob/24c3429d06660a21f05c912a041479a33db66a77/setup.py#L96
I forgot that repo2docker mixes the Jupyter front end and the execution environment for Python 3.*.

I can think of a few options:

  1. Use same strategy as installing the JupyterLab extension and allow it to fail: pip install jupyter-offlinenotebook==0.2.0 || true.
  2. Change https://github.com/manics/jupyter-offlinenotebook/blob/24c3429d06660a21f05c912a041479a33db66a77/setup.py#L96 to python_requires>=3.5 and release 0.2.1. The previous release was missing a python_requires statement which is why it previously worked.
  3. Switch to the conda package, which means different versions of jupyter-offlinenotebook could be used. The 3.5 environment could either use version 0.1.0, or we could just omit the extension since any Python 3.5 repositories will be quite old, and users probably won't miss this extension. The other 3.* environments would use 0.2.0.

1 is the least work. 3 is the most work, but I think it's worth doing if everyone's agreed. What do you think?

@manics manics changed the title Update jupyter-offlinenotebook to 0.2.0 Update jupyter-offlinenotebook to 0.2.1 Jan 20, 2021
@manics
Copy link
Member Author

manics commented Jan 20, 2021

Does anyone have a preference for any of the three options in #997 (comment) ? Otherwise I'll go with (3), switching to conda

@betatim
Copy link
Member

betatim commented Jan 20, 2021

I think using a conda package is good and the only downside is that it is more work to setup now. I think providing an older version is fine for Python 3.5.

@manics
Copy link
Member Author

manics commented Feb 16, 2021

I'm closing this as it looks like #996 will be merged soon

@manics manics closed this Feb 16, 2021
@manics manics deleted the jupyter-offlinenotebook-0.2.0 branch February 18, 2021 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants