# cwl_utils.singularity

Support Singularity{,-CE} {2,3}.x or Apptainer 1.x.

## Functions

`get_version`() | Parse the output of 'singularity --version' to determine the flavor and version.
`is_apptainer_1_or_newer`() | Check if apptainer singularity distribution is version 1.0 or higher.
`is_version_2_6`() | Check if this singularity version is exactly version 2.6.
`is_version_3_or_newer`() | Check if this version is singularity version 3 or newer or equivalent.
`is_version_3_1_or_newer`() | Check if this version is singularity version 3.1 or newer or equivalent.
`is_version_3_4_or_newer`() | Detect if Singularity v3.4+ is available.

## Module Contents

cwl_utils.singularity.get_version()

  Parse the output of ‘singularity –version’ to determine the flavor and version.

  Both pieces of information will be cached.

  Returns:

    A tuple containing: - A tuple with major and minor version numbers as integer. - A string with the name of the singularity flavor.

  Return type:

    tuple[list[int], str]

cwl_utils.singularity.is_apptainer_1_or_newer()

  Check if apptainer singularity distribution is version 1.0 or higher.

  Apptainer v1.0.0 is compatible with SingularityCE 3.9.5. See: https://github.com/apptainer/apptainer/releases

  Return type:

    bool

cwl_utils.singularity.is_version_2_6()

  Check if this singularity version is exactly version 2.6.

  Also returns False if the flavor is not singularity or singularity-ce.

  Return type:

    bool

cwl_utils.singularity.is_version_3_or_newer()

  Check if this version is singularity version 3 or newer or equivalent.

  Return type:

    bool

cwl_utils.singularity.is_version_3_1_or_newer()

  Check if this version is singularity version 3.1 or newer or equivalent.

  Return type:

    bool

cwl_utils.singularity.is_version_3_4_or_newer()

  Detect if Singularity v3.4+ is available.

  Return type:

    bool