Add (weakly required) --all argument to forget-results as well as adding --all-tests argument#18
Add (weakly required) --all argument to forget-results as well as adding --all-tests argument#18hlovdal wants to merge 5 commits intomhagger:masterfrom
Conversation
91cdeec to
978b489
Compare
|
I admit that I've implemented what I think the reader abstraction could look like in #19. Also, I implemented this as an iterator, because I think that makes it easier to use. What do you think of it? If it's OK with you, I'd rather have the functionality of this PR rewritten based on |
978b489 to
5ffef83
Compare
|
Branch updated to make use of |
5ffef83 to
24047cc
Compare
As mentioned in issue #11, the
forget-resultscommand's default behaviour of deleting everything will be super dangerous if it ever gains support for deleting individual results. I have now added a--alloption to that command which gives a warning if it is not given but otherwise the command behaves as before (except it now prints status a line on success).In addition a bonus
--all-testsoption is also added that will as the name implies delete results for all the defined tests. So regardless of if the command ever gets support for deleting individual results, it now makes sense to be required to explicitly specify which tests that should be forgotten.I have no plans on working on adding support for deleting individual test results with the forget-results command, but by adding
--allnow this should be less of a problem to do some time in the future.When refactoring and splitting functions I let the code stay in the same place as before as much as possible to make the diffs small, but that might have resulted in a bit untidiness with regards to code layout in the file. Maybe you want to move around on some of the functions.
I have kept the colouring of the warning consistent with the existing code, but I really think it deserves a more prominent colour.