Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
skshetry opened this issue Jan 11, 2022 · 0 comments · Fixed by #7468
Closed

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

skshetry opened this issue Jan 11, 2022 · 0 comments · Fixed by #7468

Comments

@skshetry
Copy link
Member

skshetry commented Jan 11, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants