Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow test schema #17128

Closed
wants to merge 14 commits into from
8 changes: 8 additions & 0 deletions lib/galaxy/tool_util/schemas/.xsdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<Config xmlns="http://pypi.org/project/xsdata" version="23.6">
<Extensions>
<Extension type="class" class=".*" import=".config.BaseSetting" prepend="false" applyIfDerived="true"/>
<Extension type="class" class="TestOutput$" import=".config.ClassFileField" prepend="false" applyIfDerived="true"/>
<Extension type="class" class="TestOutputCollection" import=".config.ClassCollectionField" prepend="false" applyIfDerived="true"/>
</Extensions>
</Config>
305 changes: 305 additions & 0 deletions lib/galaxy/tool_util/schemas/generated/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,305 @@
from generated.galaxy import (
Action,
Actions,
ActionsConditional,
ActionsConditionalFilter,
ActionsConditionalFilterType,
ActionsConditionalWhen,
ActionsOption,
ActionsOptionType,
ActionType,
AssertAttributeIs,
AssertAttributeMatches,
AssertElementText,
AssertElementTextIs,
AssertElementTextMatches,
AssertHasArchiveMember,
AssertHasElementWithPath,
AssertHasH5Attribute,
AssertHasH5Keys,
AssertHasJsonPropertyWithText,
AssertHasJsonPropertyWithValue,
AssertHasLine,
AssertHasLineMatching,
AssertHasNcolumns,
AssertHasNelementsWithPath,
AssertHasNlines,
AssertHasSize,
AssertHasText,
AssertHasTextMatching,
AssertIsValidXml,
AssertNotHasText,
AssertXmlelement,
ChangeFormat,
ChangeFormatWhen,
Citation,
Citations,
CitationType,
Code,
CodeHook,
Column,
Command,
CompareType,
Conditional,
ConditionalWhen,
ConfigFile,
ConfigFiles,
ConfigFileSources,
ConfigInputs,
Container,
ContainerType,
Creator,
DetectErrorType,
DisplayType,
EdamOperations,
EdamTopics,
EntryPoint,
EntryPointPort,
EntryPoints,
EntryPointUrl,
EnvironmentVariable,
EnvironmentVariableInject,
EnvironmentVariables,
ExitCode,
Expression,
ExpressionType,
Filter,
FilterType,
HierarchyType,
Inputs,
InputType,
LevelType,
Macros,
MethodType,
Options,
Organization,
Output,
OutputCollection,
OutputCollectionDiscoverDatasets,
OutputData,
OutputDiscoverDatasets,
Outputs,
Parallelism,
Param,
ParamConversion,
ParamDefault,
ParamDefaultCollection,
ParamDefaultElement,
ParamDrillDownOption,
ParamOptions,
ParamSelectOption,
ParamType,
PermissiveBooleanValue,
Person,
Regex,
Repeat,
RequestParameter,
RequestParameterAppend,
RequestParameterAppendValue,
RequestParameterGalaxyNameType,
RequestParameterTranslation,
RequestParameterValueTranslation,
RequestParameterValueTranslationValue,
RequiredFileExclude,
RequiredFileInclude,
RequiredFileReferenceType,
RequiredFiles,
Requirement,
Requirements,
RequirementType,
Resource,
ResourceType,
Sanitizer,
SanitizerMapping,
SanitizerMappingAdd,
SanitizerMappingRemove,
SanitizerValid,
SanitizerValidAdd,
SanitizerValidRemove,
Section,
SourceType,
Stdio,
TargetType,
Test,
TestAssertions,
TestCollection,
TestCompositeData,
TestConditional,
TestDiscoveredDataset,
TestExtraFile,
TestOutput,
TestOutputCollection,
TestOutputCompareType,
TestOutputMetadata,
TestParam,
TestParamMetadata,
TestRepeat,
Tests,
TestSection,
Tool,
ToolAction,
ToolTypeType,
TracksterAction,
TracksterConf,
Uihints,
UrlmethodType,
Validator,
ValidatorType,
VersionCommand,
Xref,
Xrefs,
XrefType,
)

