-
Notifications
You must be signed in to change notification settings - Fork 1.2k
params/metrics: diff: implement tabulated markdown output (--show-md) #3757
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
Conversation
@@ -78,7 +78,7 @@ def run(self): | |||
"pydot>=1.2.4", | |||
"speedcopy>=2.0.1; python_version < '3.8' and sys_platform == 'win32'", | |||
"flatten_json>=0.1.6", | |||
"texttable>=0.5.2", | |||
"tabulate>=0.8.7", |
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.
This does not support aligning headers. It does have colalign
but it aligns the whole column, and, I don't think it's a deal-breaker.
@skshetry thank you for making the changes! |
for path in paths: | ||
rows.append([status, path]) | ||
|
||
return table(["Status", "Path"], rows, True) |
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.
Should the output's column be swapped?
Path | Status |
---|---|
model.pkl | Added |
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.
^ and also capitalized?
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.
Should the output's column be swapped?
Currently, it is in the order in which it was requested. And, which matches git status
.
^ and also capitalized?
not capitalized because it was requested in that form and matches git status
.
Via
--show-md
ondiff
s.β I have followed the Contributing to DVC checklist.
π If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here. If the CLI API is changed, I have updated tab completion scripts.
iterative/dvc.org#1266
Thank you for the contribution - we'll try to review it as soon as possible. π
dvc diff --show-md
.The
dvc params diff
and similar commands would output header centered. With this change, it will be left-aligned.Previously:
Now:
^ Same output in markdown parsed by Github:
Resolve #3690