cwl_utils.singularity
=====================

.. py:module:: cwl_utils.singularity

.. autoapi-nested-parse::

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



Functions
---------

.. autoapisummary::

   cwl_utils.singularity.get_version
   cwl_utils.singularity.is_apptainer_1_or_newer
   cwl_utils.singularity.is_version_2_6
   cwl_utils.singularity.is_version_3_or_newer
   cwl_utils.singularity.is_version_3_1_or_newer
   cwl_utils.singularity.is_version_3_4_or_newer


Module Contents
---------------

.. py:function:: 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.


.. py:function:: 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


.. py:function:: 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.


.. py:function:: is_version_3_or_newer()

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


.. py:function:: is_version_3_1_or_newer()

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


.. py:function:: is_version_3_4_or_newer()

   Detect if Singularity v3.4+ is available.


