Add support for custom ROBOT plugins in Makefiles#9839
Add support for custom ROBOT plugins in Makefiles#9839
Conversation
Introduced new Makefile rules to manage ROBOT plugins, including installation of custom and supplementary plugins. Added targets for simple merge operations and an obsolete replacement test using the odk plugin in mondo.Makefile. These changes improve plugin management and extend ontology processing capabilities.
|
@ptgolden is PR is a precursor for adding the updated sssom-java into the Mondo pipeline. This is only necessary while we do not have an ODK minor release, but it is necessary so we can move forward. Unfortunately Mondo, the most important ontology in my portfolio, is xactly the only ontology that has not been migrated to a proper ODK setup where all of this is automated. |
|
|
||
| $(ROBOT_PLUGINS_DIRECTORY)/odk.jar: | ||
| #cp /Users/matentzn/ws/odk-robot-plugin/target/odk.jar $@ | ||
| echo uncommentme |
There was a problem hiding this comment.
Where is the odk.jar coming from?
There was a problem hiding this comment.
I believe the right thing here is to do the same as the SSSOM plugin:
$(ROBOT_PLUGINS_DIRECTORY)/odk.jar:
curl -L -o $@ https://github.com/INCATools/odk-robot-plugin/releases/download/odk-robot-plugin-0.3.0/odk.jar
|
|
||
| obsolete-replace-test: #cp-odk-plug | ||
| $(ROBOT) odk:obsolete-replace --input $(SRC) --obsolete MONDO:0032564 --replacement MONDO:0032565 -o $(SRC) | ||
|
|
There was a problem hiding this comment.
Consider having obsolete-replace-test depend on extra_robot_plugins.
| .PHONY: all_robot_plugins | ||
| all_robot_plugins: $(foreach plugin,$(notdir $(wildcard /tools/robot-plugins/*.jar)),$(ROBOT_PLUGINS_DIRECTORY)/$(plugin)) \ | ||
| $(foreach plugin,$(notdir $(wildcard ../../plugins/*.jar)),$(ROBOT_PLUGINS_DIRECTORY)/$(plugin)) \ | ||
| custom_robot_plugins extra_robot_plugins \ |
| ln ../../plugins/$*.jar $@ ; \ | ||
| elif [ -f /tools/robot-plugins/$*.jar ]; then \ | ||
| cp /tools/robot-plugins/$*.jar $@ ; \ | ||
| fi |
There was a problem hiding this comment.
The rule silently succeeds even if the source file doesn't exist. Add an else clause to fail explicitly when the source file isn't found.
twhetzel
left a comment
There was a problem hiding this comment.
The overall idea makes sense, but there are spots that would benefit from updates.
|
A general question here. In the past when adding custom ROBOT plugins, I've made an addition in the ODK configuration file, e.g.: I've noticed the Makefile in Mondo is not driven by a configuration file, and it also differs significantly from the template in the current release of ODK (since it hasn't been maintained by running (Answering my own hunch: yes, it seems that this repo's Makefile derives from Would it be at all worth the effort in the medium term to migrate to the YAML configuration format and move all custom functions into For the purposes of this commit-- yes, this all looks good, given that it's copied from the current ODK template and that is known to work. If I'm added as a reviewer, I'm happy to approve. |
|
Oh, I should have read the beginning of this issue more closely after my detective work:
|
|
@ptgolden please take over this PR and do with it as you see fit. |
Introduced new Makefile rules to manage ROBOT plugins, including installation of custom and supplementary plugins. Added targets for simple merge operations and an obsolete replacement test using the odk plugin in mondo.Makefile. These changes improve plugin management and extend ontology processing capabilities.