Skip to content

001550 PaganLab: Colab-ready behavior + optogenetics notebooks - #175

Merged
bendichter merged 1 commit into
masterfrom
001550-paganlab-colab-ready
Jun 16, 2026
Merged

001550 PaganLab: Colab-ready behavior + optogenetics notebooks#175
bendichter merged 1 commit into
masterfrom
001550-paganlab-colab-ready

Conversation

@bendichter

Copy link
Copy Markdown
Member

Makes the two Pagan Lab notebooks for DANDI:001550 runnable in Colab and green in CI. This is a cleaned-up version of the work in #136 (original notebooks by @weiglszonja); opening as a fresh PR from a branch in this repo.

Both notebooks pass CI end-to-end and were verified locally with .github/scripts/run_notebook.py (ok: true).

What's included:

  • The four Colab-bootstrap cells on each notebook (Colab badge, install intro, collapsed #@title display-mode: form install cell, restart admonition), per the #149 pattern documented in docs/adding-notebooks.md.
  • A fully pinned transitive lock generated via uv pip compile, constrained to Colab's preinstalled versions (numpy 2.0.2, matplotlib 3.10.0, networkx 3.6.1, pandas 2.2.2, h5py 3.16.0).
  • dandi resolves to 0.76.4. The DANDI server now rejects clients <0.74.0, and colab-preinstalled.txt pins click==8.3.3, which (via the constraint) was holding dandi back to 0.68.1 — dandi caps click<8.2.0 (dandi-cli#1631). Relaxed the click constraint so dandi can be current; the minor click downgrade in Colab is covered by the restart admonition.
  • Pinned the git-sourced ndx-structured-behavior to commit b3169248 (was @main) in both the install cell and environment.yml, for reproducibility.
  • Stripped pre-existing invalid jetTransient output keys so the notebooks validate against nbformat.
  • Added fof (Frontal Orienting Field) and inactivate to the codespell ignore list — both correct neuroscience terms.

No headless gotchas: all plotting is matplotlib (plt.show() / networkx via Agg), which runs fine in CI.

🤖 Generated with Claude Code

The prepended Colab-bootstrap cells stored `source` as a list of lines with
the trailing newlines stripped. nbformat concatenates source elements
verbatim, so the install cell collapsed onto a single physical line beginning
with `#@title …` — turning the whole line (including `!pip install` and
`!uv pip install`) into one Python comment. The markdown intro/restart cells
were similarly run together.

CI never caught this because the test harness extracts pins by regex and runs
its own install (it stubs the cell), but a Colab user clicking ▶ would have
installed nothing. Regenerate the cells with newline-terminated source lines.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Preview for this PR has been removed (PR closed).

github-actions Bot added a commit that referenced this pull request Jun 16, 2026
@bendichter
bendichter merged commit c833ff7 into master Jun 16, 2026
6 checks passed
github-actions Bot added a commit that referenced this pull request Jun 16, 2026
@weiglszonja

Copy link
Copy Markdown
Contributor

Thank you!

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.

2 participants