-
Notifications
You must be signed in to change notification settings - Fork 1.2k
brancher: make brancher part of scm #4562
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
@Suor does the viewer interact with brancher in any way? In this change I intended to unify the branches behaviour and return "workspace" instead of ""/"workspace" depending on repository status, not sure if that won't interfere with something at |
@@ -17,23 +17,25 @@ def test_show_simple(tmp_dir, dvc, run_copy_metrics): | |||
run_copy_metrics( | |||
"metrics_t.yaml", "metrics.yaml", metrics=["metrics.yaml"], | |||
) | |||
assert dvc.metrics.show() == {"": {"metrics.yaml": 1.1}} | |||
assert dvc.metrics.show() == {"workspace": {"metrics.yaml": 1.1}} |
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 is a breaking API change, people might rely on this, so normally we can't just break it like that, unless we have a very good reason.
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 is breaking our API, could you clarify the reasons to do that?
all_tags=False, | ||
all_commits=False, | ||
): # pylint: disable=no-self-use, unused-argument | ||
yield "workspace", LocalTree( |
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.
Do we need to return workspace from here? It looks like it makes mess, i.e. we need to skip it later.
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.
Also LocalTree
has absolutely nothing to do with Base SCM
Another thing is a branch or tag might be named workspace. In this case on metric show that branch is indistinguishable from actual workspace. |
Seems like starting from redesigning the brancher was wrong idea. Not only it would break the current functionality, but also the end result could be achieved in other way. Closing for now. |
β 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.
Thank you for the contribution - we'll try to review it as soon as possible. π
Prerequisite for #4446
In order to make plots/metrics/params
diff
accept any viable target, we need to make brancher repo agnostic. Considering thatdiff
makes sense only in case of some kind ofscm
, it makes sense to make brancher part ofscm
.