Closed hans-permana closed 6 years ago
To each of the three default configurations add an element __metainf__
as follows:
{
"__metainf__": {
"version": 1,
"description": "<file description here>",
"changelog": [
{
"version": 0,
"parameters": [
["param1", "*", "Is now of type Boolean"],
["param2", "+", "New parameter due to geo-location algorithm change"],
["param3", "-", "Removed parameter due to geo-location algorithm change"]
],
"comment": "Introduced new geo-location algorithm"
}
]
},
...
}
The changelog entries are 3-element lists of the form [version: int*, params: List[Param], comment: str]
, with Param
being a 3-element list [name: str, change: str, comment: str]
where change
can be +
, -
, or *
(= modified). We need the Param
entries to update old configuration files to new ones.
If we detect an old configuration in version v1 and the current version is v2 then we create the set of all parameter changes of all changelog entries for which it is true that v1 < version <= v2
and apply the changes to the old configuration.
I've added the __metinf__
block to the auxiliary files, and running dedop run
with outdated files will now throw an error directing users to the dedop config upgrade
command.
This is a follow-up ticket from an issue reported by @cmray https://github.com/DeDop/dedop-core/issues/8
Scenario
dedop i add <L1A input file>
dedop run
dedop run
Problem
A string of errors are thrown by DeDop Shell that say unknown parameters. Look at this (issue)[https://github.com/DeDop/dedop-core/issues/8] for more details on the error.
This problem occurred because there are parameter changes in the default configuration files of v0.5.2 and the processor does not support the old parameters anymore (from v0.5.1 or before). When a user installs a new version (with or without uninstalling the old one), the ~/.dedop directory stays unless when it is intentionally removed.