Skip to content

Commit cb7b49c

Browse files
fedorovclaude
andcommitted
Update to idc-index 0.12.2 (idc-index-data 24.1.0)
New schema additions: - series_init_idc_version, series_revised_idc_version columns in primary index - version_metadata_index table (IDC version release timestamps) Breaking changes in analysis_results_index: - Updated -> updated, Description -> description (case rename) Tests expanded from 55 to 61; docs and frontmatter updated to 1.6.1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1cf36bc commit cb7b49c

5 files changed

Lines changed: 67 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to the IDC Claude Skill are documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/),
66
and this project adheres to [Semantic Versioning](https://semver.org/).
77

8+
## [1.6.1] - 2026-05-08
9+
10+
### Added
11+
12+
- `series_init_idc_version` and `series_revised_idc_version` columns in primary `index` table (idc-index-data 24.1.0): expose the IDC version when each series was first added and last revised, enabling version-aware filtering
13+
- `version_metadata_index` table: maps each IDC version number to its release timestamp; requires `client.fetch_index("version_metadata_index")`
14+
- Tests for new index columns and `version_metadata_index` (61 total, up from 55)
15+
16+
### Changed
17+
18+
- Updated to idc-index 0.12.2 (idc-index-data 24.1.0); IDC data version remains v24
19+
- `analysis_results_index` column renames (idc-index-data 24.1.0): `Updated``updated`, `Description``description`
20+
821
## [1.6.0] - 2026-05-07
922

1023
### Added

SKILL.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: imaging-data-commons
33
description: Query and download public cancer imaging data from NCI Imaging Data Commons using idc-index. Invoke for any question about IDC collections, cancer imaging datasets, DICOM data access, radiology (CT, MR, PET) or pathology AI training sets, metadata queries, visualization, or license checks — even when the user doesn't explicitly mention "IDC". No authentication required.
44
license: This skill is provided under the MIT License. IDC data itself has individual licensing (mostly CC-BY, some CC-NC) that must be respected when using the data.
55
metadata:
6-
version: 1.6.0
6+
version: 1.6.1
77
skill-author: Andrey Fedorov, @fedorov
8-
idc-index: "0.12.1"
8+
idc-index: "0.12.2"
99
idc-data-version: "v24"
1010
repository: https://github.com/ImagingDataCommons/idc-claude-skill
1111
---
@@ -27,7 +27,7 @@ Use the `idc-index` Python package to query and download public cancer imaging d
2727
```python
2828
import idc_index
2929

30-
REQUIRED_VERSION = "0.12.1" # Must match metadata.idc-index in this file
30+
REQUIRED_VERSION = "0.12.2" # Must match metadata.idc-index in this file
3131
installed = idc_index.__version__
3232

3333
if installed < REQUIRED_VERSION:
@@ -143,6 +143,7 @@ The `idc-index` package provides multiple metadata index tables, accessible via
143143
| `contrast_index` | 1 row = 1 series with contrast info | fetch_index() | Contrast agent metadata: agent name, ingredient, administration route (CT, MR, PT, XA, RF) |
144144
| `volume_geometry_index` | 1 row = 1 CT/MR/PT series | fetch_index() | 3D volume geometry validation for single-frame CT, MR, and PT series; boolean checks for orientation, spacing, dimensions, and slice positions; composite `regularly_spaced_3d_volume` flag |
145145
| `rtstruct_index` | 1 row = 1 RTSTRUCT series | fetch_index() | RT Structure Set metadata: total ROI count, ROI names, generation algorithms, interpreted types, and the referenced image series UID |
146+
| `version_metadata_index` | 1 row = 1 IDC release version | fetch_index() | IDC version release timestamps; join on `idc_version` to correlate series with their release date |
146147

147148
**Auto** = loaded automatically when `IDCClient()` is instantiated
148149
**fetch_index()** = requires `client.fetch_index("table_name")` to load
@@ -167,7 +168,7 @@ The `idc-index` package provides multiple metadata index tables, accessible via
167168
| `SeriesInstanceUID` | index, volume_geometry_index | Link series to its 3D geometry validation result (join index.SeriesInstanceUID = volume_geometry_index.SeriesInstanceUID) |
168169
| `SeriesInstanceUID` / `referenced_SeriesInstanceUID` | index, rtstruct_index | Join RTSTRUCT series to its metadata (index.SeriesInstanceUID = rtstruct_index.SeriesInstanceUID); use rtstruct_index.referenced_SeriesInstanceUID to find the source image series |
169170

170-
**Note:** `Subjects`, `Updated`, and `Description` appear in multiple tables but have different meanings (counts vs identifiers, different update contexts).
171+
**Note:** `subjects`, `updated`, and `description` appear in multiple tables but have different meanings (counts vs identifiers, different update contexts).
171172

172173
For detailed join examples, schema discovery patterns, key columns reference, and DataFrame access, see `references/index_tables_guide.md`.
173174

@@ -243,7 +244,7 @@ print(client.get_idc_version()) # Should return "v24"
243244
```
244245
If you see an older version, upgrade with: `pip install --upgrade idc-index`
245246

246-
**Tested with:** idc-index 0.12.1 (IDC data version v24)
247+
**Tested with:** idc-index 0.12.2 (IDC data version v24)
247248

248249
**Optional (for data analysis):**
249250
```bash
@@ -366,6 +367,7 @@ results = client.sql_query("""
366367
- Clinical: PatientAge, PatientSex, StudyDate
367368
- Descriptions: StudyDescription, SeriesDescription
368369
- Licensing: license_short_name
370+
- Versioning: series_init_idc_version (IDC version when series was first added), series_revised_idc_version (IDC version when series was last revised)
369371

370372
**Note:** Cancer type is in `collections_index.cancer_types`, not in the primary `index` table.
371373

references/index_tables_guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Index Tables Guide for IDC
22

3-
**Tested with:** idc-index 0.12.1 (IDC data version v24)
3+
**Tested with:** idc-index 0.12.2 (IDC data version v24)
44

55
This guide covers the structure and access patterns for IDC index tables: programmatic schema discovery, DataFrame access, and join column references. For the overview of available tables and their purposes, see the "Index Tables" section in the main SKILL.md.
66

tests/requirements-test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
idc-index==0.12.1
1+
idc-index==0.12.2
22
pandas
33
pytest
44
pytest-timeout

tests/test_snippets.py

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def client_with_all_indices(client):
4242
"contrast_index",
4343
"volume_geometry_index",
4444
"rtstruct_index",
45+
"version_metadata_index",
4546
]:
4647
client.fetch_index(table)
4748
return client
@@ -55,14 +56,50 @@ class TestVersionAndSetup:
5556
"""SKILL.md: version check and IDC data version."""
5657

5758
def test_package_version_meets_requirement(self):
58-
required = "0.12.1"
59+
required = "0.12.2"
5960
assert idc_index.__version__ >= required, (
6061
f"idc-index {idc_index.__version__} < required {required}"
6162
)
6263

6364
def test_idc_data_version_is_v24(self, client):
6465
assert client.get_idc_version() == "v24"
6566

67+
def test_series_version_columns_present(self, client):
68+
cols = client.index.columns.tolist()
69+
assert "series_init_idc_version" in cols
70+
assert "series_revised_idc_version" in cols
71+
72+
def test_version_metadata_index_available(self, client):
73+
assert "version_metadata_index" in client.indices_overview
74+
assert client.indices_overview["version_metadata_index"]["installed"]
75+
76+
def test_version_metadata_index_query(self, client_with_all_indices):
77+
df = client_with_all_indices.sql_query(
78+
"SELECT idc_version, version_timestamp FROM version_metadata_index ORDER BY idc_version"
79+
)
80+
assert len(df) > 0
81+
assert "idc_version" in df.columns
82+
assert "version_timestamp" in df.columns
83+
84+
def test_series_version_columns_query(self, client):
85+
df = client.sql_query("""
86+
SELECT SeriesInstanceUID, series_init_idc_version, series_revised_idc_version
87+
FROM index
88+
WHERE series_init_idc_version IS NOT NULL
89+
LIMIT 10
90+
""")
91+
assert len(df) > 0
92+
93+
def test_join_index_with_version_metadata(self, client_with_all_indices):
94+
df = client_with_all_indices.sql_query("""
95+
SELECT i.SeriesInstanceUID, i.series_init_idc_version, v.version_timestamp
96+
FROM index i
97+
JOIN version_metadata_index v ON i.series_init_idc_version = v.idc_version
98+
LIMIT 5
99+
""")
100+
assert len(df) > 0
101+
assert "version_timestamp" in df.columns
102+
66103

67104
# ===========================================================================
68105
# SKILL.md – Overall statistics
@@ -124,6 +161,13 @@ def test_analysis_results_index(self, client_with_all_indices):
124161
""")
125162
assert len(df) > 0
126163

164+
def test_analysis_results_index_column_names(self, client_with_all_indices):
165+
cols = client_with_all_indices.analysis_results_index.columns.tolist()
166+
for expected in ("updated", "description"):
167+
assert expected in cols, f"Expected lowercase column '{expected}' in analysis_results_index"
168+
assert "Updated" not in cols
169+
assert "Description" not in cols
170+
127171

128172
# ===========================================================================
129173
# SKILL.md – SQL queries

0 commit comments

Comments
 (0)