conda-mirror icon indicating copy to clipboard operation
conda-mirror copied to clipboard

Option to only get n latest versions of matching packages.

Open analog-cbarber opened this issue 3 years ago • 5 comments

As new versions of packages are released, mirroring a channel from the same spec using '>=' version specifiers will pull in more and more packages. But the user may be satisfied with only the more recent versions.

We could add an option to specify that you should only take the latest n versions of each package that passes the filter. We may also want to consider options to control whether to pick up dev versions (and how many).

analog-cbarber avatar Aug 09 '21 14:08 analog-cbarber

This is something I have spent all morning trying to find. Is there any ETA on when this might happen?

FordMustang0288 avatar Aug 27 '21 12:08 FordMustang0288

I believe the maintainer is currently off for the summer, so no pull requests are being processed right now. Once my current pull requests have been accepted and merged, I will probably work on this next.

I have no idea when there will be another release.

analog-cbarber avatar Aug 27 '21 15:08 analog-cbarber

Perhaps:

  • --latest option that takes an optional number of recent versions to take. This will not include dev versions unless there are no non-dev versions.

  • --latest-dev option that takes an optional number of recent dev versions to take.

analog-cbarber avatar Aug 30 '21 14:08 analog-cbarber

There is a working version of this feature on the ag-latest and ag-dev branches of my fork. The ag-latest branch only has this feature, while ag-dev includes the other yet-to-be-merged pull requests.

analog-cbarber avatar Aug 31 '21 16:08 analog-cbarber

Hello! I've created a pull request with the commit from @analog-cbarber shown above, as it merges cleanly, looks good and works great. Please merge it to the next release of the tool, that small commit will be a BIG thing.

zinal avatar Jan 24 '23 12:01 zinal