datalad.api.aggregate_metadata(dataset, guess_native_type=False, recursive=False, recursion_limit=None, save=True, if_dirty='save-before')

Aggregate meta data of a dataset for later query.

By default meta data is aggregated across all configured native meta data sources. Optionally, the type of available meta data can guessed, if no types are configures. Moreover, it is possible to aggregate meta data from any subdatasets into the superdataset, in order to facilitate data discovery without having to obtain any subdataset.

  • dataset (Dataset or None) – specify the dataset to perform the install operation on. If no dataset is given, an attempt is made to identify the dataset based on the current working directory and/or the path given.
  • guess_native_type (bool, optional) – guess native meta data type of datasets, if none is configured. With a configured, or auto-detected meta data type, no native meta data will be aggregated. [Default: False]
  • recursive (bool, optional) – if set, recurse into potential subdataset. [Default: False]
  • recursion_limit (int or None, optional) – limit recursion into subdataset to the given number of levels. [Default: None]
  • save (bool, optional) – by default all modifications to a dataset are immediately saved. Given this option will disable this behavior. [Default: True]
  • if_dirty – desired behavior if a dataset with unsaved changes is discovered: ‘fail’ will trigger an error and further processing is aborted; ‘save-before’ will save all changes prior any further action; ‘ignore’ let’s datalad proceed as if the dataset would not have unsaved changes. [Default: ‘save-before’]

Any datasets where (updated) aggregated meta data was saved.

Return type: