Skip to content

Commit e6a3dea

Browse files
authored
Merge pull request #20492 from natefoo/optional-edam
[24.2] Make optional edam-ontology in datatypes registry optional
2 parents 539441d + 957ccca commit e6a3dea

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

lib/galaxy/datatypes/registry.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,23 @@ class ConfigurationError(Exception):
5757

5858
class Registry:
5959
def __init__(self, config=None):
60+
self.log = logging.getLogger(__name__)
61+
self.log.addHandler(logging.NullHandler())
62+
6063
edam_ontology_path = config.get("edam_toolbox_ontology_path", None) if config is not None else None
6164

62-
edam = load_edam_tree(
63-
None if not edam_ontology_path or not os.path.exists(edam_ontology_path) else edam_ontology_path,
64-
"format_",
65-
"data_",
66-
"operation_",
67-
"topic_",
68-
)
65+
try:
66+
edam = load_edam_tree(
67+
None if not edam_ontology_path or not os.path.exists(edam_ontology_path) else edam_ontology_path,
68+
"format_",
69+
"data_",
70+
"operation_",
71+
"topic_",
72+
)
73+
except AssertionError as exc:
74+
self.log.warning(exc)
75+
edam = {}
6976

70-
self.log = logging.getLogger(__name__)
71-
self.log.addHandler(logging.NullHandler())
7277
self.config = config
7378
self.edam = edam
7479
self.datatypes_by_extension: Dict[str, Data] = {}

0 commit comments

Comments
 (0)