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.
As discussed earlier in #195 it would be useful to have an
rm-all
option whose purpose is to remove the already cloned repositories, as specified by the given YAML file. This is so that the user can potentially clone a new set of dependencies using a new YAML file and not have to manually clean the target directory.rm-all
has a similar interface toimport
in that it accepts both--input ...
as well as input redirection.It also requires either the
-f/--force
option or the-n/--dry-run
option to actually execute. This is the same behavior as tools such asgit clean
and its purpose is to avoid a user mistake.Here are some example usages of the command:
Typical usage:
$ vcs rm-all -f src/ < repos.yaml Paths to delete: - src/follow_waypoints - src/kobuki
$ vcs rm-all -n src/ < repos.yaml Paths to delete: - src/follow_waypoints - src/kobuki [Dry Run]
Not allowed:
General thoughts
I don't see a straightforward way of doing linting locally and see what errors currently exist in the code to be committed. I think this is inherent to
flake8
and its output format IMO which is hard to read and decipher.On top of that, there's no reliable tool to correct these errors that I know of. I've been using
autopep8
but even after running it and re-formatting my code, it's still not guaranteed that it will pass the flake8 checks since there are edge cases in which auotpep8 doesn't format the code.Towards that end, I think it would make sense to switch to a linter like black. It also offers formatting functionalities and in my experience at least, it's rock solid. This way we would also not need a custom python script such as
test_flake8.py
, since checking the code would be as easy asblack --check path/to/file_or_directory
.Not terribly important, but improvements like this would make developing on the repo a more pleasant experience. What's your take?
it would be useful to require a minimum python version of at least 3.6. There are many nice features starting in that version, like
pathlib.Path
andf-strings
,mypy
code annotations which would really help.