-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Labels
help wanted: deep diverequest for community contributions that will involve many parts of the code baserequest for community contributions that will involve many parts of the code base
Milestone
Description
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:
pynwb/src/pynwb/form/build/map.py
Lines 777 to 783 in f671b8d
| 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?
Metadata
Metadata
Assignees
Labels
help wanted: deep diverequest for community contributions that will involve many parts of the code baserequest for community contributions that will involve many parts of the code base