Skip to content

Conversation

stephprince
Copy link
Contributor

@stephprince stephprince commented Sep 15, 2025

Motivation

Fix #2108. Related to updates in hdmf-dev/hdmf#1309 that will warn a user when there are extension conflicts, these changes remap some of these conflicts on read.

  • Remaps Device.model as a string attribute to a DeviceModel object on read.
  • Remaps Device.model defined by other extensions to a Device.{extension_name}_model field to allow data from files with an older extension with a conflicting Device.model to be read.

Note - the tests will not pass until hdmf-dev/hdmf#1309 is merged since it raises a warning instead of an error if an extension attempts to overwrite an existing specification.

How to test the behavior?

Show how to reproduce the new behavior (can be a bug fix or a new feature)

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running ruff check . && codespell from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.

Copy link

codecov bot commented Sep 15, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.86%. Comparing base (d3e4085) to head (fed02a0).

Files with missing lines Patch % Lines
src/pynwb/io/device.py 58.33% 8 Missing and 2 partials ⚠️

❗ There is a different number of reports uploaded between BASE (d3e4085) and HEAD (fed02a0). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (d3e4085) HEAD (fed02a0)
integration 4 0
Additional details and impacted files
@@             Coverage Diff             @@
##              dev    #2132       +/-   ##
===========================================
- Coverage   95.19%   84.86%   -10.33%     
===========================================
  Files          28       29        +1     
  Lines        2849     2874       +25     
  Branches      736      740        +4     
===========================================
- Hits         2712     2439      -273     
- Misses         83      346      +263     
- Partials       54       89       +35     
Flag Coverage Δ
integration ?
unit 84.86% <60.00%> (-0.22%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@stephprince stephprince marked this pull request as ready for review September 15, 2025 22:32
@stephprince stephprince requested a review from rly September 15, 2025 22:32
@stephprince
Copy link
Contributor Author

@rly - see note in the PR description about the tests not passing until hdmf-dev/hdmf#1309 is merged, but otherwise this part should be ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Handle conflicts between core schema and extensions
1 participant