def _raw_dict(path, importer): if path.endswith(".ga"): with open(path, "r") as f: workflow = json.load(f) else: workflow_directory = os.path.dirname(path) workflow_directory = os.path.abspath(workflow_directory) with open(path, "r") as f: workflow = yaml.load(f) workflow = python_to_workflow(workflow, importer, workflow_directory) return workflow
def _raw_dict(path, importer): if path.endswith(".ga"): with open(path, "r") as f: workflow = json.load(f) else: workflow_directory = os.path.dirname(path) workflow_directory = os.path.abspath(workflow_directory) with open(path, "r") as f: workflow = yaml.load(f) workflow = python_to_workflow(workflow, importer, workflow_directory) return workflow
def _raw_dict(path, importer=None): if path.endswith(".ga"): with open(path, "r") as f: workflow = json.load(f) else: if importer is None: importer = DummyImporterGalaxyInterface() workflow_directory = os.path.dirname(path) workflow_directory = os.path.abspath(workflow_directory) with open(path, "r") as f: workflow = yaml.load(f) workflow = python_to_workflow(workflow, importer, workflow_directory) return workflow
def _raw_dict(path, importer=None): if path.endswith(".ga"): with open(path, "r") as f: workflow = json.load(f) else: if importer is None: importer = DummyImporterGalaxyInterface() workflow_directory = os.path.dirname(path) workflow_directory = os.path.abspath(workflow_directory) with open(path, "r") as f: workflow = yaml.safe_load(f) workflow = python_to_workflow(workflow, importer, workflow_directory) return workflow
def to_native(has_yaml, **kwds): if isinstance(has_yaml, dict): return python_to_workflow(has_yaml, MockGalaxyInterface(), None, **kwds) else: return yaml_to_workflow(has_yaml, MockGalaxyInterface(), None, **kwds)