Ivadomed: Include ivadomed version in JSON config file and check for compatibility

Created on 25 Jan 2021  路  5Comments  路  Source: ivadomed/ivadomed

As ivadomed is being continuously improved, we are sometimes changing fields in the config file. These changes can break retro-compatibility.

It would be great to find a mechanism to inform the user if the config file they are using (which could be based on an 6-month old ivadomed version) is still compatible with the most recent ivadomed release.

A suggestion, would be to add a field in the config file (another one 馃槄 ), which states the version of ivadomed the config file was based on, e.g.:
~
{
"ivadomed_version": "v2.6.0"
}
~

And in ivadomed, when loading the config file, we could create an API that would parse this version and verify if it is compatible with the current ivadomed version. The way we could do it, is, if at some point in history some fields in the config file are changed, then we would update this API to add the release as a "retro-compatibility breaking point".

So with this strategy, we need to make sure that every time the config file is changed, the API is updated.

Suggestions welcome!

enhancement

All 5 comments

Currently, we have a configuration file manager that helps with retrocompatibility. If a new parameter is required or if a key is changed, this class deals with "old" config files to avoid retrocompatibility breakage. I think this class covers the purpose you're describing, but if not we can always add options to the ConfigurationManager.

Fantastic! i was not aware of this config file manager. I suppose it does serve the exact purpose of my issue then 馃槉

As ivadomed is being continuously improved, we are sometimes changing fields in the config file. These changes can break retro-compatibility.

It would be great to find a mechanism to inform the user if the config file they are using (which could be based on an 6-month old ivadomed version) is still compatible with the most recent ivadomed release.

A suggestion, would be to add a field in the config file (another one 馃槄 ), which states the version of ivadomed the config file was based on, e.g.:

{
    "ivadomed_version": "v2.6.0"
} 

And in ivadomed, when loading the config file, we could create an API that would parse this version and verify if it is compatible with the current ivadomed version. The way we could do it, is, if at some point in history some fields in the config file are changed, then we would update this API to add the release as a "retro-compatibility breaking point".

So with this strategy, we need to make sure that every time the config file is changed, the API is updated.

Suggestions welcome!

On a somewhat related note, backward compatibility breaking point is when the major version number must be incremented, according to the semantic versioning specification, e.g. v2.6.0 becomes v3.

I would also suggest keeping a changelog.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

charleygros picture charleygros  路  5Comments

mariehbourget picture mariehbourget  路  4Comments

Drulex picture Drulex  路  5Comments

jcohenadad picture jcohenadad  路  4Comments

andreanne-lemay picture andreanne-lemay  路  4Comments