osmose.config.aliases

Authoritative OSMOSE 4.4.0 config-key rename set.

Faithful port of the v4.4.0 release entry ($15) in the Java engine’s Releases.java (fr.ird.osmose.util.version.Releases). That entry’s updateParameters() calls updateKey(OLD, NEW) for every key that was renamed between 4.3.x and 4.4.0.

Semantics ported here:

  • updateKey(OLD, NEW) renames OLD -> NEW and skips if NEW is already defined (“already defined” => merge/keep-existing). The Python applier mirrors this skip-if-exists behaviour.

  • Config keys are compared lowercased (the reader lowercases keys), so the map below is stored fully lowercase even though the Java source uses camelCase in a few keys (e.g. output.restart.recordFrequency.ndt).

  • A few renames in the Java source are prefix renames applied per focal species index (...spN). Those are stored here as the prefix (stopping before the .sp / sub-key segment); the migrate_config applier matches k == old or k.startswith(old + "."), so indexed ...spN and species.maturity.<r|m0|m1|eta>.spN keys are caught via the . separator.

The Java source contains duplicate and chained updateKey calls (e.g. fisheries.enabled is first promoted to process.multispecies.fisheries.enabled and then to module.multispecies.fisheries.enabled). This map records the net result for a fresh 4.3.x config, which is what a forward migration needs. The transient intermediate key is therefore intentionally omitted.

Functions

canonicalize_config(cfg)

LEGACY ADAPTER: migrate an old (pre-4.4.0) config to canonical 4.4.0 keys.

target_version_for_jar(jar_path)

Map a jar path to its config write-target by parsing the version triplet from the filename.

to_target_keys(cfg[, target_version])

Emit config keys for a target engine version (inverse of canonicalize).