nipoppy.config.main.Config

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

Schema for dataset configuration.

Parameters:

data (Any)

apply_substitutions_to_json(json_obj)

Apply substitutions to a JSON object.

Parameters:

json_obj (dict | list)

Return type:

dict | list

classmethod check_input(data)

Validate the raw input.

Specifically: - If session_ids is not given, set to be the same as visit_ids

Parameters:

data (Any)

get_pipeline_config(pipeline_name, pipeline_version)

Get the config for a pipeline.

Parameters:
  • pipeline_name (str)

  • pipeline_version (str)

Return type:

nipoppy.config.pipeline.BasePipelineConfig

get_pipeline_version(pipeline_name)

Get the first version associated with a pipeline.

Parameters:

pipeline_name (str) – Name of the pipeline, as specified in the config

Returns:

The pipeline version

Return type:

str

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()

Propagate the container config to all pipelines.

Return type:

typing_extensions.Self

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

BIDS_PIPELINES: list[nipoppy.config.pipeline.BidsPipelineConfig]
CUSTOM: dict
DATASET_NAME: str
DICOM_DIR_MAP_FILE: pathlib.Path | None
DICOM_DIR_PARTICIPANT_FIRST: bool | None
PROC_PIPELINES: list[nipoppy.config.pipeline.ProcPipelineConfig]
SESSION_IDS: list[str] | None
SUBSTITUTIONS: dict[str, str]
VISIT_IDS: list[str]
model_config

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