nipoppy.config.Config

class nipoppy.config.Config(/, **data)

Schema for dataset configuration.

Parameters:

data (Any)

apply_pipeline_variables(pipeline_type, pipeline_name, pipeline_version, json_obj)

Apply pipeline-specific variables to a JSON object.

Parameters:
Return type:

dict | list

classmethod check_input(data)

Validate the raw input.

Specifically:

  • If DATASET_NAME, VISIT_IDS, or SESSION_IDS are present, ignore them and emit a deprecation warning

  • Convert HPC_PREAMBLE to list of strings if needed

Parameters:

data (Any)

classmethod load(path, apply_substitutions=True)

Load a dataset configuration from a file.

Parameters:

path (nipoppy.env.StrOrPathLike)

Return type:

typing_extensions.Self

propagate_container_config_to_pipeline(pipeline_config)

Propagate the global container config to a pipeline config.

Parameters:

pipeline_config (nipoppy.config.pipeline.BasePipelineConfig)

Return type:

nipoppy.config.pipeline.BasePipelineConfig

save(fpath, **kwargs)

Save the config to a JSON file.

Parameters:

fpath (nipoppy.env.StrOrPathLike) – Path to the JSON file to write

validate_and_process()

Validate and process the configuration.

Return type:

typing_extensions.Self

CUSTOM: dict = None
DICOM_DIR_MAP_FILE: pathlib.Path | None = None
DICOM_DIR_PARTICIPANT_FIRST: bool | None = None
HPC_PREAMBLE: list[str] = None
PIPELINE_VARIABLES: PipelineVariables = None
SUBSTITUTIONS: dict[str, str] = None
model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].