Skip to content

ENH: Add Binder launch and live-code buttons to each tutorial - #323

Merged
bsipocz merged 2 commits into
numpy:mainfrom
InessaPawson:305-binder
Dec 3, 2026
Merged

bsipocz merged 2 commits into
numpy:mainfrom
InessaPawson:305-binder

Conversation

@InessaPawson

Copy link
Copy Markdown
Member

Adds per-tutorial launch buttons via the book theme's Jupyter integration. Closes #305.

NB: The buttons point at main, so postBuild takes effect only after this merges. Until then, clicking the rocket in the CircleCI preview opens the tutorial as plain Markdown.

@InessaPawson
InessaPawson force-pushed the 305-binder branch 2 times, most recently from 1e33463 to 668c9ce Compare December 1, 2026 16:55

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall looks good, I only wonder about the placement of the config file

Comment thread .binder/postBuild

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we maybe put this file in a .binder directory, just to stay a bit more organized?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@bsipocz @rossbar I've looked into it. Once .binder/ exists, repo2docker only reads config from there, so environment.yml would have to move to the folder as well. Would that work for you?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What I have elsewhere is that the requirements file in .binder is referencing the one in the top level directory. Now, I believe that may not work with conda env files, but then maybe it's a good time that we ditch the otherwise duplicate environment.yml?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@bsipocz I'd prefer to have a single source of truth for dependencies as well. I'll check if we can drop environment.yml without affecting existing workflows.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1 for dropping environment.yml - now that folks have so many other environment management options that wrap conda (and are flexible enough to handle all the different env specification patterns), I think we're in a much better position to drop tooling-specific specs.

@bsipocz

bsipocz commented Dec 2, 2026

Copy link
Copy Markdown
Member

Note that the preview link is not working, we should remove the index.html from the URL for the more recent JB releases.

I'm merging #324 that actually addresses it as well as updates the infrastructure, once that is in, rebasing this should make it work.

(OTOH, it would be fine and enough to just manually delete index.html here, review, and merge this.)

@InessaPawson

Copy link
Copy Markdown
Member Author

@bsipocz @rossbar I've moved postBuild into .binder/ and removed environment.yml. Ready for another review.

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@bsipocz
bsipocz merged commit c1df81b into numpy:main Dec 3, 2026
8 checks passed
github-actions Bot pushed a commit that referenced this pull request Dec 3, 2026
ENH: Add Binder launch and live-code buttons to each tutorial c1df81b
@InessaPawson
InessaPawson deleted the 305-binder branch December 3, 2026 21:00
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.

ENH: add binder/thebe link for each notebook

3 participants