Repository navigation
Add an rm-all option to vcs - #216
bergercookie wants to merge 2 commits into
Conversation
e05ae28 to
ee80a49
Compare
|
Hi @dirk-thomas , Could you take a look at this PR? |
Sorry, something went wrong.
|
I'd also like to get this feature, but it looks like there's no active development happening here anymore, could be worth considering PRing to https://github.com/MaxandreOgeret/vcstool2/ |
Sorry, something went wrong.
|
Hi @LukeAI, I don't currently plan putting more effort in this PR. Do feel free however to port this to the new vcstool2 repo. ;) |
Sorry, something went wrong.
fair enough! thanks, sounds like a good weekend project. |
Sorry, something went wrong.
As discussed earlier in #195 it would be useful to have an
rm-alloption 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-allhas a similar interface toimportin that it accepts both--input ...as well as input redirection.It also requires either the
-f/--forceoption or the-n/--dry-runoption to actually execute. This is the same behavior as tools such asgit cleanand 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
flake8and 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
autopep8but 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.Pathandf-strings,mypycode annotations which would really help.