Skip to content

Fix case-sensitive section-name match in sim settings loader#883

Open
samuelduchesne wants to merge 1 commit into
BIM2SIM:developmentfrom
samuelduchesne:fix/sim-settings-generic-section-case
Open

Fix case-sensitive section-name match in sim settings loader#883
samuelduchesne wants to merge 1 commit into
BIM2SIM:developmentfrom
samuelduchesne:fix/sim-settings-generic-section-case

Conversation

@samuelduchesne
Copy link
Copy Markdown

BaseSimSettings.update_from_config lowercases the section name from the config file but compares it against a list that contains the literal 'Generic Simulation Settings'. As a result, settings under the [Generic Simulation Settings] section were silently skipped, and mandatory settings declared there (e.g. weather_file_path) were never populated — triggering a misleading "not specified" error at run time.

Lowercase the literal so the comparison is case-insensitive on both sides.

`BaseSimSettings.update_from_config` lowercases the section name from the
config file but compares it against a list that contains the literal
'Generic Simulation Settings'. As a result, settings under the
[Generic Simulation Settings] section were silently skipped, and
mandatory settings declared there (e.g. weather_file_path) were never
populated — triggering a misleading "not specified" error at run time.

Lowercase the literal so the comparison is case-insensitive on both
sides.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant