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

Add Jupytext requirement for binder. #217

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Conversation

Carreau
Copy link
Contributor

@Carreau Carreau commented Jun 18, 2024

I think binder looks at env.yaml not at requirements.txt maybe that's the reason that binder don't have jupytext installed

I think binder looks at env.yaml not at requirements.txt maybe that's
the reason that binder don't have jupytext installed
Copy link
Member

@melissawm melissawm left a comment

Choose a reason for hiding this comment

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

Let's try - I think it makes sense. Thanks @Carreau !

@melissawm melissawm merged commit 49b3303 into numpy:main Jun 18, 2024
12 checks passed
@melissawm
Copy link
Member

Looks like this works - in any case we still need to "Open as notebook"
Captura de imagem_20240618_153108

@bsipocz
Copy link
Member

bsipocz commented Jun 18, 2024

what about jupyterlab-myst, would that fix this?

@rowanc1
Copy link
Contributor

rowanc1 commented Jun 18, 2024

You will still need jupytext, and to open as notebook with jupyterlab-myst, the tools are designed to work together. If you want the experience for users to be simpler, you could potentially render out the (pre-executed) notebooks, and have that be the Jupyter experience that gets started.

@bsipocz
Copy link
Member

bsipocz commented Jun 18, 2024

you could potentially render out

you mean an ipynb notebook? (That is what I do with astroML and really don't like the process/setup to have both mb and ipynb (but also, I need the outputs at least for a couple of notebooks as some are too expensive to execute each time in CI)

@rowanc1
Copy link
Contributor

rowanc1 commented Jun 18, 2024

Yes, that is what I meant is automatically creating those for when people are interacting with the binder instance. I am not suggesting keeping those in git though! That would require some improvements/modifications to CI to enable that though.

@melissawm
Copy link
Member

melissawm commented Jun 18, 2024

@bsipocz
Copy link
Member

bsipocz commented Jun 18, 2024

We do that here, too, they are then pushed to the gh-pages branch along with the rendered htmls. Could binder be forced to pick up those ones?

https://github.com/numpy/numpy-tutorials/tree/gh-pages/_sources/content

@Carreau Carreau mentioned this pull request Jun 19, 2024
@rossbar
Copy link
Collaborator

rossbar commented Jun 19, 2024

I'd rather pursue client-side interactivity (ideally on the page itself) than put effort into adding .ipynb-formatted files for binder/jupyterhub support. I'd like to push towards a future where .md-formatted notebooks are natively supported. Jupytext is fantastic, and the implicit behind-the-scenes support for md->ipynb that makes this work currently is a critical component in a lot of the sustainable docs workflows (not only for server-side interactivity, but also for testing/linting, etc.).

@melissawm
Copy link
Member

I agree, I think that would be ideal. But as a compromise while that doesn't happen we can have binder point to the ipynb files. I'll try to poke around.

@rowanc1
Copy link
Contributor

rowanc1 commented Jun 19, 2024

In the new mystmd work we have put a lot of work into thebe which enables client-side interactivity (powered by jupyter, binder or jupyterlite). There are some docs on that here:

https://mystmd.org/guide/integrating-jupyter

Because the numpy tutorials are using well-supported packages, I think that adding jupyter: lite to the myst project config, might just work..?

We currently haven't enabled editing directly on the page yet, but it is on our roadmap.

Curious if @rossbar and @melissawm this is getting close to the direction you imagine?

@rossbar
Copy link
Collaborator

rossbar commented Jun 19, 2024

Curious if @rossbar and @melissawm this is getting close to the direction you imagine?

Indeed - this was one of the features from that was most compelling from my perspective! It's great to see that on-page interactivity is on the roadmap!

@melissawm
Copy link
Member

Yes, 100%! Should we follow that issue for updates?

@rowanc1
Copy link
Contributor

rowanc1 commented Jun 19, 2024

I am tracking the request from MyST's side here:

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.

5 participants