Coder Social home page Coder Social logo

demo's Introduction

JupyterLite Demo

lite-badge

JupyterLite deployed as a static site to GitHub Pages, for demo purposes.

✨ Try it in your browser ✨

➡️ https://jupyterlite.github.io/demo

github-pages

Requirements

JupyterLite is being tested against modern web browsers:

  • Firefox 90+
  • Chromium 89+

Deploy your JupyterLite website on GitHub Pages

Check out the guide on the JupyterLite documentation: https://jupyterlite.readthedocs.io/en/latest/quickstart/deploy.html

Further Information and Updates

For more info, keep an eye on the JupyterLite documentation:

demo's People

Contributors

cover-me avatar derthorsten avatar jtpio avatar martinrenou avatar oaustegard avatar pierrepo avatar psychemedia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

demo's Issues

How to enable real-time collaboration

Problem

There is no section about collaboration specific to the demo. In the jupyterlite docs, it says that it should be enabled but I can't see this on my instance which is a vanilla fork of the demo.

I also tried to deploy my own from scratch, and the collaboration works on my machine but not when it is deployed on e.g. github pages nor gitlab pages.

I have tried to append room=0, put a specific room number in the configuration that I then put in the url, but the two open windows don't show the other modifications.

Suggested Improvement

A section that says how to make real-time collaboration work

Document requirements on Python environment to find extensions (and kernels)

Problem

I tried to build a jupyter-lite app within an existing Ubuntu Docker build but was struggling to make any kernel available.

For example, this setup will build without the pyodide kernel:

FROM ubuntu:22.04

RUN apt-get -y update && apt-get install -y python3 python3-pip \
    && pip install --no-cache-dir --upgrade pip

