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

Jupytext notebook support #1245

Closed
choldgraf opened this issue May 28, 2024 · 3 comments
Closed

Jupytext notebook support #1245

choldgraf opened this issue May 28, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@choldgraf
Copy link
Collaborator

choldgraf commented May 28, 2024

Currently, we only support text-based notebooks via the {code-cell} directive and {eval} role. Jupyter Book v1 supports any file format that Jupytext supports, which is a wide variety of text-based notebook formats.

I don't see any mention of Jupytext support in the docs, so assume that it isn't supported right now.

Suggestion

We should either:

  • Support Jupytext formats as a general principle for notebook execution and reading.
  • Define the few jupytext formats that are most common and support them
  • Explicitly agree to drop jupytext support in v2.
@choldgraf choldgraf added the enhancement New feature or request label May 28, 2024
@agoose77
Copy link
Contributor

This is a great issue Chris, thanks!

@parmentelat
Copy link
Contributor

this issue resonates particularly strongly with me as I only write jupytext notebooks, given how git-unfriendly the ipynb format can turn out to be :)

hence I'd clearly advocate option 1 / full support as far as possible; this being said fyi, md:myst and py:percent would already account for a substantial coverage of my current courseware, the remaining being javascript and bash; but that's just me I guess :)

one other thing that has been discussed in other places was, it could be nice to be able to define a naming scheme that can tell notebooks from regular documents
in my case for example, over time I have gone for *-nb.py or similar (which is helpful for humans too:), it would be nice to be able to configure just that when initializing the book; maybe something like

jupytext_patterns:
  - *-nb.py
  - *-nb.md

somewhere in myst.yml

@agoose77
Copy link
Contributor

I've circled back to this after a meeting with Chris. I propose that we drop non-MyST notebook support for our MVP. Adding support for jupytext will involve either using something like pyodide to "get it for free", or more likely manually implementing support for each file format in MyST.

For now, there is a Python tool that can convert between flavours, and most people shouldn't need a choice; MyST-flavour notebooks (MyST Markdown files) are supported out of the box, and provide a clear way to do things.

I'm closing this, but anyone in disagreement can re-open.

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

No branches or pull requests

3 participants