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

metrics: support TOML files #7965

Merged
merged 1 commit into from Jul 6, 2022
Merged

Conversation

alexmojaki
Copy link
Contributor

@alexmojaki alexmojaki commented Jul 3, 2022

Fixes #6402

I haven't forbidden .py files as suggested there because it just seemed like it would clutter the code more than it would add any real value, but I can do so if requested.

@alexmojaki alexmojaki requested a review from a team as a code owner July 3, 2022 18:34
@alexmojaki alexmojaki requested a review from pared July 3, 2022 18:34
@efiop efiop requested review from skshetry and removed request for pared July 3, 2022 18:58
Comment on lines +73 to +76
suffix = fs.path.suffix(path).lower()
loader = LOADERS[suffix]
val = loader(path, fs=fs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocker of this P.R. but I think we are repeating these same 3 lines in a few places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, It'd be nice to refactor this. But there's two main ways the suffix is obtained: fs.path.suffix(fs_path) and os.path.splitext(fs_path). Is it safe to assume they are and always will be equivalent? Should one be preferred over the other?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to assume they are and always will be equivalent? Should one be preferred over the other?

I think it would always be the same. Anyhow, I think we can leave that out of this P.R.

@daavoo
Copy link
Contributor

daavoo commented Jul 4, 2022

It would be nice to update docs (i.e. https://dvc.org/doc/command-reference/metrics#supported-file-formats)

@alexmojaki
Copy link
Contributor Author

Docs PR: #7965

@daavoo daavoo added A: metrics Related to dvc metrics feature is a feature labels Jul 5, 2022
@daavoo
Copy link
Contributor

daavoo commented Jul 5, 2022

@alexmojaki Could you git rebase to remove the merge commits ?

@daavoo daavoo merged commit 892b235 into iterative:main Jul 6, 2022
@daavoo
Copy link
Contributor

daavoo commented Jul 6, 2022

Thanks @alexmojaki !

alexmojaki added a commit to alexmojaki/dvc that referenced this pull request Jul 29, 2022
daavoo added a commit that referenced this pull request Aug 9, 2022
…7983)

Following up on #7965 (comment)

Co-authored-by: David de la Iglesia Castro <daviddelaiglesiacastro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: metrics Related to dvc metrics feature is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add TOML support for metrics
2 participants