RUN pip install --no-cache-dir jupyterlite-core==0.1.0 jupyterlab~=3.5.1 jupyterlite-pyodide-kernel==0.0.6 \
    && mkdir /build \
    && cd /build \
    && jupyter lite build \
    && ls -al _output/* \
    && cat _output/jupyter-lite.json

while this one will include the pyodide kernel:

FROM python:3.11

RUN pip install --no-cache-dir --upgrade pip

RUN pip install --no-cache-dir jupyterlite-core==0.1.0 jupyterlab~=3.5.1 jupyterlite-pyodide-kernel==0.0.6 \
    && mkdir /build \
    && cd /build \
    && jupyter lite build \
    && ls -al _output/* \
    && cat _output/jupyter-lite.json

Why?

Suggested Improvement

Document how the jupyter lite build process finds extensions and what the requirements for the Python environment are.

Automated version bump when new releases are out

Problem

For now we manually update this repo to bump the version of jupyterlite when there is a new release. For example: #43

It would be great if this could be automated instead.

Proposed Solution

Probably just parsing and writing to requirements.txt should be enough for now.

Additional context

JupyterLab Desktop has a workflow to do that with JupyterLab releases: https://github.com/jupyterlab/jupyterlab-desktop/blob/master/.github/workflows/sync_lab_release.yml

No kernels installed

Description

Reproduce

  1. Fork and deploy this repo
  2. Deploy the site
  3. Go to the site url
  4. Marvel in the lack of any kernels being installed.

Expected behavior

Kernels should be installed

Context

Maybe I'm doing something wrong, if so instructions are unclear.

  • JupyterLite version:
  • Operating System and version:
  • Browser and version:
Browser Output
Paste the output from your browser Javascript console here.

overrides settings of "@jupyterlab/notebook-extension:tracker" to change the rendering layout

Hi,

I try to configure the look and feel of the resulting embedded notebook.
My (first) goal is to change the rendering layout to 'side-by-side'. Could you please explain me how to do that ?
I tried several things (overrides.json, jupyter-lite.json in different folder, etc) but with no luck.
I guess the closest thing I did is to add a jupyter-lite.json file in the root directory of my repo with the following content:
`{

"jupyter-lite-schema-version": 0,
"jupyter-config-data": {
  "disabledExtensions": [
    "@jupyterlab/drawio-extension",
    "jupyterlab-kernel-spy",
    "jupyterlab-tour"
  ]
},
"settingsOverrides": {
     "@jupyterlab/notebook-extension:tracker": {
        "renderingLayout": "side-by-side"
     },
    "@jupyterlab/apputils-extension:palette": {"modal": false}
 }

}`

the file seems considered since the disabled extensions are actually disabled but the rendering layout is not changed :-/
the repo is here: https://github.com/jdeantoni/iiwjupylite and the resulting page here: https://jdeantoni.github.io/iiwjupylite/lab/index.html

any help would be appreciated
thanks

Demo notebook of things that don't (yet) work

Problem

Many potential users of jupyterlite are likely to consider themselves "notebook users" rather than developers. This template repo helps provide an on-ramp to unexperienced users with a way to get started with their own deployment of jupyterlite, as well as exploring what's possible via the demo notebooks.

Such users might be consider themselves "notebook users" rather than developers and might be frustrated if things they expect to work don't (yet) work.

It might be useful to have a notebook of "not yet working" examples of things that folk are likely to try but that don't yet work, with workarounds if available, perhaps with a brief explanation of why they don't (yet) work.

See also: jupyterlite/jupyterlite#199

Suggested Improvement

Create a notebook with a set of "not yet working" items.

For example:

  • %pip not available [related issue]
  • pd.read_csv() file not found; sqliite file not found etc. [related issue]
  • shell commands and line magics that make use of shell commands won't work

GitHub Pages: Custom GitHub Actions Workflows

Posting here for visibility: GitHub recently announced a new way for publishing content to GitHub Pages: https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/

You can now deploy to a GitHub Pages site directly from a repository using GitHub Actions, without needing to set up a publishing source. Using Actions to orchestrate Pages publishing provides many more options for choosing your authoring framework (Next.js, Hugo, Gatsby, Jekyll, NuxtJS or other technologies, and the associated versions thereof) as well as giving you finer control over the publishing process, such as leveraging deployment gates.

We can check whether this could be applicable to this repo,

ipywidgets fails to install in jupyterlite/demo deployment

Description

I believe ipywidgets fail to install in the Jupyterlite deployment of the jupyterlite/demo repo. It was working in late July.

This started as a discussion here: https://discourse.jupyter.org/t/miscellaneous-questions-on-the-usage-of-jupyterlite

Reproduce

  1. Open a fresh Jupyterlite demo from https://jupyterlite.github.io/demo/lab/
  2. Create and run cell with
import piplite
await piplite.install(['ipywidgets'])
  1. It yields a ValueError: Can't find a pure Python 3 wheel for 'widgetsnbextension~=4.0'.

Expected behavior

ipywidgets should install fine. This is the case in the official Jupyterlite demo https://jupyterlite.readthedocs.io/en/latest/_static/lab/, so there must be some divergence between the two deployments.

Context

  • JupyterLite version: Version 0.1.0-beta.12
  • Operating System and version: Ubuntu 22.04
  • Browser and version: Firefox 104 (as a snap from Ubuntu)

Not possible to call out to external websites

Description

In both my own jupyterlite, and in the demo jupyterlite, it is not possible to call out to external websites. It always results in an error related to insecure requests. This happens with all URLs that I have tested, and happens whether or not the request call includes a "validate=true/false" flag.

Reproduce

  1. Code block:
import requests

def download_file_into_memory(url):
    response = requests.get(url)
    if response.status_code == 200:
        return response.content
    else:
        print(f"Failed to download file. Status code: {response.status_code}")
        return None


file_content = download_file_into_memory("https://cnn.com")
  1. Run

  2. See error:

/lib/python3.11/site-packages/urllib3/connectionpool.py:1101: InsecureRequestWarning: Unverified HTTPS request is being made to host 'cnn.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
---------------------------------------------------------------------------
JsException                               Traceback (most recent call last)
File /lib/python3.11/site-packages/urllib3/contrib/emscripten/fetch.py:380, in send_request(request)
    378         js_xhr.setRequestHeader(name, value)
--> 380 js_xhr.send(to_js(request.body))
    382 headers = dict(Parser().parsestr(js_xhr.getAllResponseHeaders()))

JsException: NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://cnn.com/'.

During handling of the above exception, another exception occurred:

From myBinder to the use of the GitHub pages: from IPython Kernel to Pyodide

Due to the "500 Internal Server Error" of myBinder the last weeks, i look at how to make available the notebooks via GitHub pages with the support of Jupyterlite.

Problem

I notice some problems with the existing notebooks i have:

  • use of request library

Many people load their datas like:
Loading the EDH dataset from the zenodo url

import requests
url = "https://zenodo.org/record/4888168/files/EDH_text_cleaned_2021-01-21.json"  
r = requests.get(url)
json = r.json()
EDH = pd.DataFrame.from_dict(json)

I see i should look at pyodide.http.FetchResponse

  • use of SSL
df = pd.read_csv("https://raw.githubusercontent.com/jdh-observer/jdh001-JJszM3GwAYDs/main/namelesscrowd/cooc-multitudo-tac_hyperbase.csv")
df

URLError: <urlopen error unknown url type: https>

By using the Jupyterlite demo template

../jupyterlite-demo/blob/main/.github/workflows/deploy.yml

    uses: actions/setup-python@v4
        with:
          python-version: '3.10'

https://docs.python.org/3/library/ssl.html

This module does not work or is not available on WebAssembly platforms wasm32-emscripten and wasm32-wasi.

Advices

  • Guidelines to develop notebook for the Pyodide kernel?
  • Do you have already theses feedbacks of migration of existing notebook for Jupyterlite?
  • or should i look at this https://github.com/jupyterlite/repo2jupyterlite to migrate already written notebook?

Add step to `deploy.yml` Github Action to create `all.json`

The current demo is hardwired to use a specific (fixed) all.json config file which itemises the files to be displayed in the file directory listing.

To make this repo more useful as a possible template repo, from which folk can deploy their own notebook seeded demo site, a new all.json file should be created that captures the files to be listed.

There is a fragment of Python code in JupyterLite conf.py that could be split out into a simple CLI command to achieve this: https://github.com/jtpio/jupyterlite/blob/695373748db6c5aa015224e94d4aa8679eb34ef2/docs/conf.py#L142

To make things conventional / easier to identify which files to copy over, it might be worth having something like a content directory into which the notebook files, image files, maybe python files etc etc intended for distribution are placed.

At the moment the Github Action only copies over *.csv and *.ipynb files: https://github.com/jtpio/jupyterlite-demo/blob/98eb9db9c3cd68e10caa0e265d9be38db9ecb30d/.github/workflows/deploy.yml#L28

What happens if demo files are updated and a user has already visited the site

If a user has visited the site from a particular browser and then revisits the demo site at a later time, perhaps noticing from the repo that additional demo examples have been added, or original examples have been updated, how will their browser respond?

  • will new files be added to browser storage (which already has state associated with the demo URL)?
  • will updated files overwrite similarly named files in browser storage?

How could a user "update" their local state to reflect the current repo live demo state? (I guess one way might be to run the browser as a new private browser session, but how many folk would think to do that?)

Failed to load packing, micropip, pyparsing

Description

In my company network, I met this error everytime at pyodide.asm.js:9.
But in my home network, everything is fine.

Context

  • JupyterLite version:0.1.0
  • Operating System and version: windows 10
  • Browser and version: Edge 114

If there is some requirements for network, please state clearly, so I can push IT to fix.

dotnet core kernel and node ObservableHQ Bridge

Problem

I would like it if we could use dotnet core kernel then display the content in html using ObservableHQ []

Use cases:

-dotnet-CLR -repl

  • taking advantage of dotnet DLR ,foreign code interop and CIL bytecode.
  • utilizing onnx interference runtime and deployment in most platform natively with enhanced performance .
  • cross platform native deamon/services communication protocol to bridge plugins with native messaging in client apps
    --automation with powershell?
  • interactive programming/learning += desktop editors in mobile through web RWD+PWA .
    --blazor in notebook?
  • interactive data plotting and visualization displayed in html with widget and web component .
  • [Multi-language notebooks&variable sharing] within the same notebook

Proposed Solution

Add an option to switch computing kernel so we cloud use dotnet libraries usage example

Additional context

https://nteract.io/kernels/dotnet
https://github.com/nteract/nteract/tree/master/applications/jupyter-extension

ipywidgets fails to install in jupyterlite/demo deployment (again!)

On the present jupyterlite demo, there is again (see previously #97) an error when installing ipywidgets in JupyterLab when using the Pyodide kernel:

% pip install ipywidgets

The last fragment of the error message also resembles what was discussed and fixed in jupyterlite/jupyterlite#783:

ValueError: Can't find a pure Python 3 wheel for 'widgetsnbextension~=4.0.9'.

What I don't understand about this error is that it seems that there is a pure Python wheel on PyPI: https://pypi.org/project/widgetsnbextension/#files (file widgetsnbextension-4.0.9-py3-none-any.whl, uploaded 13 sept. 2023, that is yesterday)

For the reference, the relevant fragments of jupyterlite demo's requirements.txt:

# Core modules (mandatory)
jupyterlite-core==0.1.1
jupyterlab~=3.5.1

# Python kernel (optional)
jupyterlite-pyodide-kernel==0.0.10

# Python: ipywidget library for Jupyter notebooks (optional)
ipywidgets>=8.0.0,<9

However, I first caught the error with more recent versions:

# Core modules (mandatory)
jupyterlite-core==0.1.2
jupyterlab~=3.6.5

# Python kernel (optional)
jupyterlite-pyodide-kernel==0.1.1

Pyolite kernel stocks on [*]

Description

I used your document to run a local instance of jupyterlite on port 8000 but stocks on [*], i also run your online and had the same problem.
I should note that, the javascript kernel is working okay

Browser Output
Paste the output from your browser Javascript console here.

seaborn package is installed, but cannot reference in notebook (gh-pages)

Description

I've created a fork from the jupyterlite/demo template, spchamp/jupyter-test/

I'm trying to run an illustration with seaborn in JupyterLite. The following is how it appears with my local jupyter-labs installation on openSUSE Tumbleweed.

image

(The reference for the data source is Seeing Through Statistics, 4th ed., by Jessica M. Utts)

This has worked out in my local JupyterLabs installation with each of openSUSE Tumbleweed and FreeBSD. However, it's not working out right now, with my fork of the jupyterlite/demo template at GitHub.

I'm trying to render the following cell with the JupyterLite installation in my gh-pages site:

import seaborn as sns

## data from Utts ch. 9 exercise 9 (table 9.3)

# year = [1982, 1983, 1985, 1986, 1987, 1988, 1989, 1990, 1991]
pop = [231, 234, 239, 241, 243, 246, 248, 249, 252]
rate = [1.32, 1.26, 1.33, 1.49, 1.48, 1.57, 1.65, 1.82, 1.91]

splot = sns.regplot(x=pop, y=rate)
splot.set(title = "Example", xlabel="Population", ylabel="Rate")

Instead of a scatter plot with an illustration of linear regression, I'm seeing the following in the browser:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In [1], line 1
----> 1 import seaborn as sns
      3 ## data from Utts ch. 9 exercise 9 (table 9.3)
      4 
      5 # year = [1982, 1983, 1985, 1986, 1987, 1988, 1989, 1990, 1991]
      6 pop = [231, 234, 239, 241, 243, 246, 248, 249, 252]

ModuleNotFoundError: No module named 'seaborn'

The seaborn bundle is listed in the requirements.txt for the project. I've verified that seaborn is being installed during the GitHub Actions workflow. However, it seems that it's not showing up as available in the notebook, after the repository is deployed to the gh-pages site.

Reproduce

  1. Fork the jupyterlite/demo template, via the "Use this template" button or similar GH CLI action.
  2. Ensure the gh-pages support is enabled in the fork
  3. Add seaborn to requirements.txt
  4. Commit the change and visit the gh-pages site once built and deployed
  5. Try to reference seaborn in a notebook at the deployed site

I'm using the pyodide kernel in the notebook

Expected behavior

I was hoping that the graph would show up in JupyterLite on the gh-pages site, similar to how it's rendered with each of my local JuypterLab installations.

Context

This is with the JupyterLite installation from the jupyterlite/demo template at GitHub

I'm certain there are other ways to serve pages on the Web, with JupyterLab. I'm not certain if many of those methods would make for such an easy walkthough though, lol

This illustration was made after a short read-through with Plotting and Visualization, in Python for Data Analysis, 3rd ed.

Matplotlib magic command not available

Description

The matplotlib magic command (%matplotlib) is unavailable despite the example using it here. It's not clear to me whether this is a JupyterLite bug, or just a bug with the demo so I am putting it here for now.

image

Reproduce

  1. Go to the linked example
  2. Run all of the cells
  3. See error as shown in my screenshot

Expected behavior

The magic command should execute without issue. A good way to test this would be being able to run %matplotlib --list.

Context

  • JupyterLite version: 0.2.3
  • Operating System and version: MacOS Sonoma 14.3.1
  • Browser and version: Chrome 121.0.6167.184 (Official Build) (arm64)
Browser Output
/favicon.ico:1 
   Failed to load resource: the server responded with a status of 404 ()

remoteEntry.0dca0b46350f0c25c608.js:1 No satisfying version (^4.0.12) of shared module @jupyterlab/docregistry found in shared scope default.
Available versions: 4.0.11 from _JUPYTERLAB.CORE_OUTPUT
c @ remoteEntry.0dca0b46350f0c25c608.js:1
remoteEntry.0dca0b46350f0c25c608.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/rendermime (required ^4.0.12)
c @ remoteEntry.0dca0b46350f0c25c608.js:1
remoteEntry.0dca0b46350f0c25c608.js:1 Unsatisfied version 6.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/coreutils (required ^6.0.12)
c @ remoteEntry.0dca0b46350f0c25c608.js:1
remoteEntry.0dca0b46350f0c25c608.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/application (required ^4.0.12)
c @ remoteEntry.0dca0b46350f0c25c608.js:1
remoteEntry.0dca0b46350f0c25c608.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/ui-components (required ^4.0.12)
c @ remoteEntry.0dca0b46350f0c25c608.js:1
remoteEntry.0dca0b46350f0c25c608.js:1 Unsatisfied version 4.1.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/apputils (required ^4.1.12)
c @ remoteEntry.0dca0b46350f0c25c608.js:1
remoteEntry.0dca0b46350f0c25c608.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/translation (required ^4.0.12)
c @ remoteEntry.0dca0b46350f0c25c608.js:1
manifest.webmanifest:1 Manifest: property 'url' ignored, should be within scope of the manifest.
manifest.webmanifest:1 Manifest: property 'url' of 'shortcut' not present.
manifest.webmanifest:1 Manifest: property 'url' ignored, should be within scope of the manifest.
manifest.webmanifest:1 Manifest: property 'url' of 'shortcut' not present.
remoteEntry.0dca0b46350f0c25c608.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/notebook (required ^4.0.12)
c @ remoteEntry.0dca0b46350f0c25c608.js:1
remoteEntry.9f387e5e108e458f62c3.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/notebook (required ^4.1.0)
p @ remoteEntry.9f387e5e108e458f62c3.js:1
remoteEntry.9f387e5e108e458f62c3.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/logconsole (required ^4.1.0)
p @ remoteEntry.9f387e5e108e458f62c3.js:1
remoteEntry.9f387e5e108e458f62c3.js:1 No satisfying version (^4.1.0) of shared module @jupyterlab/outputarea found in shared scope default.
Available versions: 4.0.11 from _JUPYTERLAB.CORE_OUTPUT
p @ remoteEntry.9f387e5e108e458f62c3.js:1
remoteEntry.9f387e5e108e458f62c3.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/translation (required ^4.1.0)
p @ remoteEntry.9f387e5e108e458f62c3.js:1
remoteEntry.9f387e5e108e458f62c3.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/rendermime (required ^4.1.0)
p @ remoteEntry.9f387e5e108e458f62c3.js:1
remoteEntry.9f387e5e108e458f62c3.js:1 Unsatisfied version 7.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/services (required ^7.1.0)
p @ remoteEntry.9f387e5e108e458f62c3.js:1
remoteEntry.9f387e5e108e458f62c3.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/settingregistry (required ^4.1.0)
p @ remoteEntry.9f387e5e108e458f62c3.js:1
remoteEntry.9f387e5e108e458f62c3.js:1 Unsatisfied version 4.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/mainmenu (required ^4.1.0)
p @ remoteEntry.9f387e5e108e458f62c3.js:1
remoteEntry.9117113815033289c4d5.js:1 Unsatisfied version 0.2.3 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlite/kernel (required ~0.1.0-beta.18)
s @ remoteEntry.9117113815033289c4d5.js:1
remoteEntry.9117113815033289c4d5.js:1 Unsatisfied version 6.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/coreutils (required ^5.5.2)
s @ remoteEntry.9117113815033289c4d5.js:1
remoteEntry.9117113815033289c4d5.js:1 Unsatisfied version 2.1.2 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/coreutils (required ^1.11.0)
s @ remoteEntry.9117113815033289c4d5.js:1
consumes:73 Unsatisfied version 6.0.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/coreutils (required ^6.0.12)
p @ consumes:73
remoteEntry.f69e84c5aaec83c179ca.js:1 Unsatisfied version 2.1.2 of shared singleton module @lumino/signaling (required ^1.4.3)
f @ remoteEntry.f69e84c5aaec83c179ca.js:1
remoteEntry.f69e84c5aaec83c179ca.js:1 Unsatisfied version 2.1.2 of shared singleton module @lumino/coreutils (required ^1.5.3)
f @ remoteEntry.f69e84c5aaec83c179ca.js:1
remoteEntry.960d5d0f875a651e597f.js:1 Unsatisfied version 2.1.2 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/coreutils (required ^1.11.0)
f @ remoteEntry.960d5d0f875a651e597f.js:1
remoteEntry.960d5d0f875a651e597f.js:1 Unsatisfied version 2.1.2 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/signaling (required ^1.10.0)
f @ remoteEntry.960d5d0f875a651e597f.js:1
remoteEntry.2916befd91bdb8847e88.js:1 Unsatisfied version 2.0.1 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/messaging (required ^1.4.3)
d @ remoteEntry.2916befd91bdb8847e88.js:1
remoteEntry.2916befd91bdb8847e88.js:1 Unsatisfied version 2.3.1 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/widgets (required ^1.19.0)
d @ remoteEntry.2916befd91bdb8847e88.js:1
remoteEntry.5e71a5e8dcb6330c0085.js:1 Unsatisfied version 1.9.4 from jupyter-leaflet of shared singleton module leaflet (required =1.4.0)
s @ remoteEntry.5e71a5e8dcb6330c0085.js:1
remoteEntry.6a37df5d4590b29196a3.js:1 Unsatisfied version 4.1.11 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/apputils (required ^3.5.1)
s @ remoteEntry.6a37df5d4590b29196a3.js:1
remoteEntry.c764a537ae4fed4fb4ca.js:1 Unsatisfied version 2.3.1 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/widgets (required ^1.37.2)
s @ remoteEntry.c764a537ae4fed4fb4ca.js:1
service-manager.js:48 Existing JupyterLite ServiceWorkers unregistered
service-manager.js:50 Registering new JupyterLite ServiceWorker https://jupyterlite.github.io/demo/service-worker.js
service-manager.js:53 JupyterLite ServiceWorker was sucessfully registered
index.js:171 Kernel filesystem and JupyterLite contents will be synced
toc.js:513 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'type')
at Ce (toc.js:513:17)
at toc.js:421:41
at Array.forEach ()
at s (toc.js:419:41)
at c (toc.js:480:17)
at d (index.es6.js:555:18)
at e.emit (index.es6.js:513:17)
at s.emit (index.es6.js:112:17)
at ce._onCellInViewportChanged (widget.js:652:37)
at d (index.es6.js:555:18)
Ce @ toc.js:513
(anonymous) @ toc.js:421
s @ toc.js:419
c @ toc.js:480
d @ index.es6.js:555
e.emit @ index.es6.js:513
emit @ index.es6.js:112
_onCellInViewportChanged @ widget.js:652
d @ index.es6.js:555
e.emit @ index.es6.js:513
emit @ index.es6.js:112
set inViewport @ widget.js:164
attachWidget @ windowing.js:198
insertWidget @ index.es6.js:2516
_updateForDeferMode @ widget.js:758
_runOnIdleTime @ widget.js:727
await in _runOnIdleTime (async)
s @ toc.js:419
c @ toc.js:480
d @ index.es6.js:555
e.emit @ index.es6.js:513
emit @ index.es6.js:112
_onCellInViewportChanged @ widget.js:652
d @ index.es6.js:555
e.emit @ index.es6.js:513
emit @ index.es6.js:112
set inViewport @ widget.js:164
attachWidget @ windowing.js:198
insertWidget @ index.es6.js:2516
_updateForDeferMode @ widget.js:758
_runOnIdleTime @ widget.js:727
await in _runOnIdleTime (async)
onUpdateRequest @ widget.js:425
onUpdateRequest @ widget.js:1520
processMessage @ index.es6.js:1206
u @ index.es6.js:412
i @ index.es6.js:166
m @ index.es6.js:463
(anonymous) @ index.es6.js:140
Promise.then (async)
n @ index.es6.js:140
p @ index.es6.js:431
e.postMessage @ index.es6.js:196
update @ index.es6.js:1068
d @ index.es6.js:555
e.emit @ index.es6.js:513
emit @ index.es6.js:112
_triggerChange @ truststatus.js:191
_onModelChanged @ truststatus.js:143
d @ index.es6.js:555
e.emit @ index.es6.js:513
emit @ index.es6.js:112
onModelContentChanged @ widget.js:383
d @ index.es6.js:555
e.emit @ index.es6.js:513
emit @ index.es6.js:112
triggerContentChange @ model.js:352
_onCellsChanged @ model.js:303
d @ index.es6.js:555
e.emit @ index.es6.js:513
emit @ index.es6.js:112
(anonymous) @ celllist.js:136
_onSharedModelChanged @ celllist.js:136
d @ index.es6.js:555
e.emit @ index.es6.js:513
emit @ index.es6.js:112
C._onYCellsChanged @ ynotebook.js:171
o @ function.js:19
pe @ yjs.mjs:1955
Xn @ yjs.mjs:4916
_callObserver @ yjs.mjs:5684
(anonymous) @ yjs.mjs:3212
o @ function.js:19
un @ yjs.mjs:3242
gn @ yjs.mjs:3368
transact @ yjs.mjs:525
transact @ ydocument.js:164
fromJSON @ ynotebook.js:453
fromJSON @ model.js:279
(anonymous) @ context.js:553
Promise.then (async)
_revert @ context.js:547
initialize @ context.js:203
(anonymous) @ manager.js:550
Promise.then (async)
_createOrOpenDocument @ manager.js:550
open @ manager.js:374
openOrReveal @ manager.js:401
handleOpen @ listing.js:976
evtDblClick @ listing.js:1185
handleEvent @ listing.js:594
Show 86 more frames
Show less
index.js:51 Pyodide contents will be synced with Jupyter Contents
pyodide.asm.js:9 Loading micropip, packaging
pyodide.asm.js:9 Loaded micropip, packaging
pyodide.asm.js:9 Loading ssl, openssl
pyodide.asm.js:9 Loaded openssl, ssl
pyodide.asm.js:9 Loading sqlite3
pyodide.asm.js:9 Loaded sqlite3
pyodide.asm.js:9 Loading Pygments, decorator, jedi, parso, six
pyodide.asm.js:9 Loaded Pygments, decorator, jedi, parso, six
336.0a90bd910629a565bb7e.js?v=0a90bd910629a565bb7e:1 Failed to fetch ipywidgets through the "jupyter.widget.control" comm channel, fallback to fetching individual model state. Reason: Control comm did not respond in time
overrideMethod @ console.js:213
_loadFromKernel @ 336.0a90bd910629a565bb7e.js?v=0a90bd910629a565bb7e:1
await in _loadFromKernel (async)
_loadFromKernel @ 134.fe2572ece3b7955c89bb.js?v=fe2572ece3b7955c89bb:1
restoreWidgets @ 134.fe2572ece3b7955c89bb.js?v=fe2572ece3b7955c89bb:1
Show 1 more frame
Show less
pyodide.asm.js:9 six already loaded from default channel
pyodide.asm.js:9 packaging already loaded from default channel
pyodide.asm.js:9 Loading matplotlib, cycler, fonttools, kiwisolver, numpy, Pillow, pyparsing, python-dateutil, pytz, matplotlib-pyodide
pyodide.asm.js:9 Loaded Pillow, cycler, fonttools, kiwisolver, matplotlib, matplotlib-pyodide, numpy, pyparsing, python-dateutil, pytz

Make the repo compatible with Netlify

It looks like the only thing needed to make that repo automatically deployable on Netlify (for folks generating theirs with the template) is to add a runtime.txt file with the following content:

3.7

To make sure to be using Python 3.7.

And then specify the build command in the "Deploy Settings":

jupyter lite build --output-dir dist --debug

image

Demo notebook is misleading

The demo notebook is misleading - when I tried running the demo locally at least, there is a lot of whitespace at the top of the notebook that makes it look like the page is blank (and broken....)

image

Are the line breaks in the notebook for a reason?

image

ipywidgets fails to install in jupyterlite/demo deployment with Pyodide kernel (3rd time)

Hello,

This is, as far as I understand, the return of issues #97 and #127 about ipywidgets failing to install in the Jupyterlite demo deployment with Pyodide kernel.

Reproduce

In the Jupyterlite demo, with the Pyodide kernel based notebook, running the cell magic

%pip install ipywidgets

(or its function based equivalent await piplite.install(['ipywidgets'])) yields an error:

ValueError: Can't find a pure Python 3 wheel for 'widgetsnbextension~=4.0.10'.
See: https://pyodide.org/en/stable/usage/faq.html#why-can-t-micropip-find-a-pure-python-wheel-for-a-package
You can use `await micropip.install(..., keep_going=True)` to get a list of all packages with missing wheels.

Context

  • JupyterLite version: latest version deployed in the demo. Looking at requirements.txt, I see
jupyterlite-core==0.2.3
jupyterlab~=4.0.11

# Python kernel (optional)
jupyterlite-pyodide-kernel==0.2.3

....
# Python: ipywidget library for Jupyter notebooks (optional)
ipywidgets>=8.1.1,<9

Demo notebook of things that don't (yet) work

Problem

Many potential users of jupyterlite are likely to consider themselves "notebook users" rather than developers. This template repo helps provide an on-ramp to unexperienced users with a way to get started with their own deployment of jupyterlite, as well as exploring what's possible via the demo notebooks.

Such users might be consider themselves "notebook users" rather than developers and might be frustrated if things they expect to work don't (yet) work.

It might be useful to have a notebook of "not yet working" examples of things that folk are likely to try but that don't yet work, with workarounds if available, perhaps with a brief explanation of why they don't (yet) work.

See also: jupyterlite/jupyterlite#199

Suggested Improvement

Create a notebook with a set of "not yet working" items.

For example:

  • %pip not available [related issue]
  • pd.read_csv() file not found; sqliite file not found etc. [related issue]
  • shell commands and line magics that make use of shell commands won't work

Pyodide blocked by CORS

Description

The demo does not load Pyodide due to the CDN request being blocked by CORS. As a result, you cannot use a Python terminal or execute notebooks that require a working Python kernel.

The problem happens both on Firefox 123.0 and Ungoogled Chromium 95.0.4638.54.

Reproduce

  1. Using Firefox or Ungoogled Chromium, open any of the JupyterLite live demos at:
  2. Under "Console", click "Python (Pyodide).

Result: Python terminal tries to start but hangs. Browser's network analysis shows "CORS Failed" on some Pyodide resources (image below), even though when requesting them separately I can see that they do have access-control-allow-origin: * headers set, which shouldn't cause CORS errors.

jupyterlite-pyodide-cors-failed

Note: if you try to open and execute a notebook that uses Python, the execution is blocked forever waiting for the kernel, too.

Expected behavior

A working Python terminal.

Context

  • JupyterLite version: do not know, it's the one currently deployed as "latest" at the demo site. Console suggests it's 0.3.0-beta. I also tried running JupyterLite locally, version, 0.2.3, with the same result.
  • Operating System and version: unknown
  • Browser and version: tested with Fifefox 123.0 and Ungoogled Chromium 95.0.4638.54. on 64-bit Linux
Browser Output
Unsatisfied version 0.3.0-beta.0 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlite/kernel (required ~0.1.0-beta.18) remoteEntry.9117113815033289c4d5.js:1:5416
Unsatisfied version 6.1.2 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlab/coreutils (required ^5.5.2) remoteEntry.9117113815033289c4d5.js:1:5416
Unsatisfied version 2.1.2 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/coreutils (required ^1.11.0) remoteEntry.9117113815033289c4d5.js:1:5416
Unsatisfied version 0.3.0-beta.0 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlite/kernel (required ~0.2.0) consumes:73:61
Unsatisfied version 0.3.0-beta.0 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlite/contents (required ~0.2.0) consumes:73:61
Unsatisfied version 0.3.0-beta.0 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @jupyterlite/server (required ~0.2.0) consumes:73:61
Unsatisfied version 2.0.1 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/messaging (required ^1.10.0) remoteEntry.ade722230aea9b7793b2.js:1:6037
Unsatisfied version 2.3.1 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/widgets (required ^1.37.2) remoteEntry.ade722230aea9b7793b2.js:1:6037
Unsatisfied version 6.0.5 from @jupyter-widgets/jupyterlab-manager of shared singleton module @jupyter-widgets/base (required ^1.1.10 || ^2 || ^3 || ^4.0.0) remoteEntry.03390b18ed36b245b514.js:1:6189
Unsatisfied version 2.0.1 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/messaging (required ^1.10.0) remoteEntry.edc72ee71d4ec67598f6.js:1:7822
Unsatisfied version 2.3.1 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/widgets (required ^1.37.2) remoteEntry.edc72ee71d4ec67598f6.js:1:7822
Unsatisfied version 6.0.5 of shared singleton module @jupyter-widgets/base (required ^1 || ^2 || ^3 || ^4) remoteEntry.1ea7cdec7b0be3c5b34d.js:1:5546
Unsatisfied version 6.0.5 of shared singleton module @jupyter-widgets/base (required ^1 || ^2 || ^3 || ^4) remoteEntry.b8f540aa2b45806d9156.js:1:5346
Unsatisfied version 4.2.2 of shared singleton module @jupyterlab/apputils (required ^3.6.3) remoteEntry.b8f540aa2b45806d9156.js:1:5346
Unsatisfied version 2.3.1 from _JUPYTERLAB.CORE_OUTPUT of shared singleton module @lumino/widgets (required ^1.37.2) remoteEntry.f294278414d0a929e4ae.js:1:5956
JupyterLite ServiceWorker was already registered service-manager.js:40:20
Kernel filesystem and JupyterLite contents will be synced index.js:192:24
XHRGET
https://jupyterlite.readthedocs.io/en/latest/_static/github?1709501994416
[HTTP/1.1 404  0ms]

The JupyterLab GitHub server extension appears to be missing. If you do not install it with application credentials, you are likely to be rate limited by GitHub very quickly 958.22edf3675e77b075de5c.js:1:921
Referrer Policy: Die weniger eingeschränkte Referrer Policy "no-referrer-when-downgrade" für die Website-übergreifende Anfrage wird ignoriert: https://api.github.com/repos/jupyterlite/jupyterlite/contents? 958.22edf3675e77b075de5c.js:1:5310
Pyodide contents will be synced with Jupyter Contents index.js:51:28
Starting WebSocket: wss://jupyterlite.readthedocs.io/en/latest/_static/api/kernels/908f35cb-8f4b-4002-895e-bc8707c7c2af 3 default.js:69:20
wasm instantiation failed! pyodide.js:9:8837
TypeError: NetworkError when attempting to fetch resource. pyodide.js:9:8880
TypeError: NetworkError when attempting to fetch resource.
TypeError: NetworkError when attempting to fetch resource.

Configurations are not updated via overrides.json

Description

Including an overrides.json file as explained here does not seem to have any effect.

Reproduce

For example, including the following should change the default theme but does not sort the desired effect (that is setting the theme by default to 'Darcula'):

   {
  "@jupyterlab/apputils-extension:themes": {
    "theme": "Darcula"
  }
}

Context

  • JupyterLite version: 0.1.0b8
  • Operating System and version: Mac OS Catalina 10.15.7
  • Browser and version: Safari, Chrome, Firefox (latest)

Creating static html file from this repository and host it locally with apache html server

Description

I apologize, I don't think this is necessarily a bug, but It may help to clarify in the docs if this is expected. I'm trying to create a jupyterlite static html site of this repo and self host with apache web server.

Reproduce

  • Clone this repo
  • Create a new conda environment python 3.10
  • Install requirements.txt
  • run: jupyter lite serve --contents content
  • copy _output folder to server with apache
  • Jupyterlite works fine but the filesystem is not synced. I see in the browser console this error.

image

*There is no problem if I serve it locally with the jupyter lite serve --contents content that starts a webserver on 8000 port

Expected behavior

Not sure if just by copying the static content and serving with apache is enough for jupyterlite to work. looks like the only think that does not work is the synchronization of the kernel and the jupyterlab filesystem.

pre-install pure python package in static html site

Problem

Not sure if this is possible but I could not figure how to pre-install a pure python package on my jupyterlite static html site.
The example is here:

https://marcocaggioni.github.io/rheolite/lab/index.html

in the notebook the first cell is to micropip install lmfit which works fine but takes some time:

import micropip
await micropip.install('lmfit')

Suggested Improvement

If not yet there and if possible would be nice to have in the documentation a section explaining how to pre-install packages

thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.