Title: docs(cli): working with notebooks in Git by jamesbhobbs · Pull Request #615 · deepnote/deepnote · GitHub
Open Graph Title: docs(cli): working with notebooks in Git by jamesbhobbs · Pull Request #615 · deepnote/deepnote
X Title: docs(cli): working with notebooks in Git by jamesbhobbs · Pull Request #615 · deepnote/deepnote
Description: Summary Adds docs/deepnote-cli-git.md, a guide to keeping .deepnote notebooks in Git with the CLI commands that already exist. None of these workflows were documented: Keep outputs out of source files: .deepnote files hold the code and snapshots/ hold outputs, with guidance on when to commit or ignore snapshots. Readable git diff / git log -p / git show: a .gitattributes entry plus a textconv driver using deepnote cat, so changes show up as block-level code diffs. Structural summaries: git difftool -y -x "deepnote diff --content". Pre-commit checks: deepnote validate (schema, exit 2) and deepnote lint (syntax errors and missing integrations are errors with exit 1; unused/redefined variables and empty inputs are warnings), set up as a pre-commit framework hook or a plain git hook. Pull-request review: a GitHub Actions job that writes a block-level diff of every changed notebook to the job summary and lints them. It needs no secrets, so it's safe on fork PRs. Tested locally (with published @deepnote/cli@0.10.0 where it matters) The textconv driver in git diff and git log -p, and the difftool, on a real example notebook. lint on a file with a syntax error (exit 1), validate on an invalid file (exit 2). The plain git hook blocks a commit containing a syntax error. The PR summary script logic, in a local repo with a modified notebook and a new one. Not tested: the Actions workflow itself, or the pre-commit framework config. Not mentioned on purpose: lint doesn't report undefined variables With CLI 0.10.0, a block that reads undefined_thing passes lint with no issues. deepnote dag vars shows that the analyzer drops undefined names from a block's used variables, so the undefined-variable rule never fires. The circular-dependency check also didn't fire for a = b + 1 / b = a + 1. The README lists both checks. This page only claims what I could reproduce. Both are worth a separate bug fix. Dependencies Links to /docs/deepnote-cli-ci, which is added in #611. Needs a sidebar entry in deepnote-internal, which will be a separate PR. Docs only. Prettier and cspell pass. 🤖 Generated with Claude Code Summary by CodeRabbit Documentation Added guidance for managing Deepnote notebooks with Git, including snapshot handling, structural diffs, validation, linting, commit hooks, and pull-request workflows. Added difftool and textconv to the documentation dictionary.
Open Graph Description: Summary Adds docs/deepnote-cli-git.md, a guide to keeping .deepnote notebooks in Git with the CLI commands that already exist. None of these workflows were documented: Keep outputs out of source f...
X Description: Summary Adds docs/deepnote-cli-git.md, a guide to keeping .deepnote notebooks in Git with the CLI commands that already exist. None of these workflows were documented: Keep outputs out of source f...
Opengraph URL: https://github.com/deepnote/deepnote/pull/615
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:bc95ae22-38b5-b8b8-cd91-31371e0651ad |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D6F0:169E62:11CF1E7:172EA70:6AED648F |
| html-safe-nonce | 722dc354acda21d3a2a780230855b57628d973fbbadfa517adfecf8fa0824779 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkYwOjE2OUU2MjoxMUNGMUU3OjE3MkVBNzA6NkFFRDY0OEYiLCJ2aXNpdG9yX2lkIjoiMTcxNjQ1MDQ4MTU0MzE0NDU5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | edd923c2f960a09711c980cb88cbf9e64a439446638b6d3562e0617baf379f0f |
| hovercard-subject-tag | pull_request:5160218252 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/deepnote/deepnote/pull/615/files |
| twitter:image | https://avatars.githubusercontent.com/u/15235276?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/15235276?s=400&v=4 |
| og:image:alt | Summary Adds docs/deepnote-cli-git.md, a guide to keeping .deepnote notebooks in Git with the CLI commands that already exist. None of these workflows were documented: Keep outputs out of source f... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/deepnote/deepnote git https://github.com/deepnote/deepnote.git |
| octolytics-dimension-user_id | 45339858 |
| octolytics-dimension-user_login | deepnote |
| octolytics-dimension-repository_id | 1066509034 |
| octolytics-dimension-repository_nwo | deepnote/deepnote |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1066509034 |
| octolytics-dimension-repository_network_root_nwo | deepnote/deepnote |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width