niprov.config module¶
-
class
niprov.config.
Configuration
(configFilePath='~/niprov.cfg')¶ Bases:
object
General settings for niprov.
Individual settings are documented as follows;
- setting = default_value
- type - Explanation.
The settings can be changed in the configuration file, or in code.
All settings:
-
attach
= False¶ bool: Attach provenance to image files. For nifti files for instance, this means inserting a header extension with serialized provenance. See ‘attach_format’ to configure which data format is used.
-
attach_format
= 'json'¶ string: Format in which to attach provenance to the file. One of ‘json’, or ‘xml’. For example, if set to ‘json’ and the ‘attach’ option is True, this will add a header extension to nifti files created with the relevant provenance data in json format.
-
database_type
= 'file'¶ str: Type of backend in which to store provenance. Currently only ‘file’ or ‘MongoDB’
-
database_url
= '~/provenance.json'¶ str: URL of the database. If
database-type
isfile
, this is the path to the file.
-
discover_file_extensions
= ['.PAR', '.dcm', '.fif', '.cnt']¶ list: Discover uses this to determine which files to include. Not strictly extensions, can be any string that appears in the file name. Use comma’s to separate items.
-
dryrun
= False¶ bool: Do not execute commands or make lasting changes to the provenance database.
-
user
= ''¶ string: Name of the user creating provenance. If not provided, will be determined based on OS information or as passed as an argument to the provenance operation. See also
niprov.users
-
verbosity
= 'info'¶ string: Level of information to report. One of ‘debug’,’info’,’warning’, ‘error’. Any level includes higher levels, i.e. ‘info’ will log messages of that are deemed ‘info’, ‘warning’ or ‘error’.