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

raise Error for orphaned containers #655

Open
4 tasks done
ajtritt opened this issue Oct 6, 2018 · 1 comment
Open
4 tasks done

raise Error for orphaned containers #655

ajtritt opened this issue Oct 6, 2018 · 1 comment
Assignees
Labels
help wanted: deep dive request for community contributions that will involve many parts of the code base
Milestone

Comments

@ajtritt
Copy link
Member

ajtritt commented Oct 6, 2018

Problem/Use Case

Currently, orphaned containers i.e. containers with no parent result in a raised warning. This should raise an Error instead.

The relevant code is in pynwb.form.build.map.ObjectMapper.__add_containers:

def __add_containers(self, builder, spec, value, build_manager, source, parent_container):
if isinstance(value, Container):
if value.parent is None:
msg = "'%s' (%s) for '%s' (%s)"\
% (value.name, getattr(value, self.spec.type_key()),
builder.name, self.spec.data_type_def)
warnings.warn(msg, OrphanContainerWarning)

This will likely break some tests and will require refactoring some parts of the test suite.

Checklist

  • Have you ensured the feature or change was not already reported ?
  • Have you included a brief and descriptive title?
  • Have you included a clear description of the problem you are trying to solve?
  • Have you included a minimal code snippet that reproduces the issue you are encountering?
@ajtritt ajtritt added 2.x help wanted: deep dive request for community contributions that will involve many parts of the code base labels Oct 6, 2018
@ajtritt ajtritt added this to the NWB 2.x milestone Oct 6, 2018
@ajtritt ajtritt self-assigned this Oct 6, 2018
@rly rly removed the 2.x label Sep 10, 2021
@oruebel
Copy link
Contributor

oruebel commented Sep 10, 2021

@ajtritt @rly can this issue be closed or if not should this be moved to HDMF?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted: deep dive request for community contributions that will involve many parts of the code base
Projects
None yet
Development

No branches or pull requests

3 participants