Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release_24.1' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Jun 6, 2024
2 parents 1865c43 + 3a3bbfb commit 4c4b62b
Show file tree
Hide file tree
Showing 33 changed files with 317 additions and 513 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ jobs:
path: 'galaxy root/static'
- name: Build client
if: steps.cache.outputs.cache-hit != 'true'
env:
GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR: 1
run: make client
working-directory: 'galaxy root'
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@ packages/*/*.egg-info
config/plugins/**/static/dist
config/plugins/**/static/script.js
config/plugins/**/static/main.css
config/plugins/**/static/script.css
config/plugins/**/static/plugin_build_hash.txt
config/plugins/**/static/*.map

# Viz-specific build artifacts to ignore (until these are removed from codebase)
config/plugins/visualizations/annotate_image/static/jquery.contextMenu.css
config/plugins/visualizations/nvd3/nvd3_bar/static/nvd3.js
config/plugins/visualizations/h5web/static/script.css
config/plugins/visualizations/tiffviewer/static/script.css
config/plugins/visualizations/scatterplot/static/scatterplot.js

# CWL conformance tests
lib/galaxy_test/api/cwl/test_cwl_conformance_v1_?.py
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ OPEN_RESOURCE=bash -c 'open $$0 || xdg-open $$0'
SLIDESHOW_TO_PDF?=bash -c 'docker run --rm -v `pwd`:/cwd astefanutti/decktape /cwd/$$0 /cwd/`dirname $$0`/`basename -s .html $$0`.pdf'
YARN := $(shell $(IN_VENV) command -v yarn 2> /dev/null)
YARN_INSTALL_OPTS=--network-timeout 300000 --check-files
# Default to not fail on error, set to 1 to fail client builds on a plugin error.
GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR?=0
# Respect predefined NODE_OPTIONS, otherwise set maximum heap size low for
# compatibility with smaller machines.
NODE_OPTIONS ?= --max-old-space-size=3072
NODE_ENV = env NODE_OPTIONS=$(NODE_OPTIONS)
NODE_ENV = env NODE_OPTIONS=$(NODE_OPTIONS) GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR=$(GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR)
CWL_TARGETS := test/functional/tools/cwl_tools/v1.0/conformance_tests.yaml \
test/functional/tools/cwl_tools/v1.1/conformance_tests.yaml \
test/functional/tools/cwl_tools/v1.2/conformance_tests.yaml \
Expand Down
17 changes: 15 additions & 2 deletions client/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ const STATIC_PLUGIN_BUILD_IDS = [
"msa",
"mvpapp",
"ngl",
"nora",
"nvd3/nvd3_bar",
"openlayers",
"openseadragon",
"PCA_3Dplot",
"phylocanvas",
"pv",
"nora",
"venn",
"scatterplot",
"tiffviewer",
"ts_visjs",
"venn",
];
const DIST_PLUGIN_BUILD_IDS = ["new_user"];
const PLUGIN_BUILD_IDS = Array.prototype.concat(DIST_PLUGIN_BUILD_IDS, STATIC_PLUGIN_BUILD_IDS);
Expand All @@ -56,6 +57,11 @@ const PATHS = {
},
};

const failOnError =
process.env.GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR && process.env.GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR !== "0"
? true
: false;

PATHS.pluginBaseDir =
(process.env.GALAXY_PLUGIN_PATH && process.env.GALAXY_PLUGIN_PATH !== "None"
? process.env.GALAXY_PLUGIN_PATH
Expand Down Expand Up @@ -186,6 +192,13 @@ function buildPlugins(callback, forceRebuild) {
console.error(
`Error building ${pluginName}, not saving build state. Please report this issue to the Galaxy Team.`
);
if (failOnError) {
// Fail on error.
console.error(
"Failing build due to GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR being set, see error(s) above."
);
process.exit(1);
}
}
}
});
Expand Down
8 changes: 4 additions & 4 deletions config/plugins/visualizations/annotate_image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
],
"license": "AFL-3.0",
"dependencies": {
"babel-preset-env": "^1.6.1",
"backbone": "^1.3.3",
"jquery": "^3.3.1",
"jquery-contextmenu": "^2.7.1",
"jquery.ui.position": "^1.11.4",
"paper": "^0.12.3",
"parcel-bundler": "^1.4.1",
"underscore": "^1.8.3"
},
"devDependencies": {
"parcel": "2.12.0"
},
"scripts": {
"build": "yarn build-css && yarn build-js",
"build-css": "cp 'node_modules/jquery-contextmenu/dist/jquery.contextMenu.css' 'static/'",
"build-js": "parcel build src/script.js -d static --no-source-maps"
"build-js": "parcel build src/script.js --dist-dir static"
}
}
3 changes: 3 additions & 0 deletions config/plugins/visualizations/annotate_image/src/jq-loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import jquery from "jquery";

export default window.$ = window.jQuery = jquery;
Loading

0 comments on commit 4c4b62b

Please sign in to comment.