:py:mod:`wfexs_backend.__main__`
================================

.. py:module:: wfexs_backend.__main__

.. autodoc2-docstring:: wfexs_backend.__main__
   :allowtitles:

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

Classes
~~~~~~~

.. list-table::
   :class: autosummary longtable
   :align: left

   * - :py:obj:`WfExS_Commands <wfexs_backend.__main__.WfExS_Commands>`
     -
   * - :py:obj:`WfExS_Cache_Commands <wfexs_backend.__main__.WfExS_Cache_Commands>`
     -
   * - :py:obj:`WfExS_Staged_WorkDir_Commands <wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands>`
     -
   * - :py:obj:`WfExS_Export_Commands <wfexs_backend.__main__.WfExS_Export_Commands>`
     -

Functions
~~~~~~~~~

.. list-table::
   :class: autosummary longtable
   :align: left

   * - :py:obj:`genParserSub <wfexs_backend.__main__.genParserSub>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.genParserSub
          :summary:
   * - :py:obj:`processListFetchersCommand <wfexs_backend.__main__.processListFetchersCommand>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.processListFetchersCommand
          :summary:
   * - :py:obj:`processListPushersCommand <wfexs_backend.__main__.processListPushersCommand>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.processListPushersCommand
          :summary:
   * - :py:obj:`processListContainerFactoriesCommand <wfexs_backend.__main__.processListContainerFactoriesCommand>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.processListContainerFactoriesCommand
          :summary:
   * - :py:obj:`processListWorkflowEnginesCommand <wfexs_backend.__main__.processListWorkflowEnginesCommand>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.processListWorkflowEnginesCommand
          :summary:
   * - :py:obj:`processListLicencesCommand <wfexs_backend.__main__.processListLicencesCommand>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.processListLicencesCommand
          :summary:
   * - :py:obj:`processCacheCommand <wfexs_backend.__main__.processCacheCommand>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.processCacheCommand
          :summary:
   * - :py:obj:`processStagedWorkdirCommand <wfexs_backend.__main__.processStagedWorkdirCommand>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.processStagedWorkdirCommand
          :summary:
   * - :py:obj:`processExportCommand <wfexs_backend.__main__.processExportCommand>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.processExportCommand
          :summary:
   * - :py:obj:`get_wfexs_argparse <wfexs_backend.__main__.get_wfexs_argparse>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.get_wfexs_argparse
          :summary:
   * - :py:obj:`_get_wfexs_argparse_internal <wfexs_backend.__main__._get_wfexs_argparse_internal>`
     - .. autodoc2-docstring:: wfexs_backend.__main__._get_wfexs_argparse_internal
          :summary:
   * - :py:obj:`main <wfexs_backend.__main__.main>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.main
          :summary:

Data
~~~~

.. list-table::
   :class: autosummary longtable
   :align: left

   * - :py:obj:`DEFAULT_LOCAL_CONFIG_RELNAME <wfexs_backend.__main__.DEFAULT_LOCAL_CONFIG_RELNAME>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.DEFAULT_LOCAL_CONFIG_RELNAME
          :summary:
   * - :py:obj:`LOGGING_FORMAT <wfexs_backend.__main__.LOGGING_FORMAT>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.LOGGING_FORMAT
          :summary:
   * - :py:obj:`DEBUG_LOGGING_FORMAT <wfexs_backend.__main__.DEBUG_LOGGING_FORMAT>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.DEBUG_LOGGING_FORMAT
          :summary:
   * - :py:obj:`PathArgType <wfexs_backend.__main__.PathArgType>`
     - .. autodoc2-docstring:: wfexs_backend.__main__.PathArgType
          :summary:

API
~~~

