Merge pull request #20158 from mvdbeek/yaml_parser_fixes

Yaml parser fixes and improvements (part 1)
This commit is contained in:
Marius van den Beek
2025-05-06 09:25:58 +02:00
committed by GitHub
15 changed files with 37 additions and 33 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ def test_parse_edam_mapping_operations_legacy():
def test_parse_biotools_default_mapping():
test_source = get_test_tool_source(source_file_name="testtool.yml", source_contents=TOOL_YAML_NO_EXPLICIT_XREFS)
ontology_data = expand_ontology_data(test_source, ["cheetah_problem_unbound_var_input"], None)
assert ontology_data.xrefs[0]["reftype"] == "bio.tools"
assert ontology_data.xrefs[0]["type"] == "bio.tools"
assert ontology_data.xrefs[0]["value"] == "bwa"
test_source = get_test_tool_source(source_file_name="testtool.yml", source_contents=TOOL_YAML_NO_EXPLICIT_XREFS)
+2 -2
View File
@@ -416,7 +416,7 @@ class TestXmlLoader(BaseLoaderTestCase):
def test_xrefs(self):
xrefs = self._tool_source.parse_xrefs()
assert xrefs == [{"value": "bwa", "reftype": "bio.tools"}]
assert xrefs == [{"value": "bwa", "type": "bio.tools"}]
def test_exit_code(self):
tool_source = self._get_tool_source(
@@ -622,7 +622,7 @@ class TestYamlLoader(BaseLoaderTestCase):
def test_xrefs(self):
xrefs = self._tool_source.parse_xrefs()
assert xrefs == [{"value": "bwa", "reftype": "bio.tools"}]
assert xrefs == [{"value": "bwa", "type": "bio.tools"}]
def test_sanitize(self):
assert self._tool_source.parse_sanitize() is True