INCATools / ontology-development-kit

Bootstrap an OBO Library ontology
http://incatools.github.io/ontology-development-kit/
BSD 3-Clause "New" or "Revised" License
219 stars 54 forks source link

Warn when `update_repo` should be run #856

Closed gouttegd closed 1 year ago

gouttegd commented 1 year ago

Possible improvement: The ODK should warn users when the $(ONT)-odk.yaml file has been modified but make update_repo has not been run.

One way this could work: When generating the standard Makefile, we compute a hash of the $(ONT)-odk.yaml file, and we store it in the Makefile. Then we add a rule in the Makefile that also computes a hash of the config file, and compares it with the stored hash. If the hashes are different, we emit a warning (“your ODK configuration has changed since the last time this Makefile was generated; run update_repo to make sure your changes take effect”). And we make that rule the first dependency of all other rules, so that the check is always performed.