Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwrap TermSetWrapper in ObjectMapper and not the IO #1070

Merged
merged 23 commits into from
Mar 20, 2024
Merged

Unwrap TermSetWrapper in ObjectMapper and not the IO #1070

merged 23 commits into from
Mar 20, 2024

Conversation

mavaylon1
Copy link
Contributor

@mavaylon1 mavaylon1 commented Mar 15, 2024

Motivation

What was the reasoning behind this change? Please explain the changes briefly.
Goal: Remove the unwrapping of TermSetWrapper from HDF5IO to base HDMF. Why? The current setup only allows TermSetWrapper to be unwrapped for HDF5 and not Zarr. The desire is to not have two IO classes dealing with the unwrapping, but one shared tool.

Unwrap in the mapper.

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?
  • Does the PR clearly describe the problem and the solution?
  • Have you reviewed our Contributing Guide?
  • Does the PR use "Fix #XXX" notation to tell GitHub to close the relevant issue numbered XXX when the PR is merged?

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.55%. Comparing base (67b8262) to head (21e8a93).
Report is 47 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1070   +/-   ##
=======================================
  Coverage   88.55%   88.55%           
=======================================
  Files          45       45           
  Lines        9616     9616           
  Branches     2738     2738           
=======================================
  Hits         8515     8515           
  Misses        778      778           
  Partials      323      323           

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

@mavaylon1
Copy link
Contributor Author

Review Notes:

I am going to investigate how this would work on references. We don't have tests for those situations (pointing to a container that has a wrapped data/attribute field. This PR is a fix to continue the status quo, but now outside the backend specific IO. I will make a new PR for the reference case. That PR will not be included in the release on March 19.

@mavaylon1 mavaylon1 requested a review from rly March 17, 2024 18:11
@mavaylon1 mavaylon1 marked this pull request as ready for review March 17, 2024 18:13
@mavaylon1 mavaylon1 self-assigned this Mar 19, 2024
@mavaylon1 mavaylon1 changed the title Unwrap TermSetWrapper in ObjectMapper and no the IO Unwrap TermSetWrapper in ObjectMapper and not the IO Mar 19, 2024
@mavaylon1
Copy link
Contributor Author

mavaylon1 commented Mar 20, 2024

Review notes:

  1. The link ml requirement is needed. If not installed, this test will skip like all the other termset tests.
  2. I moved the test to test_io_h5_tools as this seems logical to me, though being in test_build.py seemed fine as well given it is a test on build.

@mavaylon1 mavaylon1 requested a review from rly March 20, 2024 03:00
@rly
Copy link
Contributor

rly commented Mar 20, 2024

I moved the test to test_io_h5_tools as this seems logical to me, though being in test_build.py seemed fine as well given it is a test on build.

Could you move it to test_build.py? Unless I remember wrong, I don't think this test is related to h5_tools.py

@mavaylon1
Copy link
Contributor Author

I moved the test to test_io_h5_tools as this seems logical to me, though being in test_build.py seemed fine as well given it is a test on build.

Could you move it to test_build.py? Unless I remember wrong, I don't think this test is related to h5_tools.py

I can! I just thought you wanted it moved from your prior comment.

@rly
Copy link
Contributor

rly commented Mar 20, 2024

Sorry for the confusion. I meant that the existing tests should not be modified unnecessarily, but you can add classes or methods to test_build.py

@mavaylon1 mavaylon1 enabled auto-merge (squash) March 20, 2024 23:12
@mavaylon1 mavaylon1 merged commit 5c85062 into dev Mar 20, 2024
28 checks passed
@mavaylon1 mavaylon1 deleted the flag2 branch March 20, 2024 23:16
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.

2 participants