diff --git a/client/src/components/Masthead/MastheadItem.vue b/client/src/components/Masthead/MastheadItem.vue index 98daf52e455..be3018869ff 100644 --- a/client/src/components/Masthead/MastheadItem.vue +++ b/client/src/components/Masthead/MastheadItem.vue @@ -111,20 +111,13 @@ export default { return document.getElementById("galaxy_main"); }, }, - updated() { - if (this.$refs.dropdown && this.galaxyIframe) { - this.galaxyIframe.addEventListener("load", this.iframeListener); - } + mounted() { + window.addEventListener("blur", this.hideDropdown); }, destroyed() { - if (this.$refs.dropdown && this.galaxyIframe) { - this.galaxyIframe.removeEventListener("load", this.iframeListener); - } + window.removeEventListener("blur", this.hideDropdown); }, methods: { - iframeListener() { - return this.galaxyIframe.contentDocument.addEventListener("click", this.hideDropdown); - }, hideDropdown() { if (this.$refs.dropdown) { this.$refs.dropdown.hide(); diff --git a/lib/galaxy/tool_util/cwl/util.py b/lib/galaxy/tool_util/cwl/util.py index c79beb8b1d4..1dee9cc1ca5 100644 --- a/lib/galaxy/tool_util/cwl/util.py +++ b/lib/galaxy/tool_util/cwl/util.py @@ -172,7 +172,7 @@ def galactic_job_json( def replacement_file(value): if value.get('galaxy_id'): - return {"src": "hda", "id": value['galaxy_id']} + return {"src": "hda", "id": str(value['galaxy_id'])} file_path = value.get("location", None) or value.get("path", None) # format to match output definitions in tool, where did filetype come from? filetype = value.get("filetype", None) or value.get("format", None) @@ -283,7 +283,7 @@ def galactic_job_json( def replacement_collection(value): if value.get('galaxy_id'): - return {"src": "hdca", "id": value['galaxy_id']} + return {"src": "hdca", "id": str(value['galaxy_id'])} assert "collection_type" in value collection_type = value["collection_type"] elements = to_elements(value, collection_type) diff --git a/lib/galaxy/tool_util/deps/mulled/invfile.lua b/lib/galaxy/tool_util/deps/mulled/invfile.lua index a883abdd297..db1abe49df6 100644 --- a/lib/galaxy/tool_util/deps/mulled/invfile.lua +++ b/lib/galaxy/tool_util/deps/mulled/invfile.lua @@ -60,7 +60,7 @@ end local destination_base_image = VAR.DEST_BASE_IMAGE if destination_base_image == '' then - destination_base_image = 'bgruening/busybox-bash:0.1' + destination_base_image = 'quay.io/bioconda/base-glibc-busybox-bash:latest' end local verbose = VAR.VERBOSE @@ -101,11 +101,11 @@ inv.task('build') if VAR.SINGULARITY ~= '' then inv.task('singularity') .using(singularity_image) - .withHostConfig({binds = {"build:/data", "'" .. singularity_image_dir .. "':/import"}, privileged = true}) + .withHostConfig({binds = {"build:/data", singularity_image_dir .. ":/import"}, privileged = true}) .withConfig({entrypoint = {'/bin/sh', '-c'}}) - .run('mkdir', '-p', '/usr/local/var/singularity/mnt/container') - .run('singularity', 'build', '/import/' .. VAR.SINGULARITY_IMAGE_NAME, '/import/Singularity.def') - .run('chown', VAR.USER_ID, '/import/' .. VAR.SINGULARITY_IMAGE_NAME) + .run('mkdir -p /usr/local/var/singularity/mnt/container && ' + .. 'singularity build /import/' .. VAR.SINGULARITY_IMAGE_NAME .. ' /import/Singularity.def && ' + .. 'chown ' .. VAR.USER_ID .. ' /import/' .. VAR.SINGULARITY_IMAGE_NAME) end inv.task('cleanup') diff --git a/lib/galaxy/tool_util/deps/mulled/mulled_build.py b/lib/galaxy/tool_util/deps/mulled/mulled_build.py index e5e1f21e40f..41345a0b676 100644 --- a/lib/galaxy/tool_util/deps/mulled/mulled_build.py +++ b/lib/galaxy/tool_util/deps/mulled/mulled_build.py @@ -46,9 +46,12 @@ from ..conda_compat import MetaData log = logging.getLogger(__name__) DIRNAME = os.path.dirname(__file__) -DEFAULT_BASE_IMAGE = "bgruening/busybox-bash:0.1" -DEFAULT_EXTENDED_BASE_IMAGE = "bioconda/extended-base-image:latest" -DEFAULT_CHANNELS = ["conda-forge", "bioconda"] +DEFAULT_BASE_IMAGE = os.environ.get("DEFAULT_BASE_IMAGE", "quay.io/bioconda/base-glibc-busybox-bash:latest") +DEFAULT_EXTENDED_BASE_IMAGE = os.environ.get("DEFAULT_EXTENDED_BASE_IMAGE", "quay.io/bioconda/base-glibc-debian-bash:latest") +if 'DEFAULT_MULLED_CONDA_CHANNELS' in os.environ: + DEFAULT_CHANNELS = os.environ['DEFAULT_MULLED_CONDA_CHANNELS'].split(',') +else: + DEFAULT_CHANNELS = ["conda-forge", "bioconda"] DEFAULT_REPOSITORY_TEMPLATE = "quay.io/${namespace}/${image}" DEFAULT_BINDS = ["build/dist:/usr/local/"] DEFAULT_WORKING_DIR = '/source/' diff --git a/test/unit/tool_util/mulled/test_mulled_build.py b/test/unit/tool_util/mulled/test_mulled_build.py index 2aead594a72..568a713d9f7 100644 --- a/test/unit/tool_util/mulled/test_mulled_build.py +++ b/test/unit/tool_util/mulled/test_mulled_build.py @@ -5,6 +5,7 @@ from galaxy.tool_util.deps.mulled.mulled_build import ( build_target, DEFAULT_BASE_IMAGE, DEFAULT_EXTENDED_BASE_IMAGE, + mull_targets, ) from ..util import external_dependency_management @@ -18,3 +19,11 @@ from ..util import external_dependency_management def test_base_image_for_targets(target, version, base_image): target = build_target(target, version=version) assert base_image_for_targets([target]) == base_image + + +@external_dependency_management +def test_mulled_build_files_cli(tmpdir): + singularity_image_dir = tmpdir.mkdir('singularity image dir') + target = build_target('zlib') + mull_targets([target], command='build-and-test', singularity=True, singularity_image_dir=singularity_image_dir) + assert singularity_image_dir.join('zlib').exists()