Skip to content

Fix dev-deps CI failures: detect pynwb num_samples support via __docval__#1882

Open
CodyCBakerPhD wants to merge 1 commit into
masterfrom
claude/bold-meitner-xoo59j
Open

Fix dev-deps CI failures: detect pynwb num_samples support via __docval__#1882
CodyCBakerPhD wants to merge 1 commit into
masterfrom
claude/bold-meitner-xoo59j

Conversation

@CodyCBakerPhD

@CodyCBakerPhD CodyCBakerPhD commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix failing dev-deps CI jobs (ubuntu-latest, Python 3.10 and 3.14) caused by pynwb dev (post-3.1.3) adding num_samples as a required parameter for ImageSeries when format='external' and rate-based timing is used.

Root cause

The test fixture in dandi/tests/fixtures.py creates ImageSeries objects without num_samples, which pynwb dev now requires. A simple version check via inspect.signature() doesn't work because hdmf's @docval decorator wraps __init__ and hides parameters from Python's inspection machinery. Instead, the parameter list is stored in ImageSeries.__init__.__docval__["args"].

Changes

  • dandi/tests/fixtures.py: Detect num_samples support by inspecting __docval__["args"] and conditionally pass num_samples=4 when creating ImageSeries fixtures. Includes a TODO to simplify once the minimum supported pynwb is bumped above 3.1.3.

@CodyCBakerPhD CodyCBakerPhD marked this pull request as draft June 23, 2026 18:37
@CodyCBakerPhD CodyCBakerPhD self-assigned this Jun 23, 2026
@CodyCBakerPhD

Copy link
Copy Markdown
Contributor Author

(certain parts of the daily tests have been failing for a while; trying to resolve)

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.78%. Comparing base (65c79c9) to head (a4ffe2f).

Files with missing lines Patch % Lines
dandi/tests/fixtures.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1882      +/-   ##
==========================================
- Coverage   76.79%   76.78%   -0.01%     
==========================================
  Files          87       87              
  Lines       12805    12809       +4     
==========================================
+ Hits         9833     9836       +3     
- Misses       2972     2973       +1     
Flag Coverage Δ
unittests 76.78% <80.00%> (-0.01%) ⬇️

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.

@CodyCBakerPhD CodyCBakerPhD added bug Something isn't working patch Increment the patch version when merged dependencies Update one or more dependencies version labels Jun 23, 2026
Comment thread dandi/tests/fixtures.py
@CodyCBakerPhD CodyCBakerPhD marked this pull request as ready for review June 23, 2026 23:23
@CodyCBakerPhD CodyCBakerPhD force-pushed the claude/bold-meitner-xoo59j branch from 9f315e3 to 2c94d7b Compare June 23, 2026 23:27
…al__

pynwb dev (post-3.1.3) added num_samples as a required parameter for
ImageSeries when format='external' and rate-based timing is used.
inspect.signature() cannot detect this because hdmf's @DocVal decorator
hides parameters; use __docval__['args'] instead.

Co-Authored-By: Claude <noreply@anthropic.com>
@CodyCBakerPhD CodyCBakerPhD force-pushed the claude/bold-meitner-xoo59j branch from 2c94d7b to a4ffe2f Compare June 23, 2026 23:28
@CodyCBakerPhD CodyCBakerPhD changed the title Remove direct hdmf dependency from test workflow Fix dev-deps CI failures: detect pynwb num_samples support via __docval__ Jun 23, 2026
@CodyCBakerPhD CodyCBakerPhD added tests Add or improve existing tests and removed bug Something isn't working dependencies Update one or more dependencies version labels Jun 23, 2026
@CodyCBakerPhD CodyCBakerPhD requested a review from yarikoptic June 23, 2026 23:31
@CodyCBakerPhD CodyCBakerPhD moved this to Uncategorized in My Work History Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Increment the patch version when merged tests Add or improve existing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants