Skip to content

Change pydantic field names in a backwards compatible way #207

@jcfitzpatrick12

Description

@jcfitzpatrick12

Currently, the shared Pydantic field output_type (see here) controls signal recording file formats. This name made sense during development, as it configures the sample types produced by each receiver in GNU Radio (e.g., here). However, from a user perspective, it's confusing. The "output type" of what?

We'd like to rename this field to signal_format, which is more intuitive. A crude approach would simply change the name and update all references to it, but that would constitute a breaking change. Users may need to manually update their config or face errors.

Instead, we want to maintain backwards-compatibility. Configs created before this change should continue to work exactly the same. Finding a solution to this special case will be valuable, as we're likely to bump into the same problem again in the future.

One approach might make use of Pydantic aliases

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions