-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is the expected behaviour when combining use_base_merging
and several import module types?
#1189
Comments
The case illustrated above is not merely a theoretical one. It happens for example in CL, which uses base merging but declares the import_group:
use_base_merging: TRUE
products:
- id: pr
# make_base, mirror_from and other parameters omitted for brevity
- id: go
- id: uberon
- id: ro
- id: pato
- id: ncbitaxon
- id: ncbitaxondisjoints
- id: omo
module_type: mirror The intention here may have been to use the entirety of OMO without “extracting” any kind of module, but that is not what actually happens. The In fact, even if the $(IMPORTDIR)/omo_import.owl: $(MIRRORDIR)/merged.owl $(IMPORTDIR)/omo_terms_combined.txt
if [ $(IMP) = true ]; then $(ROBOT) merge -i $< query --update ../sparql/preprocess-module.ru --updat>
$(ANNOTATE_CONVERT_FILE); fi Notice how it uses the merged mirror as input? The rule would actually merely create a copy of the entire merged mirror! |
It also happens in Uberon, which declares
For the OMO module, it happens the same thing as with CL above: the For the ORCIDIO module, it’s even more funny. In principles, imported ORCIDIO terms would end up in the So the only way to refresh the ORCIDIO import is to explicitly call As a result, the ORCIDIO import in Uberon has not been refreshed since the last time someone thought about this module, 10 months ago. |
I see three possible course of actions here: (A) Decide that mixing base merging and per-import module type is not supported, period. That is, when you do that: import_group:
use_base_merging: True
module_type: slme
products:
- id: ro
- id: pato
- id: fbbt
module_type: minimal then the fbbt-specific module type is silently ignored and FBbt is imported as a SLME module extracted from merged bases as for all the other modules. This is, in effect, the current situation. I would have no objection to keeping things like that, but I think it should at least be properly documented. (And the Makefile template should be fixed so that it does not contain useless rules that only serve to increase confusion.) (B) Likewise, but we error out instead of silently ignoring the problem. We add some logic in the (C) Decide that it is in fact allowed to use per-import module type at the same time as base merging. If we go that route, I think the only sensible behaviour is to exclude modules that have their own module type from the merged import module. In the example above, that would mean that we would create both: a My concern with that approach is that it would undoubtedly break existing configurations. For example, in both Uberon and CL this would make all OMO terms (that are currently present in |
This was bad design on my part, sorry.. Maybe the best way of handling the situation would be a flag for each import to denote it should not be incorporated in the merged import module (a more explicit variant of your (C), like |
I don’t like the fact that such a flag would be somewhat redundant¹ (the mere fact that an import has its own ¹There are several cases of similar redundant options in the config file that at some point I’d like to get rid of, like for example the way we describe a component that is generated from mappings: components:
products:
- filename: my-sssom-derived-components.owl
use_mappings: True
mappings:
- mapping_set_from_which_the_component_is_derived.owl The mere presence of a non-empty |
So I propose: For 1.6: Statu quo. We preserve the existing behaviour (option A above: basically, For later (maybe 1.7): Add an option to explicitly exclude a module from the main merged module. |
I am reviewing the the way the standard Makefile works regarding the import modules, and something puzzles me.
The type of import modules (e.g.
slme
,minimal
,mirror
, etc.) can be declared both at the level of the entireimport_group
and at the level of each individual module, as in:This will produce, in the standard Makefile, the following rules:
So far, so good.
But now let’s use base merging:
This generates three rules:
Question is: what is even the point of the last two rules? They are not used anywhere. Under
use_base_merging=True
the only import module that matters is themerged_import.owl
. In the example above, imported FBbt terms would end up in the merged import module, extracted using the SLME method, regardless of themodule_type: minimal
parameter declared in the ODK configuration file.In fact, as soon as
use_base_merging
is used, I don’t think it even makes sense to have a per-module module type. How would that even work?And if mixing the use of
use_base_merging
with per-module module types is not supposed to be supported, then I think we should document that, and maybe even add a check inodk.py
to detect this kind of thing and warn the users that they are using a configuration that makes no sense.The text was updated successfully, but these errors were encountered: