Skip to content

Accept kebab-case field names in a reporter's input #2946

Todo

Description

@BelhsanHmida

Context

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

  1. added this to the 1.2.0 milestone on Dec 1, 2026
  2. self-assigned this
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions