# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

SPEC_FILE_MERGE_METADATA = Metadata(
    id="2c5e3a5c053998c2a574a6f035a5993430771a18.boutiques",
    name="spec-file-merge",
    package="workbench",
    container_image_tag="brainlife/connectome_workbench:1.5.0-freesurfer-update",
)


class SpecFileMergeOutputs(typing.NamedTuple):
    """
    Output object returned when calling `spec_file_merge(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def spec_file_merge(
    spec_1: str,
    spec_2: str,
    out_spec: str,
    runner: Runner | None = None,
) -> SpecFileMergeOutputs:
    """
    Merge two spec files into one.
    
    The output spec file contains every file that is in either of the input spec
    files.
    
    Author: Connectome Workbench Developers
    
    URL: https://github.com/Washington-University/workbench
    
    Args:
        spec_1: first spec file to merge.
        spec_2: second spec file to merge.
        out_spec: output - output spec file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `SpecFileMergeOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(SPEC_FILE_MERGE_METADATA)
    cargs = []
    cargs.append("wb_command")
    cargs.append("-spec-file-merge")
    cargs.append(spec_1)
    cargs.append(spec_2)
    cargs.append(out_spec)
    ret = SpecFileMergeOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "SPEC_FILE_MERGE_METADATA",
    "SpecFileMergeOutputs",
    "spec_file_merge",
]
