mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Rename has_yaml to yaml_content per PR review request.
This commit is contained in:
@@ -1389,7 +1389,7 @@ class DatasetPopulator(GalaxyInteractorHttpMixin, BaseDatasetPopulator):
|
||||
|
||||
|
||||
# Things gxformat2 knows how to upload as workflows
|
||||
HasYamlT = Union[str, os.PathLike, dict]
|
||||
YamlContentT = Union[str, os.PathLike, dict]
|
||||
|
||||
|
||||
class BaseWorkflowPopulator(BasePopulator):
|
||||
@@ -1444,11 +1444,11 @@ class BaseWorkflowPopulator(BasePopulator):
|
||||
upload_response = self._post("workflows/upload", data=data)
|
||||
return upload_response
|
||||
|
||||
def upload_yaml_workflow(self, has_yaml: HasYamlT, **kwds) -> str:
|
||||
def upload_yaml_workflow(self, yaml_content: YamlContentT, **kwds) -> str:
|
||||
round_trip_conversion = kwds.get("round_trip_format_conversion", False)
|
||||
client_convert = kwds.pop("client_convert", not round_trip_conversion)
|
||||
kwds["convert"] = client_convert
|
||||
workflow = convert_and_import_workflow(has_yaml, galaxy_interface=self, **kwds)
|
||||
workflow = convert_and_import_workflow(yaml_content, galaxy_interface=self, **kwds)
|
||||
workflow_id = workflow["id"]
|
||||
if round_trip_conversion:
|
||||
workflow_yaml_wrapped = self.download_workflow(workflow_id, style="format2_wrapped_yaml")
|
||||
@@ -1717,7 +1717,7 @@ class BaseWorkflowPopulator(BasePopulator):
|
||||
|
||||
def run_workflow(
|
||||
self,
|
||||
has_workflow: HasYamlT,
|
||||
has_workflow: YamlContentT,
|
||||
test_data: Optional[Union[str, dict]] = None,
|
||||
history_id: Optional[str] = None,
|
||||
wait: bool = True,
|
||||
|
||||
@@ -50,6 +50,7 @@ from galaxy_test.base.env import (
|
||||
from galaxy_test.base.populators import (
|
||||
load_data_dict,
|
||||
skip_if_github_down,
|
||||
YamlContentT,
|
||||
)
|
||||
from galaxy_test.base.testcase import FunctionalTestCase
|
||||
|
||||
@@ -785,8 +786,8 @@ class SeleniumSessionWorkflowPopulator(
|
||||
upload_response.raise_for_status()
|
||||
return upload_response.json()
|
||||
|
||||
def upload_yaml_workflow(self, has_yaml, **kwds) -> str:
|
||||
workflow = convert_and_import_workflow(has_yaml, galaxy_interface=self, **kwds)
|
||||
def upload_yaml_workflow(self, yaml_content: YamlContentT, **kwds) -> str:
|
||||
workflow = convert_and_import_workflow(yaml_content, galaxy_interface=self, **kwds)
|
||||
return workflow["id"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user