Skip to content

Conversation

@agriyakhetarpal
Copy link
Member

@agriyakhetarpal agriyakhetarpal commented Jan 1, 2025

Description

This pull request exposes functionality added upstream via jupyterlite/jupyterlite#1547 and released in jupyterlite-core version 0.5.0.

In particular, this enables the act of enabling/disabling the code execution for the Replite directive, so it is now possible for the REPL not to load the Pyodide kernel automatically and instead wait for the user's input. It can be controlled via the replite_auto_execute option globally or via the :execute: [True/False] option on a per-directive basis as an override. This appends &execute=0 to the REPL URL if False.

It is to be noted that while we support jupyterlite-core >=0.2,<0.6 via #238, this option requires jupyterlite >= 0.5 to work, and there is no effect for versions prior to jupyterlite-core 0.5.

Closes #244

Changes made

  • The addition of a replite_auto_execute global configuration option, an :execute: option for the Replite directive, and corresponding URL handling
  • Both options documented for readers

Additional context

This will help us make progress on matplotlib/matplotlib#22634

@agriyakhetarpal agriyakhetarpal added the enhancement New feature or request label Jan 1, 2025
@agriyakhetarpal agriyakhetarpal changed the title Allow enabling/disabling REPL code execution in Replite Allow enabling/disabling REPL code execution in the Replite directive Jan 1, 2025
@agriyakhetarpal agriyakhetarpal added this to the 0.18.0 milestone Jan 2, 2025
@agriyakhetarpal
Copy link
Member Author

Thanks for the reviews – rebasing and applying the suggested changes in a moment

@agriyakhetarpal agriyakhetarpal marked this pull request as ready for review January 9, 2025 20:48
@agriyakhetarpal agriyakhetarpal mentioned this pull request Jan 9, 2025
3 tasks
@Carreau Carreau merged commit 0a0d5a0 into jupyterlite:main Jan 13, 2025
6 checks passed
@agriyakhetarpal agriyakhetarpal deleted the feat/no-execute-replite-kernel branch January 13, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port no_execute option for the Replite directive

3 participants