bidsbuilder.modules.core.filenames

class CompositeFilename

Bases: filenameBase

Base class for filename generation for files with entities Attributes: parent (Union[filenameBase, None]): Parent filename object to inherit from name (str): Name of the current filename component

__init__()

Method generated by attrs for class CompositeFilename.

Return type:

None

classmethod create(entities=None, suffix=None, datatype=None)
Parameters:
  • entities (dict | None)

  • suffix (str | None)

  • datatype (str | None)

datatype: ClassVar[raw_Datatype]
entities: ClassVar[dict[str, Entity]]
property local_name: str

construct instance name from attributes unique to the instance.

property name: str

Construct the full filename by combining parent names and current name.

property parent: Self
property resolved_datatype: str

The current instance’s datatype if specified, otherwise inherited from parent folders

property resolved_entities: dict

The current instance’s entities as well as those inherited from parents (i.e. session or subject)

property resolved_suffix: str

The current instance’s suffix if specified, otherwise inherited from parent folders

schema: ClassVar[list]
suffix: ClassVar[Suffix]
update_entity(key, value)

Update an entity value, triggering schema checks

Parameters:
  • key (str)

  • value (Any)

class agnosticFilename

Bases: filenameBase

__init__(_stem='', _valid_extensions=[], _cur_ext='')

Method generated by attrs for class agnosticFilename.

Parameters:
  • _stem (str)

  • _valid_extensions (list[str])

  • _cur_ext (str)

Return type:

None

property local_name: str
property name: str
property parent: Self