-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement removing of the stage #3881
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
skshetry
commented
May 28, 2020
efiop
reviewed
May 28, 2020
efiop
reviewed
May 28, 2020
Closed
This should allow us to be able to remove a stage from a dvcfile, (if it's a single stage file, it removes it), and make us able to delete the overwrite the stage on run as well. This commit: * changes `run` `--overwrite-dvcfile` flag to `--overwrite` * removes prompt in `run` for overwrite and fails hard * changes `remove`: now it by default removes stage entry and unprotect outs * `remove` has `--outs` to remove outputs instead of unprotecting them
pared
suggested changes
May 29, 2020
@@ -165,6 +165,9 @@ def remove_with_prompt(self, force=False): | |||
|
|||
self.remove() | |||
|
|||
def remove_stage(self, stage): |
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.
Shouldn't FileMixin
contain this method? It feels a little bit off to accept stage
here.
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.
@pared, how about:
Suggested change
def remove_stage(self, stage): | |
def remove_stage(self, stage_name): |
efiop
approved these changes
May 31, 2020
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for removing stage entry for pipeline files and allows overwriting stage entry during
run
.Backward Incompatible changes:
--overwrite-dvcfile
flag to--overwrite
so that it makes sense for both kind of files.--outs
flag fromdvc remove
.run
will always raise an exception if there already exists a stage, previously it'd prompt to overwrite.❗ 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.
PR will come shortly.
❌ I will check DeepSource, CodeClimate, and other sanity checks below. (We consider them recommendatory and don't expect everything to be addressed. Please fix things that actually improve code or fix bugs.)
Thank you for the contribution - we'll try to review it as soon as possible. 🙏
Closes #3317