diff --git a/docs/gallery/general/extensions.py b/docs/gallery/general/extensions.py index ddf9159c7..3e41e7a91 100644 --- a/docs/gallery/general/extensions.py +++ b/docs/gallery/general/extensions.py @@ -37,8 +37,7 @@ ns_builder = NWBNamespaceBuilder( "Extension for use in my Lab", "mylab", version="0.1.0" ) - -ns_builder.include_type("ElectricalSeries", namespace="core") +ns_builder.include_namespace("core") ext = NWBGroupSpec( "A custom ElectricalSeries for my lab", @@ -264,7 +263,7 @@ def __init__(self, **kwargs): ext_source = name + ".extensions.yaml" ns_builder = NWBNamespaceBuilder(name + " extensions", name, version="0.1.0") -ns_builder.include_type("NWBDataInterface", namespace="core") +ns_builder.include_namespace("core") potato = NWBGroupSpec( neurodata_type_def="Potato", diff --git a/test.py b/test.py index d00a0d07c..721cd803f 100644 --- a/test.py +++ b/test.py @@ -169,7 +169,8 @@ def validate_nwbs(): is_family_nwb_file = False try: with pynwb.NWBHDF5IO(nwb, mode='r') as io: - errors = validate(io, use_cached_namespaces=False) # previously io did not validate against cached namespaces + errors = validate(io, use_cached_namespaces=False) + errors.extend(validate(io, use_cached_namespaces=True)) except OSError as e: # if the file was created with the family driver, need to use the family driver to open it if 'family driver should be used' in str(e): @@ -180,6 +181,7 @@ def validate_nwbs(): with h5py.File(filename_pattern, mode='r', driver='family', memb_size=memb_size) as f: with pynwb.NWBHDF5IO(file=f, manager=None, mode='r') as io: errors = validate(io, use_cached_namespaces=False) + errors.extend(validate(io, use_cached_namespaces=True)) else: raise e