cwltool.software_requirements

This module handles resolution of SoftwareRequirement hints.

This is accomplished mainly by adapting cwltool internals to galaxy-tool-util’s concept of “dependencies”. Despite the name, galaxy-tool-util is a light weight library that can be used to map SoftwareRequirements in all sorts of ways - Homebrew, Conda, custom scripts, environment modules. We’d be happy to find ways to adapt new packages managers and such as well.

Attributes

ToolRequirement

SOFTWARE_REQUIREMENTS_ENABLED

COMMAND_WITH_DEPENDENCIES_TEMPLATE

Classes

HasReqsHints

Base class for get_requirement().

DependenciesConfiguration

Dependency configuration class, for RuntimeContext.job_script_provider.

Functions

get_dependencies(builder)

get_container_from_software_requirements(...[, ...])

ensure_galaxy_lib_available()

Module Contents

class cwltool.software_requirements.HasReqsHints

Base class for get_requirement().

get_requirement(feature)

Retrieve the named feature from the requirements field, or the hints field.

Parameters:

feature (str)

Return type:

Tuple[Optional[CWLObjectType], Optional[bool]]

cwltool.software_requirements.ToolRequirement = None
cwltool.software_requirements.SOFTWARE_REQUIREMENTS_ENABLED
cwltool.software_requirements.COMMAND_WITH_DEPENDENCIES_TEMPLATE
class cwltool.software_requirements.DependenciesConfiguration(args)

Dependency configuration class, for RuntimeContext.job_script_provider.

Parameters:

args (argparse.Namespace)

build_job_script(builder, command)
Parameters:
Return type:

str

cwltool.software_requirements.get_dependencies(builder)
Parameters:

builder (cwltool.utils.HasReqsHints)

Return type:

galaxy.tool_util.deps.requirements.ToolRequirements

cwltool.software_requirements.get_container_from_software_requirements(use_biocontainers, builder, container_image_cache_path='.')
Parameters:
  • use_biocontainers (bool)

  • builder (cwltool.utils.HasReqsHints)

  • container_image_cache_path (Optional[str])

Return type:

Optional[str]

cwltool.software_requirements.ensure_galaxy_lib_available()
Return type:

None