Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DOC: Add a JupyterLite-powered REPL to the Matplotlib documentation's landing page, and enable interactive galleries #29506

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

Open
wants to merge 37 commits into
base: main
Choose a base branch
Loading
from

Conversation

agriyakhetarpal
Copy link

@agriyakhetarpal agriyakhetarpal commented Jan 23, 2025

PR summary

Why is this change necessary?

This PR adds an (experimental) interactive REPL enabled by the JupyterLite project via the jupyterlite-sphinx Sphinx extension's Replite (.. replite::) directive to the Matplotlib documentation's landing page, therefore displaying an interactive showcase for users who would like to try out Matplotlib without needing to install anything on their machine.

What problem does it solve?

This is the first step of an initiative that aims to interactive documentation elements for Scientific Python projects' websites, therefore making it easier for newcomers to access (compiled) Scientific Python projects.

Please see more about it here: Scientific Python awarded CZI grant to improve communications infrastructure & accessibility

xref:

What is the reasoning for this implementation?

At the moment, the plan for adding interactive documentation to Matplotlib is three-fold (or two-fold?):

  • Add an interactive REPL as a playground for quick experimentation of Matplotlib code snippets; and
  • Enable Sphinx-Gallery's JupyterLite integration that has been disabled in this PR for now, so that a "lite" button can be added to the notebook galleries generated by Sphinx-Gallery to open the notebooks directly in JupyterLite (see Adding Binder links to the Matplotlib gallery #11415 (comment))
  • Further, use jupyterlite-sphinx's TryExamples directive make docstring-based examples interactive by adding a button to enable mini-notebooks that embed the API-based examples. However, I don't know if this applies to a project like Matplotlib, as the API reference here seldom seems to contain full-fledged/self-contained, and end-to-end examples, unlike NumPy or SciPy, and the galleries display most of the functionality of Matplotlib.

This PR is the first part of the plan.

Tip

The previous PR for these changes, #22634, made it through a few rounds of code review. I have tried to address those previous review comments here through further changes here, and a summary of the previous review(s) is available in this comment: #22634 (comment)

Note

Though Sphinx-Gallery's integration has been disabled for now to be added in a subsequent PR, the gallery is accessible through the JupyterLite deployment that is generated alongside Matplotlib's documentation build as a result of jupyterlite-sphinx.

PR checklist

@github-actions github-actions bot added the Documentation: build building the docs label Jan 23, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@agriyakhetarpal
Copy link
Author

agriyakhetarpal commented Jan 23, 2025

I'm facing a problem here locally with an environment from emscripten-forge. Trying out any of the notebooks, import matplotlib fails, as it has not been compiled with NumPy v2:

