bidsbuilder.modules.file_bases.json_files¶
- JSON_check_schema(*args, **kwargs)¶
- Return type:
Generator[tuple,None,None]
- class JSON_shema_checker¶
Bases:
schema_checker_OLD- classmethod check_schema(reference, schema, cur_labels=None, add_callbacks=False, tags=None)¶
generator, which when given: a JSON object to check, a schema, Optionally: a list of current labels, a bool to add callbacks, a list of tags to check yields tuples of the format: (“add”/”del”, label, fields) the first variable tells whether to add or remove the given fields
- Return type:
Generator[tuple[str,str,Any],None,None]- Parameters:
reference (DatasetCore)
schema (Namespace)
cur_labels (set)
add_callbacks (bool)
tags (Union[str, list])
- static check_tags(selHook, tags=None)¶
- Return type:
bool- Parameters:
selHook (selectorHook)
tags (str | list)
- class JSONfile¶
Bases:
DatasetCore- __init__(_level='optional')¶
Method generated by attrs for class JSONfile.
- Parameters:
_level (str)
- Return type:
None
- classmethod create(*, _level='optional', exists=True, **kwargs)¶
- Return type:
Self- Parameters:
_level (str)
exists (bool)
- delete_self()¶
- exists: ClassVar[bool]¶
- property filename: filenameBase¶
- metadata: ClassVar[metadataDict[str, 'Metadata']]¶
- property rawMetadata¶
- class agnostic_JSONfile¶
Bases:
JSONfile- __init__(_level='optional')¶
Method generated by attrs for class agnostic_JSONfile.
- Parameters:
_level (str)
- Return type:
None
- classmethod create(*, _level='optional', exists=True, **kwargs)¶
- Return type:
Self- Parameters:
_level (str)
exists (bool)
- delete_self()¶
- exists: ClassVar[bool]¶
- property filename: filenameBase¶
- metadata: ClassVar[metadataDict[str, 'Metadata']]¶
- property rawMetadata¶
- class extra_JSONfile¶
Bases:
JSONfile- __init__(_level='optional')¶
Method generated by attrs for class extra_JSONfile.
- Parameters:
_level (str)
- Return type:
None
- classmethod create(*, _level='optional', exists=True, **kwargs)¶
- Return type:
Self- Parameters:
_level (str)
exists (bool)
- delete_self()¶
- exists: ClassVar[bool]¶
- property filename: filenameBase¶
- metadata: ClassVar[metadataDict[str, 'Metadata']]¶
- property rawMetadata¶
- class metadataDict¶
Bases:
MinimalDict- __init__(*args, **kwargs)¶
- clear() None. Remove all items from D.¶
- del_metadata(to_remove)¶
- Return type:
dict- Parameters:
to_remove (list)
- forbidden_instance_names = {'_check_callback_', '_observable_container_init_'}¶
- get(k[, d]) D[k] if k in D, else d. d defaults to None.¶
- items() a set-like object providing a view on D's items¶
- keys() a set-like object providing a view on D's keys¶
- pop(k[, d]) v, remove specified key and return the corresponding value.¶
If key is not found, d is returned if given, otherwise KeyError is raised.
- popitem() (k, v), remove and return some (key, value) pair¶
as a 2-tuple; but raise KeyError if D is empty.
- set_metadata(dict)¶
- Parameters:
dict (dict)
- setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D¶
- update([E, ]**F) None. Update D from mapping/iterable E and F.¶
If E present and has a .keys() method, does: for k in E.keys(): D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
- values() an object providing a view on D's values¶
- class sidecar_JSONfile¶
Bases:
JSONfile- __init__(_level='optional')¶
Method generated by attrs for class sidecar_JSONfile.
- Parameters:
_level (str)
- Return type:
None
- classmethod create(*, _level='optional', exists=True, **kwargs)¶
- Return type:
Self- Parameters:
_level (str)
exists (bool)
- delete_self()¶
- exists: ClassVar[bool]¶
- property filename: filenameBase¶
- metadata: ClassVar[metadataDict[str, 'Metadata']]¶
- property rawMetadata¶