Skip to content

toml: being 1.0.0 compliant, preserving style on dump #7253

@skshetry

Description

@skshetry

We support toml as params file. There are a few issues with our current toml parsing:

  1. We use toml library, which is not toml 1.0 standard compatible. Also, the library is not being actively maintained.
  2. toml dumping does not preserve existing formatting.
  3. Add TOML support for metrics #6402

We can try migrating to tomli (which is being proposed to be included in the standard library, see PEP 680), which is minimalistic and does not support dumps. tomlkit does support dumps and preserve styles and is 1.0.0 compliant. As we don't really care about performance for toml at this time, we may as well just use tomlkit for both.

TOML support in dvc was introduced in #4258.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions