Merge pull request #20266 from mvdbeek/extend_custom_tool_schema

[25.0] Add more descriptions to custom tool source schema
This commit is contained in:
Marius van den Beek
2025-05-19 10:45:25 +02:00
committed by GitHub
10 changed files with 549 additions and 134 deletions
+1 -1
View File
@@ -90,7 +90,7 @@
"markdown-it-regexp": "^0.4.0",
"monaco-editor": "^0.52.2",
"monaco-editor-webpack-plugin": "^7.1.0",
"monaco-yaml": "^5.2.3",
"monaco-yaml": "^5.4.0",
"object-hash": "^3.0.0",
"openapi-fetch": "^0.10.6",
"pinia": "^2.1.7",
+238 -55
View File
@@ -6617,10 +6617,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -6771,10 +6775,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -7149,10 +7157,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -7341,10 +7353,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -7384,10 +7400,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -8439,7 +8459,10 @@ export interface components {
};
/** CwlBooleanParameterModel */
CwlBooleanParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Parameter Type
@@ -8466,10 +8489,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -8498,10 +8525,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -8514,7 +8545,10 @@ export interface components {
};
/** CwlFloatParameterModel */
CwlFloatParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Parameter Type
@@ -8525,7 +8559,10 @@ export interface components {
};
/** CwlIntegerParameterModel */
CwlIntegerParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Parameter Type
@@ -8536,7 +8573,10 @@ export interface components {
};
/** CwlNullParameterModel */
CwlNullParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Parameter Type
@@ -8547,7 +8587,10 @@ export interface components {
};
/** CwlStringParameterModel */
CwlStringParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Parameter Type
@@ -8558,7 +8601,10 @@ export interface components {
};
/** CwlUnionParameterModel */
"CwlUnionParameterModel-Input": {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Parameter Type
@@ -8580,7 +8626,10 @@ export interface components {
};
/** CwlUnionParameterModel */
"CwlUnionParameterModel-Output": {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Parameter Type
@@ -8714,10 +8763,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -8757,10 +8810,14 @@ export interface components {
label?: string | null;
/** Multiple */
multiple: boolean;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -8840,6 +8897,7 @@ export interface components {
argument?: string | null;
/**
* Extensions
* @description Limit inputs to datasets with these extensions. Use 'data' to allow all input datasets.
* @default [
* "data"
* ]
@@ -8865,13 +8923,18 @@ export interface components {
min?: number | null;
/**
* Multiple
* @description Allow multiple values to be selected.
* @default false
*/
multiple: boolean;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -9574,10 +9637,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -9693,10 +9760,14 @@ export interface components {
label?: string | null;
/** Multiple */
multiple: boolean;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -9739,10 +9810,14 @@ export interface components {
label?: string | null;
/** Multiple */
multiple: boolean;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -10729,10 +10804,14 @@ export interface components {
max?: number | null;
/** Min */
min?: number | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -10945,10 +11024,14 @@ export interface components {
label?: string | null;
/** Multiple */
multiple: boolean;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -11091,10 +11174,14 @@ export interface components {
label?: string | null;
/** Multiple */
multiple: boolean;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -12722,10 +12809,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -13200,7 +13291,10 @@ export interface components {
};
/** IncomingToolOutputCollection */
"IncomingToolOutputCollection-Input": {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden?: boolean | null;
/** Label */
label?: string | null;
@@ -13218,7 +13312,10 @@ export interface components {
};
/** IncomingToolOutputCollection */
"IncomingToolOutputCollection-Output": {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden?: boolean | null;
/** Label */
label?: string | null;
@@ -13252,7 +13349,10 @@ export interface components {
format_source?: string | null;
/** From Work Dir */
from_work_dir?: string | null;
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden?: boolean | null;
/** Label */
label?: string | null;
@@ -13533,7 +13633,10 @@ export interface components {
max?: number | null;
/** Min */
min?: number | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/** Optional */
optional: boolean;
@@ -17531,10 +17634,14 @@ export interface components {
max?: number | null;
/** Min */
min?: number | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -17602,10 +17709,14 @@ export interface components {
max?: number | null;
/** Min */
min?: number | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -17813,10 +17924,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -17872,10 +17987,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -17939,10 +18058,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -18011,10 +18134,14 @@ export interface components {
* @default false
*/
multiple: boolean;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -19116,10 +19243,14 @@ export interface components {
is_dynamic: boolean;
/** Label */
label?: string | null;
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string;
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean;
@@ -19229,7 +19360,10 @@ export interface components {
};
/** ToolOutputBoolean */
ToolOutputBoolean: {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden: unknown;
/** Label */
label?: string | null;
@@ -19264,7 +19398,10 @@ export interface components {
};
/** ToolOutputFloat */
ToolOutputFloat: {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden: unknown;
/** Label */
label?: string | null;
@@ -19281,7 +19418,10 @@ export interface components {
};
/** ToolOutputInteger */
ToolOutputInteger: {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden: unknown;
/** Label */
label?: string | null;
@@ -19298,7 +19438,10 @@ export interface components {
};
/** ToolOutputText */
ToolOutputText: {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden: unknown;
/** Label */
label?: string | null;
@@ -20392,25 +20535,41 @@ export interface components {
* @enum {string}
*/
class: "GalaxyUserTool";
/** Container */
/**
* Container
* @description Container image to use for this tool.
*/
container: string;
/** Description */
/**
* Description
* @description The description is displayed in the tool menu immediately following the hyperlink for the tool.
*/
description?: string | null;
/** Edam Operations */
edam_operations?: string[] | null;
/** Edam Topics */
edam_topics?: string[] | null;
/** @description Help text shown below the tool interface. */
help?: components["schemas"]["HelpContent"] | null;
/** Id */
id: string | null;
/**
* Id
* @description Unique identifier for the tool. Should be all lower-case and should not include whitespace.
*/
id: string;
/**
* Inputs
* @default []
*/
inputs: components["schemas"]["GalaxyToolParameterModel-Input"][];
/** License */
/**
* License
* @description A full URI or a a short [SPDX](https://spdx.org/licenses/) identifier for a license for this tool wrapper. The tool wrapper license can be independent of the underlying tool license. This license covers the tool yaml and associated scripts shipped with the tool.
*/
license?: string | null;
/** Name */
/**
* Name
* @description The name of the tool, displayed in the tool menu. This is not the same as the tool id, which is a unique identifier for the tool.
*/
name: string;
/**
* Outputs
@@ -20426,6 +20585,7 @@ export interface components {
)[];
/**
* Requirements
* @description A list of requirements needed to execute this tool. These can be javascript expressions, resource requirements or container images.
* @default []
*/
requirements:
@@ -20440,8 +20600,11 @@ export interface components {
* @description A string that contains the command to be executed. Parameters can be referenced inside $().
*/
shell_command: string;
/** Version */
version: string | null;
/**
* Version
* @description Version for the tool.
*/
version: string;
/** Xrefs */
xrefs?: components["schemas"]["XrefDict"][] | null;
};
@@ -20454,25 +20617,41 @@ export interface components {
* @constant
*/
class: "GalaxyUserTool";
/** Container */
/**
* Container
* @description Container image to use for this tool.
*/
container: string;
/** Description */
/**
* Description
* @description The description is displayed in the tool menu immediately following the hyperlink for the tool.
*/
description?: string | null;
/** Edam Operations */
edam_operations?: string[] | null;
/** Edam Topics */
edam_topics?: string[] | null;
/** @description Help text shown below the tool interface. */
help?: components["schemas"]["HelpContent"] | null;
/** Id */
id: string | null;
/**
* Id
* @description Unique identifier for the tool. Should be all lower-case and should not include whitespace.
*/
id: string;
/**
* Inputs
* @default []
*/
inputs: components["schemas"]["GalaxyToolParameterModel-Output"][];
/** License */
/**
* License
* @description A full URI or a a short [SPDX](https://spdx.org/licenses/) identifier for a license for this tool wrapper. The tool wrapper license can be independent of the underlying tool license. This license covers the tool yaml and associated scripts shipped with the tool.
*/
license?: string | null;
/** Name */
/**
* Name
* @description The name of the tool, displayed in the tool menu. This is not the same as the tool id, which is a unique identifier for the tool.
*/
name: string;
/**
* Outputs
@@ -20488,6 +20667,7 @@ export interface components {
)[];
/**
* Requirements
* @description A list of requirements needed to execute this tool. These can be javascript expressions, resource requirements or container images.
* @default []
*/
requirements:
@@ -20502,8 +20682,11 @@ export interface components {
* @description A string that contains the command to be executed. Parameters can be referenced inside $().
*/
shell_command: string;
/** Version */
version: string | null;
/**
* Version
* @description Version for the tool.
*/
version: string;
/** Xrefs */
xrefs?: components["schemas"]["XrefDict"][] | null;
};
File diff suppressed because one or more lines are too long
+39 -12
View File
@@ -311,6 +311,44 @@ function attachDiagnosticsProvider(
});
}
function quickInfoToMarkdown(quickInfo: any, position: IPosition) {
const { displayParts, documentation, tags } = quickInfo;
const markdownText = [];
// Format displayParts as code
if (displayParts && displayParts.length > 0) {
const signature = displayParts.map((part: any) => part.text).join("");
markdownText.push({ value: "```ts\n" + signature + "\n```" });
}
// Add documentation text
if (documentation && documentation.length > 0) {
const docText = documentation.map((part: any) => part.text).join("");
markdownText.push({ value: docText });
}
// Add tag text (e.g. @description)
if (tags && tags.length > 0) {
tags.forEach((tag: any) => {
if (tag.text && Array.isArray(tag.text)) {
const tagText = tag.text.map((t: any) => t.text).join("");
markdownText.push({ value: `**@${tag.name}** — ${tagText}` });
} else if (typeof tag.text === "string") {
markdownText.push({ value: `**@${tag.name}** — ${tag.text}` });
}
});
}
return {
range: {
startLineNumber: position.lineNumber,
startColumn: position.column,
endLineNumber: position.lineNumber,
endColumn: position.column,
},
contents: markdownText,
};
}
async function provideHover(model: editor.ITextModel, position: IPosition) {
const currentData = await modelForCurrentPosition(model, position);
if (currentData) {
@@ -320,18 +358,7 @@ async function provideHover(model: editor.ITextModel, position: IPosition) {
currentData.offset
);
if (quickInfo) {
return {
range: {
startLineNumber: position.lineNumber,
startColumn: position.column,
endLineNumber: position.lineNumber,
endColumn: position.column,
},
contents: [
{ value: quickInfo.displayParts.map((p: any) => p.text).join("") },
{ value: quickInfo.documentation },
],
};
return quickInfoToMarkdown(quickInfo, position);
}
}
return null;
+11 -6
View File
@@ -8664,10 +8664,10 @@ monaco-worker-manager@^2.0.0:
resolved "https://registry.yarnpkg.com/monaco-worker-manager/-/monaco-worker-manager-2.0.1.tgz#f67c54dfca34ed4b225d5de84e77b24b4e36de8a"
integrity sha512-kdPL0yvg5qjhKPNVjJoym331PY/5JC11aPJXtCZNwWRvBr6jhkIamvYAyiY5P1AWFmNOy0aRDRoMdZfa71h8kg==
monaco-yaml@^5.2.3:
version "5.2.3"
resolved "https://registry.yarnpkg.com/monaco-yaml/-/monaco-yaml-5.2.3.tgz#990fcf697bfa54e684a2d2f7df6d81a889843db4"
integrity sha512-GEplKC+YYmS0TOlJdv0FzbqkDN/IG2FSwEw+95myECVxTlhty2amwERYjzvorvJXmIagP1grd3Lleq7aQEJpPg==
monaco-yaml@^5.4.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/monaco-yaml/-/monaco-yaml-5.4.0.tgz#c0ed6226c710c32c509e7c316c9a45f004862088"
integrity sha512-tuBVDy1KAPrgO905GHTItu8AaA5bIzF5S4X0JVRAE/D66FpRhkDUk7tKi5bwKMVTTugtpMLsXN4ewh4CgE/FtQ==
dependencies:
jsonc-parser "^3.0.0"
monaco-languageserver-types "^0.4.0"
@@ -8675,7 +8675,7 @@ monaco-yaml@^5.2.3:
monaco-types "^0.1.0"
monaco-worker-manager "^2.0.0"
path-browserify "^1.0.0"
prettier "^2.0.0"
prettier "^3.0.0"
vscode-languageserver-textdocument "^1.0.0"
vscode-languageserver-types "^3.0.0"
vscode-uri "^3.0.0"
@@ -9652,11 +9652,16 @@ prelude-ls@~1.1.2:
resolved "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz"
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
prettier@^2.0.0, prettier@^2.8.8:
prettier@^2.8.8:
version "2.8.8"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
prettier@^3.0.0:
version "3.5.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.5.3.tgz#4fc2ce0d657e7a02e602549f053b239cb7dfe1b5"
integrity sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==
pretty-bytes@^6.1.1:
version "6.1.1"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-6.1.1.tgz#38cd6bb46f47afbf667c202cfc754bffd2016a3b"
+4 -4
View File
@@ -203,11 +203,11 @@ for the list of behavior changes associated with profile versions.
<xs:attribute name="license" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">This string specifies any full URI or a
a short [SPDX](https://spdx.org/licenses/) identifier for a license for this tool
wrapper. The tool wrapper version can be indepedent of the underlying tool. This
license covers the tool XML and associated scripts shipped with the tool.
a short [SPDX](https://spdx.org/licenses/) identifier for a license for this tool
wrapper. The tool wrapper version can be independent of the underlying tool. This
license covers the tool XML and associated scripts shipped with the tool.
This is interpreted as [schema.org/license](https://schema.org/license) property.
This is interpreted as [schema.org/license](https://schema.org/license) property.
</xs:documentation>
</xs:annotation>
</xs:attribute>
+39 -8
View File
@@ -82,12 +82,37 @@ class ToolSourceBase(BaseModel):
# repeated fields to get consistent order, ugh, FIXME obviously
class UserToolSource(BaseModel):
class_: Annotated[Literal["GalaxyUserTool"], Field(alias="class")]
id: Optional[str]
version: Optional[str]
name: str
description: Optional[str] = None
container: str
requirements: Optional[List[Union[JavascriptRequirement, ResourceRequirement, ContainerRequirement]]] = []
id: Annotated[
str,
Field(
description="Unique identifier for the tool. Should be all lower-case and should not include whitespace.",
examples=["my-cool-tool"],
min_length=3,
max_length=255,
),
]
version: Annotated[str, Field(description="Version for the tool.", examples=["0.1.0"])]
name: Annotated[
str,
Field(
description="The name of the tool, displayed in the tool menu. This is not the same as the tool id, which is a unique identifier for the tool."
),
]
description: Annotated[
Optional[str],
Field(
description="The description is displayed in the tool menu immediately following the hyperlink for the tool."
),
] = None
container: Annotated[
str, Field(description="Container image to use for this tool.", examples=["quay.io/biocontainers/python:3.13"])
]
requirements: Annotated[
Optional[List[Union[JavascriptRequirement, ResourceRequirement, ContainerRequirement]]],
Field(
description="A list of requirements needed to execute this tool. These can be javascript expressions, resource requirements or container images."
),
] = []
shell_command: Annotated[
str,
Field(
@@ -99,11 +124,17 @@ class UserToolSource(BaseModel):
inputs: List[GalaxyToolParameterModel] = []
outputs: List[IncomingToolOutput] = []
citations: Optional[List[Citation]] = None
license: Optional[str] = None
license: Annotated[
Optional[str],
Field(
description="A full URI or a a short [SPDX](https://spdx.org/licenses/) identifier for a license for this tool wrapper. The tool wrapper license can be independent of the underlying tool license. This license covers the tool yaml and associated scripts shipped with the tool.",
examples=["MIT"],
),
] = None
edam_operations: Optional[List[str]] = None
edam_topics: Optional[List[str]] = None
xrefs: Optional[List[XrefDict]] = None
help: Optional[HelpContent] = None
help: Annotated[Optional[HelpContent], Field(description="Help text shown below the tool interface.")] = None
@model_validator(mode="before")
@classmethod
+43 -11
View File
@@ -176,7 +176,10 @@ def dynamic_model_information_from_py_type(
# where value in the incoming model means "default value" and value in the outgoing model is the actual
# value a user has set. (incoming/outgoing from the client perspective).
class BaseToolParameterModelDefinition(BaseModel):
name: str
name: Annotated[
str,
Field(description="Parameter name. Used when referencing parameter in workflows or inside command templating."),
]
parameter_type: str
@abstractmethod
@@ -186,11 +189,27 @@ class BaseToolParameterModelDefinition(BaseModel):
class BaseGalaxyToolParameterModelDefinition(BaseToolParameterModelDefinition):
hidden: bool = False
label: Optional[str] = None
help: Optional[str] = None
argument: Optional[str] = None
label: Optional[
Annotated[str, Field(description="Will be displayed on the tool page as the label of the parameter.")]
] = None
help: Optional[
Annotated[
str,
Field(
description="Short bit of text, rendered on the tool form just below the associated field to provide information about the field."
),
]
] = None
argument: Optional[
Annotated[
str,
Field(
description="""If the parameter reflects just one command line argument of a certain tool, this tag should be set to that particular argument. It is rendered in parenthesis after the help section, and it will create the name attribute (if not given explicitly) from the argument attribute by stripping leading dashes and replacing all remaining dashes by underscores (e.g. if argument="--long-parameter" then name="long_parameter" is implicit)."""
),
]
] = None
is_dynamic: bool = False
optional: bool = False
optional: Annotated[bool, Field(description="If `false`, parameter must have a value.")] = False
class LabelValue(BaseModel):
@@ -511,12 +530,19 @@ class DataRequestInternalHdca(StrictModel):
class DataInternalJson(StrictModel):
class_: Annotated[Literal["File"], Field(alias="class")]
basename: str
basename: Annotated[
str,
Field(
description="The base name of the file, that is, the name of the file without any leading directory path"
),
]
location: str
path: str
path: Annotated[str, Field(description="The absolute path to the file on disk.")]
listing: Optional[List[str]] # Should be recursive
nameroot: Optional[str]
nameext: Optional[str]
nameroot: Annotated[Optional[str], Field(description="The basename root such that nameroot + nameext == basename")]
nameext: Annotated[
Optional[str], Field(description="The basename extension such that nameroot + nameext == basename")
]
# "secondaryFiles": List[Any],
checksum: Optional[str]
size: int
@@ -576,8 +602,14 @@ MultiDataRequestInternalDereferenced: Type = union_type(
class DataParameterModel(BaseGalaxyToolParameterModelDefinition):
parameter_type: Literal["gx_data"] = "gx_data"
type: Literal["data"]
extensions: List[str] = ["data"]
multiple: bool = False
extensions: Annotated[
List[str],
Field(
description="Limit inputs to datasets with these extensions. Use 'data' to allow all input datasets.",
examples=["txt", "tabular", "tiff"],
),
] = ["data"]
multiple: Annotated[bool, Field(description="Allow multiple values to be selected.")] = False
min: Optional[int] = None
max: Optional[int] = None
+19 -3
View File
@@ -35,7 +35,9 @@ class GenericToolOutputBaseModel(BaseModel, Generic[IncomingNotRequiredBoolT, In
IncomingNotRequiredStringT, Field(description="Parameter name. Used when referencing parameter in workflows.")
]
label: Optional[Annotated[str, Field(description="Output label. Will be used as dataset name in history.")]] = None
hidden: IncomingNotRequiredBoolT
hidden: Annotated[
IncomingNotRequiredBoolT, Field(description="If true, the output will not be shown in the history.")
]
DiscoverViaT = Literal["tool_provided_metadata", "pattern"]
@@ -73,8 +75,22 @@ class GenericToolOutputDataset(
):
type: Literal["data"]
format: Annotated[IncomingNotRequiredStringT, Field(description="The short name for the output datatype.")]
format_source: Optional[str] = None
metadata_source: Optional[str] = None
format_source: Optional[
Annotated[
str,
Field(
description="This sets the data type of the output dataset(s) to be the same format as that of the specified tool input."
),
]
] = None
metadata_source: Optional[
Annotated[
str,
Field(
description="This copies the metadata information from the tool’s input dataset to serve as default for information that cannot be detected from the output. One prominent use case is interval data with a non-standard column order that cannot be deduced from a header line, but which is known to be identical in the input and output datasets."
),
]
] = None
discover_datasets: Optional[List[DatasetCollectionDescriptionT]] = None
from_work_dir: Optional[
Annotated[
@@ -799,10 +799,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -845,10 +849,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -932,10 +940,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -971,10 +983,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1072,7 +1088,10 @@ export interface components {
}
/** CwlBooleanParameterModel */
CwlBooleanParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Parameter Type
@@ -1099,10 +1118,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1131,10 +1154,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1147,7 +1174,10 @@ export interface components {
}
/** CwlFloatParameterModel */
CwlFloatParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Parameter Type
@@ -1158,7 +1188,10 @@ export interface components {
}
/** CwlIntegerParameterModel */
CwlIntegerParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Parameter Type
@@ -1169,7 +1202,10 @@ export interface components {
}
/** CwlNullParameterModel */
CwlNullParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Parameter Type
@@ -1180,7 +1216,10 @@ export interface components {
}
/** CwlStringParameterModel */
CwlStringParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Parameter Type
@@ -1191,7 +1230,10 @@ export interface components {
}
/** CwlUnionParameterModel */
CwlUnionParameterModel: {
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Parameter Type
@@ -1238,10 +1280,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1281,10 +1327,14 @@ export interface components {
label?: string | null
/** Multiple */
multiple: boolean
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1308,6 +1358,7 @@ export interface components {
argument?: string | null
/**
* Extensions
* @description Limit inputs to datasets with these extensions. Use 'data' to allow all input datasets.
* @default [
* "data"
* ]
@@ -1333,13 +1384,18 @@ export interface components {
min?: number | null
/**
* Multiple
* @description Allow multiple values to be selected.
* @default false
*/
multiple: boolean
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1416,10 +1472,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1481,10 +1541,14 @@ export interface components {
label?: string | null
/** Multiple */
multiple: boolean
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1610,10 +1674,14 @@ export interface components {
max?: number | null
/** Min */
min?: number | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1656,10 +1724,14 @@ export interface components {
label?: string | null
/** Multiple */
multiple: boolean
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1695,10 +1767,14 @@ export interface components {
label?: string | null
/** Multiple */
multiple: boolean
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1742,10 +1818,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -1869,7 +1949,10 @@ export interface components {
max?: number | null
/** Min */
min?: number | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/** Optional */
optional: boolean
@@ -2033,10 +2116,14 @@ export interface components {
max?: number | null
/** Min */
min?: number | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -2366,10 +2453,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -2403,10 +2494,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -2475,10 +2570,14 @@ export interface components {
* @default false
*/
multiple: boolean
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -2662,10 +2761,14 @@ export interface components {
is_dynamic: boolean
/** Label */
label?: string | null
/** Name */
/**
* Name
* @description Parameter name. Used when referencing parameter in workflows or inside command templating.
*/
name: string
/**
* Optional
* @description If `false`, parameter must have a value.
* @default false
*/
optional: boolean
@@ -2770,7 +2873,10 @@ export interface components {
}
/** ToolOutputBoolean */
ToolOutputBoolean: {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden: unknown
/** Label */
label?: string | null
@@ -2787,7 +2893,10 @@ export interface components {
}
/** ToolOutputCollection */
ToolOutputCollection: {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden: boolean
/** Label */
label?: string | null
@@ -2839,7 +2948,10 @@ export interface components {
format_source?: string | null
/** From Work Dir */
from_work_dir?: string | null
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden: boolean
/** Label */
label?: string | null
@@ -2858,7 +2970,10 @@ export interface components {
}
/** ToolOutputFloat */
ToolOutputFloat: {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden: unknown
/** Label */
label?: string | null
@@ -2875,7 +2990,10 @@ export interface components {
}
/** ToolOutputInteger */
ToolOutputInteger: {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden: unknown
/** Label */
label?: string | null
@@ -2892,7 +3010,10 @@ export interface components {
}
/** ToolOutputText */
ToolOutputText: {
/** Hidden */
/**
* Hidden
* @description If true, the output will not be shown in the history.
*/
hidden: unknown
/** Label */
label?: string | null