-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move NWBTable to Table * add Row class and RowGetter for working with Table objects * add new ExternalResources Container class with 4 compound-dtype tables
- Loading branch information
Showing
16 changed files
with
1,076 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule hdmf-common-schema
updated
5 files
+1 −1 | .github/PULL_REQUEST_TEMPLATE.md | |
+10 −6 | .github/PULL_REQUEST_TEMPLATE/release.md | |
+4 −1 | common/namespace.yaml | |
+67 −0 | common/resources.yaml | |
+13 −6 | docs/source/software_process.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from . import table # noqa: F401 | ||
from . import resources # noqa: F401 | ||
from . import multi # noqa: F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from ...build import ObjectMapper | ||
from ..resources import ExternalResources, KeyTable, ResourceTable, ObjectTable, ObjectKeyTable | ||
from .. import register_map | ||
|
||
|
||
@register_map(ExternalResources) | ||
class ExternalResourcesMap(ObjectMapper): | ||
|
||
def construct_helper(self, name, parent_builder, table_cls, manager): | ||
"""Create a new instance of table_cls with data from parent_builder[name]. | ||
The DatasetBuilder for name is associated with data_type Data and container class Data, | ||
but users should use the more specific table_cls for these datasets. | ||
""" | ||
parent = manager._get_proxy_builder(parent_builder) | ||
builder = parent_builder[name] | ||
src = builder.source | ||
oid = builder.attributes.get(self.spec.id_key()) | ||
kwargs = dict(name=builder.name, data=builder.data) | ||
return self.__new_container__(table_cls, src, parent, oid, **kwargs) | ||
|
||
@ObjectMapper.constructor_arg('keys') | ||
def keys(self, builder, manager): | ||
return self.construct_helper('keys', builder, KeyTable, manager) | ||
|
||
@ObjectMapper.constructor_arg('resources') | ||
def resources(self, builder, manager): | ||
return self.construct_helper('resources', builder, ResourceTable, manager) | ||
|
||
@ObjectMapper.constructor_arg('objects') | ||
def objects(self, builder, manager): | ||
return self.construct_helper('objects', builder, ObjectTable, manager) | ||
|
||
@ObjectMapper.constructor_arg('object_keys') | ||
def object_keys(self, builder, manager): | ||
return self.construct_helper('object_keys', builder, ObjectKeyTable, manager) |
Oops, something went wrong.