Skip to content

Commit becc221

Browse files
authored
Merge pull request #13 from int-brain-lab/release/v0.2.0
Release v0.2.0: bwm_ephys 1.2.0 with waveforms and ACGs
2 parents 6d7b847 + 0f3f443 commit becc221

15 files changed

Lines changed: 939 additions & 27 deletions

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Changelog
2+
3+
All notable changes to the IBL AI Agent are documented here.
4+
5+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6+
This project adheres to [Semantic Versioning](https://semver.org/).
7+
8+
---
9+
10+
## [Unreleased]
11+
12+
---
13+
14+
## [0.2.0] - 2026-06-08
15+
16+
### Added
17+
- `bwm_ephys` dataset version 1.2.0 with waveforms, additional waveform features for each cluster and autocorrelograms.
18+
See `CHANGELOG_DATA.md` for further details.
19+
20+
### Changed
21+
- `scripts/download_datasets.py`: `bwm_ephys` archive updated to version 1.2.0
22+
(new filename, SHA1, and URL).
23+
- Skill references updated to document the new cell-level files and loading
24+
guidance for `bwm_ephys ≥ 1.2.0`.
25+
26+
---
27+
28+
## [0.1.0] - 2026-02 *(initial release)*
29+
30+
### Added
31+
- Initial agent scaffold with `bwm_ephys 1.1.0` and `bwm_behavior 1.1.0` datasets.
32+
- Skill system for IBL data loading, analysis, anatomy, and Neuropixels access.
33+
- `scripts/download_datasets.py` for bootstrapping public BWM archives.
34+
35+
---
36+
37+
[Unreleased]: https://github.com/int-brain-lab/ibl-ai-agent/compare/v0.2.0...HEAD
38+
[0.2.0]: https://github.com/int-brain-lab/ibl-ai-agent/compare/v0.1.0...v0.2.0
39+
[0.1.0]: https://github.com/int-brain-lab/ibl-ai-agent/releases/tag/v0.1.0

CHANGELOG_DATA.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Data Changelog
2+
3+
All notable changes to the IBL AI Agent datasets are documented here.
4+
5+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6+
Dataset versions follow [Semantic Versioning](https://semver.org/).
7+
8+
---
9+
10+
## [Unreleased]
11+
12+
---
13+
14+
## [bwm_ephys 1.2.0] - 2026-06-08
15+
16+
### Added
17+
- `clusters.pqt` (621 733 × 59): full-release BWM unit table covering all 699 probe
18+
insertions. Replaces the `2024_Q2_IBL_et_al_BWM` aggregate `clusters.pqt`.
19+
Includes `eid` and 25 new columns relative to the 2024_Q2 aggregate:
20+
- Firing statistics: `burstiness`, `memory`
21+
- QC / annotation: `labels`, `rawInd`, `peak_channel`, `invert_sign_peak`
22+
- Waveform shape: `peak_time_idx`, `peak_val`, `trough_time_idx`, `trough_val`,
23+
`tip_time_idx`, `tip_val`
24+
- Waveform timing: `peak_to_trough_duration`, `half_peak_duration`,
25+
`half_peak_post_time_idx`, `half_peak_pre_time_idx`,
26+
`half_peak_post_val`, `half_peak_pre_val`,
27+
`recovery_time_idx`, `recovery_val`
28+
- Waveform slopes / ratios: `peak_to_trough_ratio`, `peak_to_trough_ratio_log`,
29+
`depolarisation_slope`, `repolarisation_slope`, `recovery_slope`
30+
- `clusters.waveforms_peak.npy` (621 733 × 128, float16): peak-channel waveform
31+
per unit at 30 kHz. Row-aligned with `clusters.pqt`.
32+
- `clusters.acgs_log.npy` (621 733 × 128, float16): log-binned autocorrelogram
33+
per unit. Row-aligned with `clusters.pqt`.
34+
- `acgs_log.times.npy` (128, float64): shared ACG lag-time axis in seconds.
35+
- generation code on IBL cluster is available [here](https://github.com/int-brain-lab/sdsc-slurms/blob/main/2026-03_EA_Cells/cells.py), leveraging the [eatools](https://github.com/int-brain-lab/eatools) library.
36+
37+
38+
39+
---
40+
41+
## [bwm_ephys 1.1.0] - 2026-02 *(baseline)*
42+
43+
Initial public release of the `bwm_ephys` archive containing:
44+
- `metadata/`: sessions, insertions, units, channels, trials, events, passive sessions/events.
45+
- `features/`: unit features, event-response features, passive response features.
46+
- `spikes/`: per-probe blosc-compressed spike shards (good units only).
47+
48+
---
49+
50+
[Unreleased]: https://github.com/int-brain-lab/ibl-ai-agent/compare/v0.2.0...HEAD
51+
[bwm_ephys 1.2.0]: https://github.com/int-brain-lab/ibl-ai-agent/releases/tag/v0.2.0
52+
[bwm_ephys 1.1.0]: https://github.com/int-brain-lab/ibl-ai-agent/releases/tag/v0.1.0

docs/CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,31 @@ UV_CACHE_DIR=.uv-cache uv run pytest -q
2020
- Prefer typed contracts over untyped dict plumbing in runtime internals.
2121
- Keep CLI commands thin; shared behavior should live in `commands/common.py` or `commands/kernel.py`.
2222

23+
## Changelog and versioning
24+
25+
This project follows documents evolutions in two changelogs.
26+
27+
- **`CHANGELOG.md`** — agent/code changes (version bumps, new features, skill updates).
28+
- **`CHANGELOG_DATA.md`** — dataset changes (new archive versions, schema additions, column changes).
29+
30+
Dataset versions are independent of the agent version; both use semver. A dataset minor bump (e.g. 1.1.0 → 1.2.0) adds columns or new files without breaking existing queries.
31+
32+
## Releasing a new dataset archive
33+
34+
When bumping a dataset version (e.g. `bwm_ephys`), the archive's own metadata files must match the new version **before** the tar is uploaded to S3. Forgetting this is the most common release mistake.
35+
36+
Checklist before uploading a new `<dataset>-<version>.tar`:
37+
38+
1. **`provenance.yaml`** inside the archive — set `dataset_version: <new_version>`.
39+
2. **`manifest.json`** inside the archive — set `dataset_version: <new_version>` and ensure the `files` list includes every new file added in this release.
40+
3. **`schema.yaml`** — set `dataset_version: <new_version>` and add entries for any new tables or stores.
41+
4. Repack the tar, compute its SHA1 (`shasum -a 1 <archive>.tar`), and update the `sha1` field in `scripts/download_datasets.py`.
42+
5. Run the release validator against the extracted archive before pushing:
43+
```bash
44+
uv run python scripts/validate_bwm_ephys_release.py <path/to/extracted/version>
45+
```
46+
The script checks version strings, manifest completeness, row/column counts, and array shapes.
47+
2348
## Docs policy
2449

2550
Authoritative docs are:

docs/bwm/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ Local ephys-centered BWM dataset with spikes, units, insertions, channels,
5858
trials, events, and passive-response context.
5959

6060
- Config key: `datasets.bwm_ephys.root`
61-
- Version: `1.1.0`
62-
- Approx. size on disk: `5.3G`
61+
- Version: `1.2.0`
62+
- Public archive size: `6.03G`
63+
- Previous `1.1.0` local-table/spike footprint: `5.3G`
6364
- Approx. file count: `4,215`
6465
- Mice: `139`
6566
- Sessions: `459`
6667
- Insertions: `699`
6768
- Units: `75,395`
69+
- Full cluster rows in root `clusters.pqt`: `621,733`
6870
- Channels: `267,264`
6971
- Trials: `295,920`
7072
- Events: `2,066,041`
@@ -82,6 +84,15 @@ trials, events, and passive-response context.
8284
- `features/event_response_features.parquet`
8385
- `features/passive_response_features.parquet`
8486
- `spikes/<pid>/...` blosc shard directories
87+
- `clusters.pqt` full cluster table
88+
- `clusters.waveforms_peak.npy` peak-channel unit waveforms
89+
- `clusters.acgs_log.npy` log-binned autocorrelograms
90+
- `acgs_log.times.npy` shared ACG lag-time axis
91+
92+
Compatibility note: the `metadata/units.parquet`, `features/*`, and `spikes/*`
93+
surfaces keep the good-unit local analysis contract from `1.1.0`. The new
94+
root-level `clusters.pqt` and companion arrays expose the full cluster table and
95+
cell-level waveform/ACG surfaces for analyses that need them.
8596

8697
Best detailed references:
8798
- [Dataset spec](./ephys.md)

docs/bwm/ephys.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ located through `data_locations.local.yaml`, so this page should be read as a mi
3131
Reference local artifact snapshot:
3232

3333
- config key: `datasets.bwm_ephys.root`
34-
- final total size on disk: `5.3G`
34+
- current dataset version: `1.2.0`
35+
- public archive size: `6.03G`
36+
- previous `1.1.0` local-table/spike footprint: `5.3G`
3537
- build timestamp: `2026-04-22T18:14:47.760768+00:00`
3638
- upgraded from dataset version: `1.0.0`
3739
- source freeze: `2023_12_bwm_release`
@@ -40,6 +42,7 @@ Reference local artifact snapshot:
4042
- sessions: `459`
4143
- insertions: `699`
4244
- units: `75,395`
45+
- full cluster rows in root `clusters.pqt`: `621,733`
4346
- channels: `267,264`
4447
- trials: `295,920`
4548
- events: `2,066,041`
@@ -62,6 +65,13 @@ Important implementation note:
6265
- `100 us`
6366
- adaptive `uint16` / `uint32`
6467
- container format: `blosc_file_shards`
68+
- `bwm_ephys 1.2.0` additionally ships root-level full-cluster files:
69+
- `clusters.pqt`
70+
- `clusters.waveforms_peak.npy`
71+
- `clusters.acgs_log.npy`
72+
- `acgs_log.times.npy`
73+
- `metadata/units.parquet` remains the good-unit table used with local spike
74+
shards; root `clusters.pqt` is the full cluster table.
6575

6676
Where this document differs from the configured local `bwm_ephys` artifact,
6777
treat the built artifact as the source of truth.
@@ -83,6 +93,7 @@ features. See `docs/decisions/bwm_dataset_layering.md`.
8393

8494
Dataset identity:
8595
- Name: `bwm_ephys`
96+
- Current public version: `1.2.0`
8697
- Initial target version: `1.0.0`
8798

8899
Pinned source scope (initial intent):
@@ -98,7 +109,7 @@ Core product definition:
98109
- Does not claim to include all possible BWM modalities such as raw video
99110

100111
Recommended distribution artifact:
101-
- `reports/releases/bwm_ephys/1.1.0/bwm_ephys-1.1.0.tar`
112+
- `reports/releases/bwm_ephys/1.2.0/bwm_ephys-1.2.0.tar`
102113

103114
The latest `bwm_ephys` archive is generated by the passive upgrade path and
104115
written to that release folder automatically. To write or refresh only the
@@ -173,6 +184,11 @@ bwm_ephys/
173184
build_report.yaml
174185
SUMMARY.md
175186
187+
clusters.pqt
188+
clusters.waveforms_peak.npy
189+
clusters.acgs_log.npy
190+
acgs_log.times.npy
191+
176192
metadata/
177193
sessions.parquet
178194
insertions.parquet
@@ -199,6 +215,10 @@ bwm_ephys/
199215

200216
Notes:
201217
- The current local artifact populates:
218+
- `clusters.pqt`
219+
- `clusters.waveforms_peak.npy`
220+
- `clusters.acgs_log.npy`
221+
- `acgs_log.times.npy`
202222
- `metadata/sessions.parquet`
203223
- `metadata/insertions.parquet`
204224
- `metadata/units.parquet`

docs/data_locations.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ one_cache:
7272
- a directory containing version folders such as `1.1.0/schema.yaml`; or
7373
- one exact dataset directory containing `schema.yaml`.
7474

75+
For automatic dataset updates, prefer a version-parent root such as
76+
`reports/datasets/bwm_ephys` with `preferred_version: latest`. If `root` points
77+
directly at an exact version such as `reports/datasets/bwm_ephys/1.1.0`, the
78+
downloader treats that as a manual pin and will not install a newer version into
79+
that path.
80+
7581
Use a project-level override only when a project has a special data location:
7682

7783
```text

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ibl-ai-agent"
7-
version = "0.1.0"
7+
version = "0.2.0"
88
description = "Skill-first Codex agent for IBL neural data analysis"
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)