Skip to content

prepro: refactor config to improve typing #5770

@anna-parker

Description

@anna-parker

As discussed with @corneliusroemer during the multi-path changes we should improve the prepro config.

Main issues:

  1. Complicated parsing and validation of types, this can be done by pydantic without custom rolling any code
  2. Complicated creation and passing or args and env variables: this can be done with pydantic-settings: https://docs.pydantic.dev/latest/concepts/pydantic_settings/#parsing-environment-variable-values
  3. Mutability of config, pydantic's @model_validator(mode="after") can be run after creating a config to modify the config in one specific place with validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    preprocessingIssues related to the preprocessing component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions