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

import typing
import pathlib
from styxdefs import *
import dataclasses

CHECK_RECONS_SH_METADATA = Metadata(
    id="52142d2a907acd3a0d9631fc56bcb011b2c8e9af.boutiques",
    name="check_recons.sh",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def check_recons_sh(
    subject_directory: str | None = None,
    runner: Runner | None = None,
) -> CheckReconsShOutputs:
    """
    Checks the status of subjects being processed by recon-all in the SUBJECTS_DIR
    or a specified directory.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subject_directory: Directory where subjects are being processed. If not\
            specified, uses SUBJECTS_DIR.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `CheckReconsShOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(CHECK_RECONS_SH_METADATA)
    cargs = []
    cargs.append("check_recons.sh")
    if subject_directory is not None:
        cargs.append(subject_directory)
    ret = CheckReconsShOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "CHECK_RECONS_SH_METADATA",
    "CheckReconsShOutputs",
    "check_recons_sh",
]
