Closed ericpre closed 3 years ago
The test seem to be playing up, no sure if this is related to PR, because running the test suite on the master isn't working - see for example https://github.com/ericpre/gator/actions/runs/722378324.
Cool, thanks for working on this!
Hey @ericpre
thanks for the PR. I carried out some performance tests (absolute figures donot matter much here):
Your solution will definitely improve experienced for mamba
users.
@wolfv I'm not familiar with the mamba details. Does mamba repoquery search
update the packages cache if it is expired?
Thanks @ericpre for this PR. I left a few improvements.
Could you also add a test for it?
For that the best would be to check the call of
f
inYou could test the call with something like:
f.assert_called_with(...)
after line 975. Note the call arguments will depend on the manager.
Sorry, I am not sure that I understand, what should be tested exactly? Do you want to have the ouptut of self._execute(self.manager, "repoquery", "search", "*", "--json")
tested?
list_available
is already tested and the changes of this PR should be covered by these tests?
Sorry, I am not sure that I understand, what should be tested exactly? Do you want to have the ouptut of
self._execute(self.manager, "repoquery", "search", "*", "--json")
tested?list_available
is already tested and the changes of this PR should be covered by these tests?
As you said, the output is already tested. I would like only to add a test to be sure the proper command is invoked depending on the manager; i.e. if conda, _execute
should be called with ["conda", "search", "--json"] - if mamba, it should be called with [manager, "repoquery", "search", "*", "--json"].
Does it clarify the intention?
Yes, it makes sense, thanks! It seems that the tests need to be adapted to pass the changes of this PR and since I don't understand how these tests works, it would take me quite a bit time to get it to work and I will able to do this here. Can you please take over the PR?
Thanks @ericpre I added the tests.
Thanks for sorting out the test and finishing the PR!
As discussed in https://github.com/mamba-org/gator/issues/132 and https://github.com/mamba-org/mamba/issues/835, use
mamba repoquery search "*" --json
in favour ofmamba search --json
(orconda search --json
), since the later is significantly slower thanmamba repoquery
.