From 0d9d955fd0333379d4686fc3390fb7d8430fd246 Mon Sep 17 00:00:00 2001 From: Benjamin Dichter Date: Wed, 11 Nov 2026 22:01:24 -0500 Subject: [PATCH] Pin the 001636 and 001754 notebooks to published dandiset versions The antidromic, turner_m1_usage and 001754 demo notebooks read the draft version, so the October re-uploads broke them: the 001636 files moved to NWB core 2.11, which pynwb 3.1.3 cannot read, and the 001754 rate_maps table renamed its columns. They now read the latest published versions (001636 0.260518.1819, 001754 0.260728.1352), which hold the files the notebooks were written against. turner_m1_peth and turner_m1_glm already read 0.260518.1819 implicitly; they now name it. Co-Authored-By: Claude Opus 5.5 --- .../motor_cortex/antidromic_detection_tutorial.ipynb | 3 ++- 001636/TurnerLab/motor_cortex/turner_m1_glm.ipynb | 3 ++- 001636/TurnerLab/motor_cortex/turner_m1_peth.ipynb | 3 ++- 001636/TurnerLab/motor_cortex/turner_m1_usage.ipynb | 3 ++- 001754/CatalystNeuro/001754_demo.ipynb | 5 +++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/001636/TurnerLab/motor_cortex/antidromic_detection_tutorial.ipynb b/001636/TurnerLab/motor_cortex/antidromic_detection_tutorial.ipynb index 8dcf4766..e9cc70d3 100644 --- a/001636/TurnerLab/motor_cortex/antidromic_detection_tutorial.ipynb +++ b/001636/TurnerLab/motor_cortex/antidromic_detection_tutorial.ipynb @@ -280,8 +280,9 @@ "\n", "# Connect to DANDI and get the dandiset\n", "dandiset_id = \"001636\"\n", + "dandiset_version = \"0.260518.1819\" # published version; \"draft\" changes without notice\n", "client = DandiAPIClient()\n", - "dandiset = client.get_dandiset(dandiset_id, \"draft\")\n", + "dandiset = client.get_dandiset(dandiset_id, dandiset_version)\n", "\n", "# Select a session with a corticostriatal neuron\n", "asset_path = \"sub-Venus/sub-Venus_ses-Venus++v4806++PostMPTP++Depth17700um++20000204_behavior+ecephys.nwb\"\n", diff --git a/001636/TurnerLab/motor_cortex/turner_m1_glm.ipynb b/001636/TurnerLab/motor_cortex/turner_m1_glm.ipynb index 1c139fda..d865823c 100644 --- a/001636/TurnerLab/motor_cortex/turner_m1_glm.ipynb +++ b/001636/TurnerLab/motor_cortex/turner_m1_glm.ipynb @@ -227,10 +227,11 @@ "\n", "# Stream NWB file from DANDI\n", "dandiset_id = \"001636\"\n", + "dandiset_version = \"0.260518.1819\" # published version; \"draft\" changes without notice\n", "session_id = \"Venus++v2703++PreMPTP++Depth19880um++19990607\"\n", "\n", "client = DandiAPIClient()\n", - "dandiset = client.get_dandiset(dandiset_id)\n", + "dandiset = client.get_dandiset(dandiset_id, dandiset_version)\n", "assets = list(dandiset.get_assets())\n", "asset = next(a for a in assets if session_id in a.path)\n", "print(f\"Streaming: {asset.path}\")\n", diff --git a/001636/TurnerLab/motor_cortex/turner_m1_peth.ipynb b/001636/TurnerLab/motor_cortex/turner_m1_peth.ipynb index a99d8987..b5b6c668 100644 --- a/001636/TurnerLab/motor_cortex/turner_m1_peth.ipynb +++ b/001636/TurnerLab/motor_cortex/turner_m1_peth.ipynb @@ -209,10 +209,11 @@ "\n", "# Stream NWB file from DANDI\n", "dandiset_id = \"001636\"\n", + "dandiset_version = \"0.260518.1819\" # published version; \"draft\" changes without notice\n", "session_id = \"Venus++v4529++PostMPTP++Depth20600um++20000127\"\n", "\n", "client = DandiAPIClient()\n", - "dandiset = client.get_dandiset(dandiset_id)\n", + "dandiset = client.get_dandiset(dandiset_id, dandiset_version)\n", "assets = list(dandiset.get_assets())\n", "asset = next(a for a in assets if session_id in a.path)\n", "print(f\"Streaming: {asset.path}\")\n", diff --git a/001636/TurnerLab/motor_cortex/turner_m1_usage.ipynb b/001636/TurnerLab/motor_cortex/turner_m1_usage.ipynb index aa3218ed..89733485 100644 --- a/001636/TurnerLab/motor_cortex/turner_m1_usage.ipynb +++ b/001636/TurnerLab/motor_cortex/turner_m1_usage.ipynb @@ -227,8 +227,9 @@ "\n", "# Connect to DANDI and get the dandiset\n", "dandiset_id = \"001636\"\n", + "dandiset_version = \"0.260518.1819\" # published version; \"draft\" changes without notice\n", "client = DandiAPIClient()\n", - "dandiset = client.get_dandiset(dandiset_id, \"draft\")\n", + "dandiset = client.get_dandiset(dandiset_id, dandiset_version)\n", "\n", "# Get all assets - users can filter this list to select any session\n", "assets = dandiset.get_assets()\n", diff --git a/001754/CatalystNeuro/001754_demo.ipynb b/001754/CatalystNeuro/001754_demo.ipynb index 04977741..15c9effa 100644 --- a/001754/CatalystNeuro/001754_demo.ipynb +++ b/001754/CatalystNeuro/001754_demo.ipynb @@ -267,9 +267,10 @@ "source": [ "# List all NWB files in the dandiset\n", "dandiset_id = \"001754\"\n", + "dandiset_version = \"0.260728.1352\" # published version; \"draft\" changes without notice\n", "\n", "with DandiAPIClient() as client:\n", - " dandiset = client.get_dandiset(dandiset_id, \"draft\")\n", + " dandiset = client.get_dandiset(dandiset_id, dandiset_version)\n", " print(f\"Dandiset: {dandiset.get_raw_metadata()['name']}\\n\")\n", " assets = list(dandiset.get_assets())\n", " for asset in sorted(assets, key=lambda a: a.path):\n", @@ -322,7 +323,7 @@ "file_path = \"sub-Rat1/sub-Rat1_ses-19980425T124500_behavior+ecephys.nwb\"\n", "\n", "with DandiAPIClient() as client:\n", - " asset = client.get_dandiset(dandiset_id, \"draft\").get_asset_by_path(file_path)\n", + " asset = client.get_dandiset(dandiset_id, dandiset_version).get_asset_by_path(file_path)\n", " s3_url = asset.get_content_url(follow_redirects=1, strip_query=True)\n", "\n", "remote_file = remfile.File(s3_url)\n",