.. py:class:: WfExS_Commands()
   :canonical: wfexs_backend.__main__.WfExS_Commands

   Bases: :py:obj:`wfexs_backend.common.StrDocEnum`

   .. py:attribute:: PopulateSideCaches
      :canonical: wfexs_backend.__main__.WfExS_Commands.PopulateSideCaches
      :value: ('populate-side-caches', 'Populate read-only side caches which live in XDG_CACHE_HOME (shared by all...

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.PopulateSideCaches

   .. py:attribute:: Init
      :canonical: wfexs_backend.__main__.WfExS_Commands.Init
      :value: ('init', 'Init local setup')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.Init

   .. py:attribute:: Cache
      :canonical: wfexs_backend.__main__.WfExS_Commands.Cache
      :value: ('cache', 'Cache handling subcommands')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.Cache

   .. py:attribute:: ConfigValidate
      :canonical: wfexs_backend.__main__.WfExS_Commands.ConfigValidate
      :value: ('config-validate', 'Validate the configuration files to be used for staging and execution')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.ConfigValidate

   .. py:attribute:: ListFetchers
      :canonical: wfexs_backend.__main__.WfExS_Commands.ListFetchers
      :value: ('list-fetchers', 'List the supported fetchers / schemes')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.ListFetchers

   .. py:attribute:: ListPushers
      :canonical: wfexs_backend.__main__.WfExS_Commands.ListPushers
      :value: ('list-exporters', 'List the supported export plugins')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.ListPushers

   .. py:attribute:: ListLicences
      :canonical: wfexs_backend.__main__.WfExS_Commands.ListLicences
      :value: ('list-licences',)

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.ListLicences

   .. py:attribute:: ListContainerFactories
      :canonical: wfexs_backend.__main__.WfExS_Commands.ListContainerFactories
      :value: ('list-container-factories', 'List the supported container factories')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.ListContainerFactories

   .. py:attribute:: ListWorkflowEngines
      :canonical: wfexs_backend.__main__.WfExS_Commands.ListWorkflowEngines
      :value: ('list-workflow-engines', 'List the supported workflow engines')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.ListWorkflowEngines

   .. py:attribute:: Stage
      :canonical: wfexs_backend.__main__.WfExS_Commands.Stage
      :value: ('stage', 'Prepare the staging (working) directory for workflow execution, fetching dependencies and...

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.Stage

   .. py:attribute:: ReStage
      :canonical: wfexs_backend.__main__.WfExS_Commands.ReStage
      :value: ('re-stage', 'Prepare a new staging (working) directory for workflow execution, repeating the fetch ...

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.ReStage

   .. py:attribute:: MountWorkDir
      :canonical: wfexs_backend.__main__.WfExS_Commands.MountWorkDir
      :value: ('mount-workdir', 'Mount the encrypted staging directory on secure staging scenarios')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.MountWorkDir

   .. py:attribute:: StagedWorkDir
      :canonical: wfexs_backend.__main__.WfExS_Commands.StagedWorkDir
      :value: ('staged-workdir', 'Staged working directories handling subcommands')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.StagedWorkDir

   .. py:attribute:: Import
      :canonical: wfexs_backend.__main__.WfExS_Commands.Import
      :value: ('import', 'Workflow Run RO-Crate import into a new staged working directory')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.Import

   .. py:attribute:: Export
      :canonical: wfexs_backend.__main__.WfExS_Commands.Export
      :value: ('export', 'Staged working directories export subcommands')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.Export

   .. py:attribute:: ExportStage
      :canonical: wfexs_backend.__main__.WfExS_Commands.ExportStage
      :value: ('export-stage', 'Export the staging directory as an RO-Crate')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.ExportStage

   .. py:attribute:: OfflineExecute
      :canonical: wfexs_backend.__main__.WfExS_Commands.OfflineExecute
      :value: ('offline-execute', 'Execute an already prepared workflow in the staging directory')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.OfflineExecute

   .. py:attribute:: Execute
      :canonical: wfexs_backend.__main__.WfExS_Commands.Execute
      :value: ('execute', 'Execute the stage + offline-execute + export steps')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.Execute

   .. py:attribute:: ExportResults
      :canonical: wfexs_backend.__main__.WfExS_Commands.ExportResults
      :value: ('export-results', 'Export the results to a remote location, gathering their public ids')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.ExportResults

   .. py:attribute:: ExportCrate
      :canonical: wfexs_backend.__main__.WfExS_Commands.ExportCrate
      :value: ('export-crate', 'Export an already executed workflow in the staging directory as an RO-Crate')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Commands.ExportCrate

.. py:class:: WfExS_Cache_Commands()
   :canonical: wfexs_backend.__main__.WfExS_Cache_Commands

   Bases: :py:obj:`wfexs_backend.common.StrDocEnum`

   .. py:attribute:: List
      :canonical: wfexs_backend.__main__.WfExS_Cache_Commands.List
      :value: ('ls', 'List the cache entries')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Cache_Commands.List

   .. py:attribute:: Status
      :canonical: wfexs_backend.__main__.WfExS_Cache_Commands.Status
      :value: ('status', 'Show the cache entries metadata')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Cache_Commands.Status

   .. py:attribute:: Inject
      :canonical: wfexs_backend.__main__.WfExS_Cache_Commands.Inject
      :value: ('inject', 'Inject a new entry in the cache')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Cache_Commands.Inject

   .. py:attribute:: Fetch
      :canonical: wfexs_backend.__main__.WfExS_Cache_Commands.Fetch
      :value: ('fetch', 'Fetch a new cache entry, giving as input both the URI and optionally both a security cont...

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Cache_Commands.Fetch

   .. py:attribute:: Remove
      :canonical: wfexs_backend.__main__.WfExS_Cache_Commands.Remove
      :value: ('rm', 'Remove an entry from the cache')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Cache_Commands.Remove

   .. py:attribute:: Validate
      :canonical: wfexs_backend.__main__.WfExS_Cache_Commands.Validate
      :value: ('validate', 'Validate the consistency of the cache')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Cache_Commands.Validate

.. py:class:: WfExS_Staged_WorkDir_Commands()
   :canonical: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands

   Bases: :py:obj:`wfexs_backend.common.StrDocEnum`

   .. py:attribute:: OfflineExecute
      :canonical: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.OfflineExecute
      :value: ('offline-exec', 'Offline execute the staged instances which match the input pattern')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.OfflineExecute

   .. py:attribute:: OfflineQueueExecute
      :canonical: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.OfflineQueueExecute
      :value: ('offline-queue', 'Queue offline execution about the staged instances which match the input pattern'...

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.OfflineQueueExecute

   .. py:attribute:: List
      :canonical: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.List
      :value: ('ls', 'List the staged instances\n\tIt shows the instance id, nickname,\n\tencryption and whether t...

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.List

   .. py:attribute:: Mount
      :canonical: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.Mount
      :value: ('mount', 'Mount the staged instances which match the input pattern')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.Mount

   .. py:attribute:: Remove
      :canonical: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.Remove
      :value: ('rm', 'Removes the staged instances which match the input pattern')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.Remove

   .. py:attribute:: Shell
      :canonical: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.Shell
      :value: ('shell', 'Launches a command in the workdir\n\tFirst parameter is either the staged instance id or ...

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.Shell

   .. py:attribute:: Status
      :canonical: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.Status
      :value: ('status', 'Shows staged instances status')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.Status

   .. py:attribute:: CreateStagedROCrate
      :canonical: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.CreateStagedROCrate
      :value: ('create-staged-crate', 'It creates an RO-Crate from the prospective provenance')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.CreateStagedROCrate

   .. py:attribute:: CreateProvenanceROCrate
      :canonical: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.CreateProvenanceROCrate
      :value: ('create-prov-crate', 'It creates an RO-Crate from the retrospective provenance (after a workflow ex...

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Staged_WorkDir_Commands.CreateProvenanceROCrate

.. py:class:: WfExS_Export_Commands()
   :canonical: wfexs_backend.__main__.WfExS_Export_Commands

   Bases: :py:obj:`wfexs_backend.common.StrDocEnum`

   .. py:attribute:: List
      :canonical: wfexs_backend.__main__.WfExS_Export_Commands.List
      :value: ('ls', 'List the public identifiers obtained from previous export actions')

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Export_Commands.List

   .. py:attribute:: Run
      :canonical: wfexs_backend.__main__.WfExS_Export_Commands.Run
      :value: ('run', 'Run the different export actions, pushing the exported content and gathering the obtained p...

      .. autodoc2-docstring:: wfexs_backend.__main__.WfExS_Export_Commands.Run

.. py:data:: DEFAULT_LOCAL_CONFIG_RELNAME
   :canonical: wfexs_backend.__main__.DEFAULT_LOCAL_CONFIG_RELNAME
   :value: 'wfexs_config.yml'

   .. autodoc2-docstring:: wfexs_backend.__main__.DEFAULT_LOCAL_CONFIG_RELNAME

.. py:data:: LOGGING_FORMAT
   :canonical: wfexs_backend.__main__.LOGGING_FORMAT
   :value: '%(asctime)-15s - [%(levelname)s] %(message)s'

   .. autodoc2-docstring:: wfexs_backend.__main__.LOGGING_FORMAT

.. py:data:: DEBUG_LOGGING_FORMAT
   :canonical: wfexs_backend.__main__.DEBUG_LOGGING_FORMAT
   :value: '%(asctime)-15s - [%(name)s %(funcName)s %(lineno)d][%(levelname)s] %(message)s'

   .. autodoc2-docstring:: wfexs_backend.__main__.DEBUG_LOGGING_FORMAT

.. py:data:: PathArgType
   :canonical: wfexs_backend.__main__.PathArgType
   :value: None

   .. autodoc2-docstring:: wfexs_backend.__main__.PathArgType

.. py:function:: genParserSub(sp: argparse._SubParsersAction[argparse.ArgumentParser], command: wfexs_backend.__main__.WfExS_Commands, preStageParams: bool = False, postStageParams: bool = False, crateParams: bool = False, exportParams: bool = False) -> argparse.ArgumentParser
   :canonical: wfexs_backend.__main__.genParserSub

   .. autodoc2-docstring:: wfexs_backend.__main__.genParserSub

.. py:function:: processListFetchersCommand(wfBackend: wfexs_backend.wfexs_backend.WfExSBackend, logLevel: int) -> int
   :canonical: wfexs_backend.__main__.processListFetchersCommand

   .. autodoc2-docstring:: wfexs_backend.__main__.processListFetchersCommand

.. py:function:: processListPushersCommand(wfBackend: wfexs_backend.wfexs_backend.WfExSBackend, logLevel: int) -> int
   :canonical: wfexs_backend.__main__.processListPushersCommand

   .. autodoc2-docstring:: wfexs_backend.__main__.processListPushersCommand

.. py:function:: processListContainerFactoriesCommand(wfBackend: wfexs_backend.wfexs_backend.WfExSBackend, logLevel: int) -> int
   :canonical: wfexs_backend.__main__.processListContainerFactoriesCommand

   .. autodoc2-docstring:: wfexs_backend.__main__.processListContainerFactoriesCommand

.. py:function:: processListWorkflowEnginesCommand(wfBackend: wfexs_backend.wfexs_backend.WfExSBackend, logLevel: int) -> int
   :canonical: wfexs_backend.__main__.processListWorkflowEnginesCommand

   .. autodoc2-docstring:: wfexs_backend.__main__.processListWorkflowEnginesCommand

.. py:function:: processListLicencesCommand(wfBackend: wfexs_backend.wfexs_backend.WfExSBackend, logLevel: int) -> int
   :canonical: wfexs_backend.__main__.processListLicencesCommand

   .. autodoc2-docstring:: wfexs_backend.__main__.processListLicencesCommand

.. py:function:: processCacheCommand(wfBackend: wfexs_backend.wfexs_backend.WfExSBackend, args: argparse.Namespace, logLevel: int) -> int
   :canonical: wfexs_backend.__main__.processCacheCommand

   .. autodoc2-docstring:: wfexs_backend.__main__.processCacheCommand

.. py:function:: processStagedWorkdirCommand(wB: wfexs_backend.wfexs_backend.WfExSBackend, args: argparse.Namespace, loglevel: int) -> int
   :canonical: wfexs_backend.__main__.processStagedWorkdirCommand

   .. autodoc2-docstring:: wfexs_backend.__main__.processStagedWorkdirCommand

.. py:function:: processExportCommand(wfInstance: wfexs_backend.workflow.WF, args: argparse.Namespace, loglevel: int) -> int
   :canonical: wfexs_backend.__main__.processExportCommand

   .. autodoc2-docstring:: wfexs_backend.__main__.processExportCommand

.. py:function:: get_wfexs_argparse() -> argparse.ArgumentParser
   :canonical: wfexs_backend.__main__.get_wfexs_argparse

   .. autodoc2-docstring:: wfexs_backend.__main__.get_wfexs_argparse

.. py:function:: _get_wfexs_argparse_internal(docgen: bool) -> Tuple[argparse.ArgumentParser, str]
   :canonical: wfexs_backend.__main__._get_wfexs_argparse_internal

   .. autodoc2-docstring:: wfexs_backend.__main__._get_wfexs_argparse_internal

.. py:function:: main() -> None
   :canonical: wfexs_backend.__main__.main

   .. autodoc2-docstring:: wfexs_backend.__main__.main
