From 65c4edac6a00a29a97a50b9bffbe0a7613e6acfd Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 20 Sep 2022 09:37:10 -0400 Subject: [PATCH] Rename has_yaml to yaml_content per PR review request. --- lib/galaxy_test/base/populators.py | 8 ++++---- lib/galaxy_test/selenium/framework.py | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/galaxy_test/base/populators.py b/lib/galaxy_test/base/populators.py index e93eaac1f50..2797b516c1b 100644 --- a/lib/galaxy_test/base/populators.py +++ b/lib/galaxy_test/base/populators.py @@ -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, diff --git a/lib/galaxy_test/selenium/framework.py b/lib/galaxy_test/selenium/framework.py index cc5f6991a0d..9690c5a3ded 100644 --- a/lib/galaxy_test/selenium/framework.py +++ b/lib/galaxy_test/selenium/framework.py @@ -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"]