Skip to content

Comments

Add support for custom ROBOT plugins in Makefiles#9839

Open
matentzn wants to merge 1 commit intomasterfrom
add-custom-robot-plugins
Open

Add support for custom ROBOT plugins in Makefiles#9839
matentzn wants to merge 1 commit intomasterfrom
add-custom-robot-plugins

Conversation

@matentzn
Copy link
Member

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.

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.
@matentzn matentzn requested a review from twhetzel as a code owner December 19, 2025 14:45
@matentzn
Copy link
Member Author

@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.

@twhetzel
Copy link
Contributor

@matentzn do you want me to review or @ptgolden?

@matentzn
Copy link
Member Author

@twhetzel you if possible - my comment was only to avoid duplicative work from @ptgolden who needs this here to finish his current task.


$(ROBOT_PLUGINS_DIRECTORY)/odk.jar:
#cp /Users/matentzn/ws/odk-robot-plugin/target/odk.jar $@
echo uncommentme
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the odk.jar coming from?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove trailing \

ln ../../plugins/$*.jar $@ ; \
elif [ -f /tools/robot-plugins/$*.jar ]; then \
cp /tools/robot-plugins/$*.jar $@ ; \
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@twhetzel twhetzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall idea makes sense, but there are spots that would benefit from updates.

@ptgolden
Copy link
Member

A general question here. In the past when adding custom ROBOT plugins, I've made an addition in the ODK configuration file, e.g.:

robot_plugins:
  plugins:
    - name: odk
      mirror_from: https://github.com/INCATools/odk-robot-plugin/releases/download/odk-robot-plugin-0.3.0/odk.jar

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 ./run.sh odk.py). My hunch-- tell me if I'm wrong-- is that this repository predates that workflow.

(Answering my own hunch: yes, it seems that this repo's Makefile derives from ontology-starter-kit in September 2017 at bcc59a0, and the YAML-driven generation only came with INCATools/ontology-development-kit@556ce6d in November 2018)

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 mondo.Makefile?

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.

@ptgolden
Copy link
Member

Oh, I should have read the beginning of this issue more closely after my detective work:

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.

@matentzn
Copy link
Member Author

@ptgolden please take over this PR and do with it as you see fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants