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

DependenciesConfiguration

Dependency configuration class, for RuntimeContext.job_script_provider.

Functions

get_dependencies(builder)

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

ensure_galaxy_lib_available()

Module Contents

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)

tool_dependency_dir: str | None = None
dependency_resolvers_config_file: str | None = None
build_job_script(builder, command)

Use the galaxy-tool-util library to construct a build script.

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