diff --git a/lib/galaxy/tool_util/deps/requirements.py b/lib/galaxy/tool_util/deps/requirements.py index fcc4158d272e..fba3ecb4830c 100644 --- a/lib/galaxy/tool_util/deps/requirements.py +++ b/lib/galaxy/tool_util/deps/requirements.py @@ -307,11 +307,19 @@ def resource_requirements_from_list(requirements: Iterable[Dict[str, Any]]) -> L class SecretOrVariable: - def __init__(self, type: str, name: str, inject_as_env: str, label: str = "") -> None: + def __init__( + self, + type: str, + name: str, + inject_as_env: str, + label: str = "", + description: str = "", + ) -> None: self.type = type self.name = name self.inject_as_env = inject_as_env self.label = label + self.description = description if self.type not in {"secret", "variable"}: raise ValueError(f"Invalid credential type '{self.type}'") if not self.inject_as_env: @@ -323,6 +331,7 @@ def to_dict(self) -> Dict[str, Any]: "name": self.name, "inject_as_env": self.inject_as_env, "label": self.label, + "description": self.description, } @classmethod @@ -332,6 +341,7 @@ def from_element(cls, elem) -> "SecretOrVariable": name=elem.get("name"), inject_as_env=elem.get("inject_as_env"), label=elem.get("label", ""), + description=elem.get("description", ""), ) @classmethod @@ -340,7 +350,8 @@ def from_dict(cls, dict: Dict[str, Any]) -> "SecretOrVariable": name = dict["name"] inject_as_env = dict["inject_as_env"] label = dict.get("label", "") - return cls(type=type, name=name, inject_as_env=inject_as_env, label=label) + description = dict.get("description", "") + return cls(type=type, name=name, inject_as_env=inject_as_env, label=label, description=description) class CredentialsRequirement: diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index 66c032ccb163..33e18c59b975 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -798,6 +798,11 @@ environment of the tool process as an environment variable. The label for the variable. + + + The description for the variable. + + @@ -821,6 +826,11 @@ environment of the tool process as an environment variable. The label for the secret. + + + The description for the secret. + +