nipoppy.config.schema

Helpers for configuration schema version checks.

Module Contents

nipoppy.config.schema.ensure_schema_support(schema_version, config_type)

Validate schema version is supported by this version of Nipoppy.

Raises:

ConfigError – If schema version is invalid or newer than the one supported by this version of Nipoppy.

Parameters:
Return type:

str

nipoppy.config.schema.ensure_schema_version_exists(fpath_config, config_type, strict=False)

Check if the schema version field is set.

Parameters:
Return type:

str

nipoppy.config.schema.get_current_schema_version(config_type)

Get the current schema version for a configuration type.

Parameters:

config_type (nipoppy.env.ConfigType)

Return type:

str

nipoppy.config.schema.EARLIEST_SCHEMA_VERSION = '1.0'
nipoppy.config.schema.SCHEMA_VERSION_FIELD = 'SCHEMA_VERSION'
nipoppy.config.schema.logger