-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add caching specification to file to ensure readability of distributed files #242
Merged
Conversation
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
jcfr
force-pushed
the
enh-cache_spec-conslidated
branch
2 times, most recently
from
November 11, 2017 16:10
419d983
to
a5e26a7
Compare
Codecov Report
@@ Coverage Diff @@
## dev #242 +/- ##
=========================================
- Coverage 56.06% 55.2% -0.87%
=========================================
Files 56 56
Lines 5105 5355 +250
=========================================
+ Hits 2862 2956 +94
- Misses 2243 2399 +156
Continue to review full report at Codecov.
|
…d files NWB files contain a currently freeform area in ``/general/specifications`` for storing specifications. To ease use of the specification data it is now possible to: * Assign a neurodata_type to ``/general/specifications`` and create a custom ``NWBContainer`` class to manage specifications. * Create a new neurodata_type to be stored in ``/general/specifications`` to structure the storage of namespace and associated specification files rather than requiring that specs be stored in a single dataset * Automatically write all specs used by (or registered with) PyNWB to the NWB file when a file is written. This will help ensure that the spec for all objects are always stored in the file. * Add ability to use use specifications (including custom extensions) from the HDF5 directly on read. We possibly need an option here to allow the user decide whether to use specs from the HDF5 file or the specs currently registered with PyNWB. See #44, #108 More specifically, this commit adds: * class for loading namespace * class for writing namespace * tooling to ``h5tools`` for caching spec to file * getter for ``FORMIO`` source * return of registered types to ``SpecCatalog.auto_register`` * tracking of type sources in ``NamespaceCatalog`` * class for building specification files to ``NamespaceBuilder`` * requirement that spec files be in the same directory as namespace file * getters for ``NamespaceCatalog`` to ``BuildManager`` * tracking of overridden specs * ability to read/write specs to/from HDF5 file * reference-to-reference write * roundtrip test for caching spec to hdf5 file * add roundtrip test for caching spec This commit also implements the following changes: * make dataset fill methods classmethods * make ``Spec`` and ``Namespace`` catalogs maintain specs and namespaces with OrderedDict * require parent spec be passed in, rather than parent spec nam * import ``SpecNamespace`` to ``h5tools`` * fix bug when showing default strings in signature * allow string to be passed into ``BaseStorageSpec`` when extending * refactor caching of spec * import HDF5 spec reader/writer classes to package-level * use ``unittest2`` instead of ``unittest`` for ``integration.test_io`` * import spec reader/writer abstract classes to ``form.spec`` subpackage * deploy spec caching feature
jcfr
force-pushed
the
enh-cache_spec-conslidated
branch
from
November 11, 2017 16:56
a5e26a7
to
41dd48e
Compare
dorukozturk
approved these changes
Nov 11, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NWB files contain a currently freeform area in
/general/specifications
for storingspecifications. To ease use of the specification data it is now possible to:
Assign a neurodata_type to
/general/specifications
and create a customNWBContainer
class to manage specifications.
Create a new neurodata_type to be stored in
/general/specifications
to structure thestorage of namespace and associated specification files rather than requiring that specs
be stored in a single dataset
Automatically write all specs used by (or registered with) PyNWB to the NWB file when a
file is written. This will help ensure that the spec for all objects are always stored
in the file.
Add ability to use use specifications (including custom extensions) from the HDF5 directly
on read. We possibly need an option here to allow the user decide whether to use specs from
the HDF5 file or the specs currently registered with PyNWB.
See #44, #108
More specifically, this commit adds:
h5tools
for caching spec to fileFORMIO
sourceSpecCatalog.auto_register
NamespaceCatalog
NamespaceBuilder
NamespaceCatalog
toBuildManager
This commit also implements the following changes:
Spec
andNamespace
catalogs maintain specs and namespaces with OrderedDictSpecNamespace
toh5tools
BaseStorageSpec
when extendingunittest2
instead ofunittest
forintegration.test_io
form.spec
subpackage