You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accept kebab-case field names in a reporter's input #2946
A reporter's input (the Input schema in flexmeasures/data/schemas/io.py) only takes snake_case today: source_types, exclude_source_types, most_recent_beliefs_only and so on. Unknown keys are refused, so "source-types" is an error, while the flex-config and most newer fields use kebab-case. As we document these fields more (#2804), the mismatch is getting more visible.
Proposal
Accept both spellings in Input: kebab-case is the documented one (source-types, exclude-source-types, most-recent-beliefs-only, ...), and snake_case is still accepted so existing configs keep working.
Map the snake_case keys with a pre_load, and refuse a field that is given in both spellings.
Update the docs that advertise the snake_case spelling: documentation/features/reporting.rst, documentation/concepts/data-pipelining.rst, documentation/tut/toy-example-reporter.rst and documentation/tut/scripts/run-tutorial5-in-docker.sh.
This fits the kebab-only direction of #2540, and SupportsLegacyFieldAliases in flexmeasures/data/schemas/utils.py may already cover the mapping.
Activity