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

Automatically check whether the repository needs to be updated #873

Closed gouttegd closed 1 year ago

gouttegd commented 1 year ago

This PR implements the behaviour suggested in #856.

That is, when a repository is initialised or updated, the ODK configuration file is hashed and the hash value is baked in the generated Makefile. A new config_check rule (called as a dependency to the all_odk rule) then compares the stored hash with a freshly computed hash on the current configuration file, and prints a message warning the user that their repository is out-of-date if the two hashes do not match.

closes #856

gouttegd commented 1 year ago

config_hash is not a parameter. It is not supposed to be set by the user. Its value is automatically generated by the seeding script. I don’t see the point of setting a “default value” in the data class – a default value would make no sense, it would always be overwritten by the seeding script.

Likewise I don’t think it’s useful for this variable to be documented. Users should not have to care about it. They don’t even have to know it exists. It’s purely an internal variable to make the up-to-date check work.