__all__ = [
"Action",
"ActionType",
"Actions",
"ActionsConditional",
"ActionsConditionalFilter",
"ActionsConditionalFilterType",
"ActionsConditionalWhen",
"ActionsOption",
"ActionsOptionType",
"AssertAttributeIs",
"AssertAttributeMatches",
"AssertElementText",
"AssertElementTextIs",
"AssertElementTextMatches",
"AssertHasArchiveMember",
"AssertHasElementWithPath",
"AssertHasH5Attribute",
"AssertHasH5Keys",
"AssertHasJsonPropertyWithText",
"AssertHasJsonPropertyWithValue",
"AssertHasLine",
"AssertHasLineMatching",
"AssertHasNcolumns",
"AssertHasNelementsWithPath",
"AssertHasNlines",
"AssertHasSize",
"AssertHasText",
"AssertHasTextMatching",
"AssertIsValidXml",
"AssertNotHasText",
"AssertXmlelement",
"ChangeFormat",
"ChangeFormatWhen",
"Citation",
"CitationType",
"Citations",
"Code",
"CodeHook",
"Column",
"Command",
"CompareType",
"Conditional",
"ConditionalWhen",
"ConfigFile",
"ConfigFileSources",
"ConfigFiles",
"ConfigInputs",
"Container",
"ContainerType",
"Creator",
"DetectErrorType",
"DisplayType",
"EdamOperations",
"EdamTopics",
"EntryPoint",
"EntryPointPort",
"EntryPointUrl",
"EntryPoints",
"EnvironmentVariable",
"EnvironmentVariableInject",
"EnvironmentVariables",
"ExitCode",
"Expression",
"ExpressionType",
"Filter",
"FilterType",
"HierarchyType",
"InputType",
"Inputs",
"LevelType",
"Macros",
"MethodType",
"Options",
"Organization",
"Output",
"OutputCollection",
"OutputCollectionDiscoverDatasets",
"OutputData",
"OutputDiscoverDatasets",
"Outputs",
"Parallelism",
"Param",
"ParamConversion",
"ParamDefault",
"ParamDefaultCollection",
"ParamDefaultElement",
"ParamDrillDownOption",
"ParamOptions",
"ParamSelectOption",
"ParamType",
"PermissiveBooleanValue",
"Person",
"Regex",
"Repeat",
"RequestParameter",
"RequestParameterAppend",
"RequestParameterAppendValue",
"RequestParameterGalaxyNameType",
"RequestParameterTranslation",
"RequestParameterValueTranslation",
"RequestParameterValueTranslationValue",
"RequiredFileExclude",
"RequiredFileInclude",
"RequiredFileReferenceType",
"RequiredFiles",
"Requirement",
"RequirementType",
"Requirements",
"Resource",
"ResourceType",
"Sanitizer",
"SanitizerMapping",
"SanitizerMappingAdd",
"SanitizerMappingRemove",
"SanitizerValid",
"SanitizerValidAdd",
"SanitizerValidRemove",
"Section",
"SourceType",
"Stdio",
"TargetType",
"Test",
"TestAssertions",
"TestCollection",
"TestCompositeData",
"TestConditional",
"TestDiscoveredDataset",
"TestExtraFile",
"TestOutput",
"TestOutputCollection",
"TestOutputCompareType",
"TestOutputMetadata",
"TestParam",
"TestParamMetadata",
"TestRepeat",
"TestSection",
"Tests",
"ToolAction",
"ToolTypeType",
"TracksterAction",
"TracksterConf",
"Uihints",
"UrlmethodType",
"Validator",
"ValidatorType",
"VersionCommand",
"Tool",
"Xref",
"XrefType",
"Xrefs",
]
31 changes: 31 additions & 0 deletions lib/galaxy/tool_util/schemas/generated/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from dataclasses import (
dataclass,
field,
)
from typing import (
Literal,
Optional,
)

from pydantic import ConfigDict

alias_lookup = {
"assert_contents": "asserts",
}


class BaseSetting:
__pydantic_config__ = ConfigDict(
extra="forbid", alias_generator=lambda field_name: alias_lookup.get(field_name, field_name)
)


@dataclass(kw_only=True)
class ClassFileField:
class_: Optional[Literal["File"]] = field(default="File", metadata={"alias": "class"})
path: Optional[str] = None


@dataclass(kw_only=True)
class ClassCollectionField:
class_: Optional[Literal["Collection"]] = field(default="Collection", metadata={"alias": "class"})
Loading
Loading