Problem
When a finding model name contains parentheses — e.g., composite metrics (hippocampal occupancy score) — the model_file_name() function produces different slugs depending on context. The index.md generator links to composite_metrics__hippocampal_occupancy_score_.fm.json (double underscore, trailing underscore) but the actual def file is composite_metrics_hippocampal_occupancy_score.fm.json.
This causes broken links in the auto-generated index.
Reproduction
from findingmodel.common import model_file_name
print(model_file_name("composite metrics (hippocampal occupancy score)"))
Expected behavior
model_file_name() should produce a single canonical slug, and the index generator should use the same function to build links.
Found via Copilot review on openimagingdata/findingmodels#48.
🤖 Generated with Claude Code
Problem
When a finding model name contains parentheses — e.g.,
composite metrics (hippocampal occupancy score)— themodel_file_name()function produces different slugs depending on context. Theindex.mdgenerator links tocomposite_metrics__hippocampal_occupancy_score_.fm.json(double underscore, trailing underscore) but the actual def file iscomposite_metrics_hippocampal_occupancy_score.fm.json.This causes broken links in the auto-generated index.
Reproduction
Expected behavior
model_file_name()should produce a single canonical slug, and the index generator should use the same function to build links.Found via Copilot review on openimagingdata/findingmodels#48.
🤖 Generated with Claude Code