Skip to content

Add IZeroClampSeries and RoiResponseSeries to the neurodata type map; fix OptogeneticStimulusSite typo - #1946

Open
bendichter wants to merge 1 commit into
masterfrom
neurodata-typemap-additions
Open

bendichter wants to merge 1 commit into
masterfrom
neurodata-typemap-additions

Conversation

@bendichter

Copy link
Copy Markdown
Member

process_ndtypes drops any neurodata type that isn't a key in neurodata_typemap, so types missing from the map contribute nothing to an asset's variableMeasured, measurementTechnique or approach. This fills two gaps and fixes a typo:

  • IZeroClampSeries (icephys): current clamp with no injected current, so current clamp technique / electrophysiological approach, the same as CurrentClampSeries. Before this, a file whose only intracellular data was IZeroClampSeries got no icephys metadata.
  • RoiResponseSeries (ophys): no technique, since ROI traces can come from one- or two-photon imaging, and microscopy approach; cell population imaging, matching ImagingPlane and PlaneSegmentation.
  • OptogeneticStimulusSite: the key and neurodata_type were spelled OptogeneticStimulusSIte, so the entry never matched the real type. The existing test case used the same typo, so I fixed it there too.

Added test_ndtypes cases for the two new types. dandi/tests/test_metadata.py passes locally, and so do the pre-commit hooks.

Context: dandi/dandi-archive#2907 / dandi/dandi-archive#2946, which make archive search match NWB subtypes and rely on this map. The bigger gap, extension types that subclass a core type (e.g. an ElectricalSeries subclass), is also dropped here. Fixing that means resolving unknown types through the schemas cached in the file, which I'll leave for a separate change (see the TODO in get_neurodata_types_to_modalities_map).

🤖 Generated with Claude Code

…OptogeneticStimulusSite typo

process_ndtypes drops any neurodata type not in neurodata_typemap, so
files whose only intracellular data is IZeroClampSeries, or whose ophys
data is only RoiResponseSeries, got no variableMeasured, technique or
approach for it. The OptogeneticStimulusSite entry was misspelled
("SIte") and so never matched the real type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.34%. Comparing base (540c7c0) to head (9e65f38).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1946   +/-   ##
=======================================
  Coverage   78.34%   78.34%           
=======================================
  Files          92       92           
  Lines       14109    14109           
=======================================
  Hits        11053    11053           
  Misses       3056     3056           
Flag Coverage Δ
unittests 78.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yarikoptic yarikoptic added the minor Increment the minor version when merged label Oct 1, 2026
Comment thread dandi/metadata/util.py
"module": "ogen",
"neurodata_type": "OptogeneticStimulusSIte",
"neurodata_type": "OptogeneticStimulusSite",
"technique": None,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in

@rly proposed

Suggested change
"technique": None,
"technique": "surgical technique",

I wonder if we should include this here, or just keep as is to the typo fix?

@yarikoptic yarikoptic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could go in without further refine per comment to not make perfect be enemy of the good.

Just FTR: would cause conflicts with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants