Sort best package by upload time (lowest priority)

in addition to version and build number. This is necessary for getting
the extended-base annotation for qiime 1.9.1, which does not contain the
annotation in linux-64/qiime-1.9.1-np110py27_1.tar.bz2 while in the
newer linux-64/qiime-1.9.1-np112py27_1.tar.bz2 it is present. This
depends of course on `conda search` returning packages sorted by upload
time and is a little brittle. It does seem better than always picking
the oldest upload time as we do without this change.  Also looks in
meta.yaml for extended base annotation, since sometimes this isn't
present in info/about.json.
This commit is contained in:
mvdbeek
2020-01-16 11:52:03 +01:00
parent beaa844532
commit b1885b065f
3 changed files with 15 additions and 7 deletions
@@ -9,11 +9,12 @@ from galaxy.tool_util.deps.mulled.mulled_build import (
from ..util import external_dependency_management
@pytest.mark.parametrize("target,base_image", [
('maker', DEFAULT_EXTENDED_BASE_IMAGE),
('samtools', DEFAULT_BASE_IMAGE)
@pytest.mark.parametrize("target,version,base_image", [
('maker', None, DEFAULT_EXTENDED_BASE_IMAGE),
('qiime', '1.9.1', DEFAULT_EXTENDED_BASE_IMAGE),
('samtools', None, DEFAULT_BASE_IMAGE),
])
@external_dependency_management
def test_base_image_for_targets(target, base_image):
target = build_target(target)
def test_base_image_for_targets(target, version, base_image):
target = build_target(target, version=version)
assert base_image_for_targets([target]) == base_image