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

expand descriptions #16

Merged
merged 3 commits into from
Sep 13, 2022
Merged

expand descriptions #16

merged 3 commits into from
Sep 13, 2022

Conversation

dberenbaum
Copy link
Contributor

Related to iterative/vscode-dvc#1192 (showing more helpful descriptions in VS Code).

@dberenbaum dberenbaum marked this pull request as draft September 9, 2022 20:04
@dberenbaum

This comment was marked as outdated.

@dberenbaum dberenbaum marked this pull request as ready for review September 9, 2022 20:25
@skshetry
Copy link
Member

@dberenbaum, there's a pyc file committed accidentally.

@dberenbaum
Copy link
Contributor Author

@dberenbaum, there's a pyc file committed accidentally.

Sorry! Fixed now.

gen.py Outdated
Can be a string or a sequence of commands."""

PARAMS_DESC = """\
Sequence of dot-separated parameter dependency keys to track from `params.yaml`.
Copy link
Member

Choose a reason for hiding this comment

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

VS Code doesn't consume these backticks in the expected way:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's not going to generate code blocks. Should we replace them with something else? I'm not sure if there's a better way to mark them or if it's fine for them to show as backticks. @jorgeorpinel Maybe you have some thoughts here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Regular ' or nothing? Can you use HTML? I.e. <code> tags

@@ -328,7 +328,7 @@
"properties": {
Copy link
Member

Choose a reason for hiding this comment

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

Stage is still missing a description:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added description for stage and other subfields that had none.

schema.json Outdated Show resolved Hide resolved
schema.json Outdated Show resolved Hide resolved
Copy link
Contributor

@jorgeorpinel jorgeorpinel left a comment

Choose a reason for hiding this comment

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

Hey. Took the liberty to check for consistency with docs. Not sure how important that is for this repo, feel free to take whatever makes sense:

gen.py Outdated Show resolved Hide resolved
gen.py Outdated Show resolved Hide resolved
class CustomParamFileKeys(BaseModel):
__root__: Dict[FilePath, Set[ParamKey]]
__root__: Dict[FilePath, Set[ParamKey]] = Field(
..., desc="Path to YAML/JSON/TOML/Python params file."
Copy link
Contributor

Choose a reason for hiding this comment

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

We specify YAML 1.2 and TOML 1.0 in DVC docs. Probably too much info for here though? Just saying

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Left this out for brevity.

Comment on lines +99 to +100
PLOT_DESC = """\
Path to plots file or dir of the stage.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you can use directories for stage plots. Can you?

At least it's not in the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, you can! 🤔 I don't actually see it in either type of plots. I can open a PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you can use directories for stage plots

Yup, you can! 🤔 I don't actually see it in either type of plots. I can open a PR.

That would be great, thanks! 🙏🏼

gen.py Outdated Show resolved Hide resolved
gen.py Outdated
Comment on lines 166 to 170
PARAMS_DESC = """\
Sequence of dot-separated parameter dependency keys to track from `params.yaml`.

May contain other YAML/JSON/TOML/Python parameter file names, with a \
sub-sequence of the param names to track in them (leave empty to include all).\
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd simplify. This tries to be super formal but may end up confusing people or not being understood. Can we link to the docs instead? E.g.

Suggested change
PARAMS_DESC = """\
Sequence of dot-separated parameter dependency keys to track from `params.yaml`.
May contain other YAML/JSON/TOML/Python parameter file names, with a \
sub-sequence of the param names to track in them (leave empty to include all).\
PARAMS_DESC = """\
List of parameter names (or groups) to track from `params.yaml`.
May be plain strings or dot-separated tree paths.
Other YAML/JSON/TOML/Python param files may be used
by prefixing their file paths to list elements (with `:`).
See
https://dvc.org/doc/user-guide/project-structure/dvcyaml-files#parameters
for details.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can simplify, but I don't know that it's possible to create actionable links.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't mind the copy edits, but again wonder why/where they come from. The language was largely borrowed from https://dvc.org/doc/user-guide/project-structure/dvcyaml-files#stage-entries with some additional technical info added like file formats.

Copy link
Contributor

@jorgeorpinel jorgeorpinel Sep 14, 2022

Choose a reason for hiding this comment

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

Just trying to use more general language e.g. avoid "sequence/sub-sequence" and "key" (which we don't use much in docs either).

Not critical if this is not user-facing, but it's good to have consistent terminology with docs when possible I think?

gen.py Outdated Show resolved Hide resolved
gen.py Outdated Show resolved Hide resolved
gen.py Outdated Show resolved Hide resolved
gen.py Outdated Show resolved Hide resolved
@dberenbaum
Copy link
Contributor Author

@jorgeorpinel I already merged but meant to leave a general comment: I prioritized consistency with the docs and incorporated any of your suggestions to that effect. Thanks for the review!

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

Successfully merging this pull request may close these issues.

4 participants