-
Notifications
You must be signed in to change notification settings - Fork 2
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
add schema for top-level plots #19
Conversation
@@ -60,6 +63,27 @@ class PlotFlags(OutFlags): | |||
template: FilePath = Field(None, description="Default plot template") | |||
|
|||
|
|||
class TopLevelPlotFlags(BaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am duplicating here so that they: plots' outputs and the top-level plots are separate from the start and easier to iterate on in the future.
gen.py
Outdated
x_label: str = Field(None, description="Default label for the x-axis") | ||
y_label: str = Field(None, description="Default label for the y-axis") | ||
title: str = Field(None, description="Default plot title") | ||
template: FilePath = Field(None, description="Default plot template") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Template can also be a string name of the template, but I guess since the FilePath
is str it is ok for now? Or should we create a separate type for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by string name of the template? Can it be anything other than a path to a file?
Or should we create a separate type for it?
It’s a separate type, i.e subclassed from str
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it can be a string, for example, if user writes confusion
we will search for the template that has DEFAULT_NAME
field with this value. If it is not found, we will start checkif if it wasn't a path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thanks. Is that also the case for template
in plots
output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though the schema is going to be the same, I think it's better to be explicit about what types are supported in dvc.yaml
file.
Closes #14.