Add Google Colab integration to documentation and tutorials#1754
Add Google Colab integration to documentation and tutorials#1754nishantraghuvanshi wants to merge 1 commit intobrian-team:masterfrom
Conversation
This commit adds Google Colab support alongside existing Binder integration, making it easier for users to try Brian2 in the cloud without local installation. Changes: - Added Google Colab badge to README.md in Quickstart section - Added Google Colab badge to docs_sphinx/index.rst alongside Binder - Updated text to mention both Binder and Google Colab services - Added Colab environment detection to all 3 tutorial notebooks - Notebooks now auto-install Brian2 when running in Google Colab The implementation uses direct GitHub→Colab linking (no separate repository needed like brian2-binder). Tutorial notebooks detect the Colab environment and automatically install Brian2, providing a seamless user experience. Addresses brian-team#1214
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
Hi @nishantraghuvanshi, thanks for your work on this! I need to have a closer look at this, but I think I'd prefer having this a bit more automized. In our current documentation, we have links to open the three tutorials on binder.org: https://brian2.readthedocs.io/en/stable/resources/tutorials/index.html and we also add an automatic banner to open each example, see e.g. https://brian2.readthedocs.io/en/stable/examples/COBAHH.html The advantage of a separate repository is that we can add the header with the |
|
Hi @mstimberg, thanks a lot for the detailed feedback. You bring up some great points, so I gave this a bit more thought. Here's what I think could work well: 1. Proposed solution: two-part automationMy current idea is to automate both the badges and the installation step. Part 1: automated badges (via Sphinx)
Part 2: automated installation (separate repository)
2. Alternative: build-time injectionIf maintaining a separate repository feels like too much overhead, I could instead look into injecting the installation cell during the existing 3. A few questions before I proceed
I’m flexible and happy to go with whatever fits best into Brian2's workflow, just wanted to run this by you first. Thanks again for taking the time to review this! P.S. I'm also working on issue #1219 (Statements substitution), please do give your suggestions on that if you have the time. Thanks |
|
Hi again, sorry for not being more reactive on this issue. I'm still a bit hesitant, since we are thinking about overhauling the documentation system more globally (see e.g. #610) , and I don't want you to work on something that becomes obsolete soon. Having a separate repository is certainly a possibility, but it would be a bit different from the brian2-binder repository: for collab, we'd actually need the notebooks in the repo, whereas the brian2-binder repository only creates the notebooks as part of the |
This commit adds Google Colab support alongside existing Binder integration,
making it easier for users to try Brian2 in the cloud without local installation.
Changes:
The implementation uses direct GitHub→Colab linking (no separate repository
needed like brian2-binder). Tutorial notebooks detect the Colab environment
and automatically install Brian2, providing a seamless user experience.
Addresses #1214