Full stack trace
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3075, in run_cell
    result = self._run_cell(
  File "/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3130, in _run_cell
    result = runner(coro)
  File "/lib/python3.11/site-packages/IPython/core/async_helpers.py", line 128, in _pseudo_sync_runner
    coro.send(None)
  File "/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3334, in run_cell_async
    has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
  File "/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3517, in run_ast_nodes
    if await self.run_code(code, result, async_=asy):
  File "/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/xpython_42/3572740712.py", line 1, in <module>
    import matplotlib.pyplot as plt
  File "/lib/python3.11/site-packages/matplotlib/__init__.py", line 161, in <module>
    from . import _api, _version, cbook, _docstring, rcsetup
  File "/lib/python3.11/site-packages/matplotlib/rcsetup.py", line 27, in <module>
    from matplotlib.colors import Colormap, is_color_like
  File "/lib/python3.11/site-packages/matplotlib/colors.py", line 57, in <module>
    from matplotlib import _api, _cm, cbook, scale
  File "/lib/python3.11/site-packages/matplotlib/scale.py", line 22, in <module>
    from matplotlib.ticker import (
  File "/lib/python3.11/site-packages/matplotlib/ticker.py", line 143, in <module>
    from matplotlib import transforms as mtransforms
  File "/lib/python3.11/site-packages/matplotlib/transforms.py", line 49, in <module>
    from matplotlib._path import (
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[1], line 1
----> 1 import matplotlib.pyplot as plt
      2 import numpy as np
      4 from matplotlib.patches import Arc

File /lib/python3.11/site-packages/matplotlib/__init__.py:161
    157 from packaging.version import parse as parse_version
    159 # cbook must import matplotlib only within function
    160 # definitions, so it is safe to import from it here.
--> 161 from . import _api, _version, cbook, _docstring, rcsetup
    162 from matplotlib.cbook import sanitize_sequence
    163 from matplotlib._api import MatplotlibDeprecationWarning

File /lib/python3.11/site-packages/matplotlib/rcsetup.py:27
     25 from matplotlib import _api, cbook
     26 from matplotlib.cbook import ls_mapper
---> 27 from matplotlib.colors import Colormap, is_color_like
     28 from matplotlib._fontconfig_pattern import parse_fontconfig_pattern
     29 from matplotlib._enums import JoinStyle, CapStyle

File /lib/python3.11/site-packages/matplotlib/colors.py:57
     55 import matplotlib as mpl
     56 import numpy as np
---> 57 from matplotlib import _api, _cm, cbook, scale
     58 from ._color_data import BASE_COLORS, TABLEAU_COLORS, CSS4_COLORS, XKCD_COLORS
     61 class _ColorMapping(dict):

File /lib/python3.11/site-packages/matplotlib/scale.py:22
     20 import matplotlib as mpl
     21 from matplotlib import _api, _docstring
---> 22 from matplotlib.ticker import (
     23     NullFormatter, ScalarFormatter, LogFormatterSciNotation, LogitFormatter,
     24     NullLocator, LogLocator, AutoLocator, AutoMinorLocator,
     25     SymmetricalLogLocator, AsinhLocator, LogitLocator)
     26 from matplotlib.transforms import Transform, IdentityTransform
     29 class ScaleBase:

File /lib/python3.11/site-packages/matplotlib/ticker.py:143
    141 import matplotlib as mpl
    142 from matplotlib import _api, cbook
--> 143 from matplotlib import transforms as mtransforms
    145 _log = logging.getLogger(__name__)
    147 __all__ = ('TickHelper', 'Formatter', 'FixedFormatter',
    148            'NullFormatter', 'FuncFormatter', 'FormatStrFormatter',
    149            'StrMethodFormatter', 'ScalarFormatter', 'LogFormatter',
   (...)
    155            'MultipleLocator', 'MaxNLocator', 'AutoMinorLocator',
    156            'SymmetricalLogLocator', 'AsinhLocator', 'LogitLocator')

File /lib/python3.11/site-packages/matplotlib/transforms.py:49
     46 from numpy.linalg import inv
     48 from matplotlib import _api
---> 49 from matplotlib._path import (
     50     affine_transform, count_bboxes_overlapping_bbox, update_path_extents)
     51 from .path import Path
     53 DEBUG = False

ImportError: numpy.core.multiarray failed to import

Forcing numpy>=2 in jupyterlite_environment.yml does not seem to help, but emscripten-forge does have it at >=2: https://github.com/emscripten-forge/recipes/blob/main/recipes/recipes_emscripten/numpy/recipe.yaml since quite some time now, so I'm not sure what I'm doing wrong.

@martinRenou
Copy link
Member

What you are having here is weird.

A fresh deployment we have on the official jupyterlite-xeus docs works well https://jupyterlite-xeus.readthedocs.io/en/latest/lite/lab/index.html

image

This is the env file used: https://github.com/jupyterlite/xeus/blob/main/docs/environment.yml

You can see the logs for building the docs here

It seems numpy 1.25.2 was pulled there

@github-actions github-actions bot added Documentation: examples files in galleries/examples Documentation: devdocs files in doc/devel labels Jan 23, 2025
@agriyakhetarpal
Copy link
Author

Thanks for the feedback, @martinRenou! I pinned NumPy to <2 in d8d63da until emscripten-forge/recipes#1766 can be resolved.

Why are you surprised by this? The https://repo.mamba.pm/emscripten-forge channel should only contain packages built with 3.1.45. Otherwise, that's a bug.

I was surprised because many of the recent PRs that were auto-merged in https://github.com/emscripten-forge/recipes target other branches, such as https://github.com/emscripten-forge/recipes/tree/emscripten-3.1.58 or https://github.com/emscripten-forge/recipes/tree/emscripten-3.1.73, so I was confused that the https://repo.mamba.pm/emscripten-forge channel was still at 3.1.45. It's clearer after I've learned that other channels, such as https://prefix.dev/channels/emscripten-forge-dev exist, too.

Thanks for working on this, I'am very excited!

I know that the grant says to drop it into the docs landing page, but I'm wondering if either on matplotlib/mpl-brochure-site (to replace the existing binder link) or the gallery landing page (because it gets way more traffic views.scientific-python.org/matplotlib.org) makes more sense.

Thanks, @story645! The grant doesn't necessarily mention a specific location – any page is fine to me. I don't have access to that Plausible Analytics page; could you please export a brief view of the stats? Of course, I trust your judgement, though. I proposed the same idea of a "Try with JupyterLite" button on the brochure site in #22634 (comment), although I opine that we should keep the existing Binder button next to it and not remove it right now, as JupyterLite is going to stay experimental for some time. I've moved this console to a section before https://matplotlib.org/stable/gallery/index.html#lines-bars-and-markers in 3faa465, so that it is relatively at the top of the page and not hidden away at the end of the page where readers need to scroll away to.

@story645
Copy link
Member

That page should be public but this is the important part:

Screenshot_20250123-143818.png

Stable index only gets about 24.5k views.

I've moved this console to a section before https://matplotlib.org/stable/gallery/index.html#lines-bars-and-markers in 3faa465, so that it is relatively at the top of the page and not hidden away at the end of the page where readers need to scroll away to.

I'd put it under the tagging note -> does it work in a drop down so folks can collapse it if they don't need it?

@QuLogic
Copy link
Member

QuLogic commented Jan 23, 2025

Build fails:

[LiteBuildApp] ERROR | [lite] [post_build] [jupyterlite-xeus] [ERR] [Errno 2] No such file or directory: '/home/circleci/.pyenv/versions/3.12.8/share/empack/empack_config.yaml'
Traceback (most recent call last):
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/doit_cmd.py", line 294, in run
    return command.parse_execute(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/cmd_base.py", line 150, in parse_execute
    return self.execute(params, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/cmd_base.py", line 570, in execute
    return self._execute(**exec_params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/cmd_run.py", line 265, in _execute
    return runner.run_all(self.control.task_dispatcher())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/runner.py", line 254, in run_all
    self.run_tasks(task_dispatcher)
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/runner.py", line 213, in run_tasks
    node = task_dispatcher.generator.send(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/control.py", line 629, in _dispatcher_generator
    next_step = node.step()
                ^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/control.py", line 336, in step
    return next(self.generator)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/control.py", line 345, in _func
    for value in decorated(*args, **kwargs):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/control.py", line 473, in _add_task
    new_tasks = generate_tasks(to_load, task_gen, ref.__doc__)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/loader.py", line 390, in generate_tasks
    for task_dict, x_doc in flat_generator(gen_result, gen_doc):
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/loader.py", line 27, in flat_generator
    for item in gen:
                ^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 138, in _delayed_gather
    yield from _gather()
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 131, in _gather
    raise error
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 123, in _gather
    for task in getattr(addon, attr)(self):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 141, in post_build
    yield from self.copy_kernels_from_prefix()
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 193, in copy_kernels_from_prefix
    yield from self.copy_kernel(kernel_dir, kernel_wasm, kernel_js, kernel_data)
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 303, in copy_kernel
    yield from self.pack_prefix(kernel_dir=kernel_dir)
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 328, in pack_prefix
    pack_kwargs["file_filters"] = pkg_file_filter_from_yaml(DEFAULT_CONFIG_PATH)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/empack/file_patterns.py", line 86, in pkg_file_filter_from_yaml
    with open(path) as pack_config_file:
         ^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/circleci/.pyenv/versions/3.12.8/share/empack/empack_config.yaml'
[LiteBuildApp] Exiting application: jupyter

Traceback (most recent call last):
  File "/home/circleci/.local/lib/python3.12/site-packages/sphinx/events.py", line 404, in emit
    results.append(listener.handler(self.app, *args))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_sphinx/jupyterlite_sphinx.py", line 1050, in jupyterlite_build
    completed_process: CompletedProcess[bytes] = subprocess.run(
                                                 ^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.8/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,

@story645
Copy link
Member

story645 commented Jan 23, 2025

Put this on the call today to try and avoid sending @agriyakhetarpal on a page changing goose chase (sorry if you started already 😓). Consensus was leave it on doc/index.html for now and the priority is making sure it builds and to avoid putting heavy network load on the docs.

@martinRenou
Copy link
Member

martinRenou commented Jan 24, 2025

/home/circleci/.pyenv/versions/3.12.8/share/empack/empack_config.yaml

Weird that it's looking for the empack config there. Did you activate the micromamba env properly?

putting heavy network load

Adding a note that with the current setup, it's only when the user explicitly clicks on the button that the JupyterLite page loads.

.yamllint.yml Outdated Show resolved Hide resolved
doc/conf.py Show resolved Hide resolved
doc/devel/MEP/MEP12.rst Outdated Show resolved Hide resolved
@@ -0,0 +1,7 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a jupyter-lite.json and jupyter_lite_config.json? These seem redundantly (or at least non-descriptively) named.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've always been confused about this myself. One is for the CLI, one is for the JupyterLite frontend. The naming is pretty bad.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JupyterLite CLI is a traitlets based app, so jupyter_lite_config.json follows the naming convention as other apps, like voila.json or jupyter_server_config.json. It is indeed for build time configuration (when running the JupyterLite CLI, for example with jupyter lite build).

jupyter-lite.json is for runtime configuration when loading the page. It is similar to the page_config.json used in JupyterLab.

Agree this can be confusing. Maybe JupyterLite could also support loading page_config.json files so users could choose a different name for the file?

For more information: https://jupyterlite.readthedocs.io/en/stable/howto/configure/config_files.html

@@ -767,6 +780,23 @@ def js_tag_with_cache_busting(js):
1),
]

# JupyterLite config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way this can be disabled by default and enabled by a flag? This could be set on CI and in release mode. I'm not sure we want to be paying the build costs locally for every developer. But since the build failed, I'm not sure exactly how large that build time cost is, so it could be negligible for all I know.

Copy link
Author

@agriyakhetarpal agriyakhetarpal Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build time cost is around ~15 seconds for me locally, which seems negligible in comparison to the rest of the docs build – I've been building with html-noplot at this time, so it would even lesser of a fraction with CI builds which would be longer.

But to answer whether this can be disabled, I can check for the DEVDOCS and is_release_build constants so that this is avoided on local builds, as this concern was also raised from the perspective of downstream packagers in the older PR #22634. It could make debugging a build that's failing in CI a bit of a pain, though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, let's see how long it ends up taking first.

@github-actions github-actions bot removed the Documentation: devdocs files in doc/devel label Jan 24, 2025
@github-actions github-actions bot removed the Documentation: examples files in galleries/examples label Jan 24, 2025
@agriyakhetarpal
Copy link
Author

Put this on the call today to try and avoid sending @agriyakhetarpal on a page changing goose chase (sorry if you started already 😓). Consensus was leave it on doc/index.html for now and the priority is making sure it builds and to avoid putting heavy network load on the docs.

No worries, and thanks for prioritising this in the call, @story645! I would have been happy to attend the Matplotlib Documentation Meeting myself and seek feedback from folks, but unfortunately, based on https://scientific-python.org/calendars/, it's past midnight for me. I hope there can be more times for the meetings that can cater to the SEA region, someday.

I've kept the REPL on the index page with f0d4de4 as suggested, and yes, as Martin mentioned, the REPL loads only when someone clicks on the "Try it" button. As an additional safeguard, the URL parameter for the iframe also has &execute=0 in it via the execute: False option for the directive, so one has to explicitly press shift + Enter in the code snippet prompt for any computation to proceed.

@agriyakhetarpal
Copy link
Author

Weird that it's looking for the empack config there. Did you activate the micromamba env properly?

I haven't yet. I'm not sure if we'll want to switch the CircleCI config to using a micromamba environment, if we were to activate it before the mpl-install step. Could you please clarify, @martinRenou?

Maybe it looks in the share/ directory because CircleCI is using pyenv?

@martinRenou
Copy link
Member

I haven't yet. I'm not sure if we'll want to switch the CircleCI config to using a micromamba environment, if we were to activate it before the mpl-install step. Could you please clarify, @martinRenou?

Ah sorry I thought you were using the environment.yml for that build, but it's a pyenv and you use requirements/doc/doc-requirements.txt file for it?

I'm wondering where empack installed its config file in there, maybe it was installed in the wrong place, or it's looking in the wrong place.

@agriyakhetarpal
Copy link
Author

agriyakhetarpal commented Jan 24, 2025

I think it's placing it in an appropriate location:

https://github.com/emscripten-forge/empack/blob/a6eeb3cf369d2c267aca89bf450b4ed1a2a13729/empack/pack.py#L19

but we aren't in a virtual environment, and pyenv probably has a different sys.prefix, and hence the incorrect lookup.

@agriyakhetarpal
Copy link
Author

That said, I feel empack could look in platformdirs's user_config_dir instead, as it would be consistent across these oddities: https://github.com/tox-dev/platformdirs#platformdirs-to-the-rescue

@agriyakhetarpal
Copy link
Author

I created a PR to do that for empack above, which should fix the problem here when released. I can explore why the virtual environment goes missing in the meantime...

@martinRenou
Copy link
Member

martinRenou commented Jan 27, 2025

I created a PR to do that for empack above, which should fix the problem here when released. I can explore why the virtual environment goes missing in the meantime...

Thanks! empack 5.0.4 is out now on PyPi, if you want to try. For the conda package you may need to wait another hour.

@agriyakhetarpal
Copy link
Author

agriyakhetarpal commented Jan 28, 2025

We now have another error in jupyterlite-xeus, coming from empack:

[LiteBuildApp] ERROR | [lite] [post_build] [jupyterlite-xeus] [ERR] expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/doit_cmd.py", line 294, in run
    return command.parse_execute(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/cmd_base.py", line 150, in parse_execute
    return self.execute(params, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/cmd_base.py", line 570, in execute
    return self._execute(**exec_params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/cmd_run.py", line 265, in _execute
    return runner.run_all(self.control.task_dispatcher())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/runner.py", line 254, in run_all
    self.run_tasks(task_dispatcher)
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/runner.py", line 213, in run_tasks
    node = task_dispatcher.generator.send(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/control.py", line 629, in _dispatcher_generator
    next_step = node.step()
                ^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/control.py", line 336, in step
    return next(self.generator)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/control.py", line 345, in _func
    for value in decorated(*args, **kwargs):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/control.py", line 473, in _add_task
    new_tasks = generate_tasks(to_load, task_gen, ref.__doc__)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/loader.py", line 390, in generate_tasks
    for task_dict, x_doc in flat_generator(gen_result, gen_doc):
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/doit/loader.py", line 27, in flat_generator
    for item in gen:
                ^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 138, in _delayed_gather
    yield from _gather()
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 131, in _gather
    raise error
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 123, in _gather
    for task in getattr(addon, attr)(self):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 141, in post_build
    yield from self.copy_kernels_from_prefix()
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 193, in copy_kernels_from_prefix
    yield from self.copy_kernel(kernel_dir, kernel_wasm, kernel_js, kernel_data)
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 303, in copy_kernel
    yield from self.pack_prefix(kernel_dir=kernel_dir)
  File "/home/circleci/.local/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 328, in pack_prefix
    pack_kwargs["file_filters"] = pkg_file_filter_from_yaml(DEFAULT_CONFIG_PATH)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.local/lib/python3.12/site-packages/empack/file_patterns.py", line 86, in pkg_file_filter_from_yaml
    with open(path) as pack_config_file:
         ^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not NoneType
[LiteBuildApp] Exiting application: jupyter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.