EnergySystemsModellingLab / MUSE_OS

Welcome to the MUSE-OS repository
https://muse-os.readthedocs.io/en/latest/
GNU General Public License v3.0
22 stars 9 forks source link

[BUG] Fix spelling "threshhold" -> "threshold" #301

Closed alexdewar closed 1 month ago

alexdewar commented 4 months ago

There are lots of places where the incorrect spelling "threshhold" is used. Annoyingly, some of those places are in the names of fields in config files, so if we blindly rename them we will break backwards compatibility. Accordingly, we should probably deprecated these misspelled fields and issue a warning if the user uses them and add fields for the correctly spelled variant.

tsmbland commented 1 month ago

@alexdewar Mind if I take this?

alexdewar commented 1 month ago

Nope, go ahead!

alexdewar commented 1 month ago

My plan was to check what happens if you specify one of the old misspelled variants of the option names after we change it, because we don't want default values to be substituted into users' models.

tsmbland commented 1 month ago

Good point. There are three parameters:

asset_threshhold: this is defined in settings.toml. If we rename this, then if someone uses the old spelling it will ignore this and use the default value. I guess we could raise an error if the incorrect spelling is found and prompt users to rename the parameter.

maturity_threshhold: this is the internal name for the parameter defined as MaturityThreshold (correct spelling) in the Agents.csv file - so no problems here.

demand_threshhold: as far as I can tell there is no way for the user to define this, and it will always use the default vaule. So no problems renaming this, but I assume something is incomplete here