Retrofit existing notebooks to use conf.connect factories #78

Closed
opened 2026-03-21 20:57:01 +00:00 by kert · 0 comments
Owner

Problem

After building the connection factories (#72) and snippets (#75), the existing 11 notebooks still use hand-rolled boilerplate.

Fix

Update each notebook's setup cell to use the new factories:

Notebook Current After
acodb_explorer.py 10-line DuckDB + sys.path + nature import con = connect.duckdb() + altair_theme()
pfs_calcs.py Manual DuckDB connect con = connect.duckdb()
bib_explorer.py Manual Store instantiation store = connect.bib()
zotero_tutorial.py Manual sqlite3 connect con = connect.zotero()
nessie_tutorial.py Manual requests HTTP setup client = connect.nessie()
polaris_tutorial.py Manual OAuth2 + requests client = connect.polaris()
api_explorer.py Manual httpx setup Keep as-is (tests API directly)
sql_generator.py Manual imports con = connect.duckdb()
cms_quality_measures.py Manual DuckDB con = connect.duckdb()

Files

  • All notebooks/*.py files

Depends on #72, #73, #74, #75, #76, #77

## Problem After building the connection factories (#72) and snippets (#75), the existing 11 notebooks still use hand-rolled boilerplate. ## Fix Update each notebook's setup cell to use the new factories: | Notebook | Current | After | |----------|---------|-------| | acodb_explorer.py | 10-line DuckDB + sys.path + nature import | `con = connect.duckdb()` + `altair_theme()` | | pfs_calcs.py | Manual DuckDB connect | `con = connect.duckdb()` | | bib_explorer.py | Manual Store instantiation | `store = connect.bib()` | | zotero_tutorial.py | Manual sqlite3 connect | `con = connect.zotero()` | | nessie_tutorial.py | Manual requests HTTP setup | `client = connect.nessie()` | | polaris_tutorial.py | Manual OAuth2 + requests | `client = connect.polaris()` | | api_explorer.py | Manual httpx setup | Keep as-is (tests API directly) | | sql_generator.py | Manual imports | `con = connect.duckdb()` | | cms_quality_measures.py | Manual DuckDB | `con = connect.duckdb()` | ## Files - All `notebooks/*.py` files Depends on #72, #73, #74, #75, #76, #77
kert added this to the P14: Notebook DX — connections, snippets, templates, S3 buckets milestone 2026-03-21 20:57:01 +00:00
kert added the docs label 2026-03-21 20:57:01 +00:00
kert closed this issue 2026-03-22 00:31:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: homelab/stack#78