Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.1] Update parcel-built visualizations to use parcel v2 #18311

Merged
merged 28 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
99f70df
Update annotate_image to use parcel@2
dannon Jun 3, 2024
ba175d5
Update cytoscape to use parcel@2
dannon Jun 3, 2024
694451e
Update msa to use parcel@2
dannon Jun 3, 2024
33e4360
Update drawrna to use parcel@2
dannon Jun 3, 2024
700bb89
Update venn to use [email protected] -- intentionally pinned to 2.11 and not
dannon Jun 3, 2024
31956d8
Update example to use parcel@2
dannon Jun 3, 2024
27a8297
Update fits_image_viewer to use parcel@2
dannon Jun 3, 2024
d3c3dde
Upgrade parcel for h5web
dannon Jun 3, 2024
29a96d8
Update ngl to use parcel@2
dannon Jun 3, 2024
574f0ca
Update heatmap_default to use [email protected]
dannon Jun 3, 2024
4f3bbd0
Update nvd3 to use [email protected]
dannon Jun 3, 2024
919fc67
Update jqplot to use [email protected]
dannon Jun 3, 2024
7a572e2
Drop jqplot artifacts from repo, gitignore
dannon Jun 4, 2024
72fd4f2
Update pv to use parcel@2
dannon Jun 3, 2024
d37ea8b
Update openlayers to use parcel@2
dannon Jun 3, 2024
ade5f55
Update phylocanvas to use parcel@2
dannon Jun 3, 2024
d86a5fe
Drop scatterplot artifacts from repo, gitignore
dannon Jun 4, 2024
54fdd70
Update scatterplot to use [email protected]
dannon Jun 4, 2024
eb6aa43
Generalize output 'script.css' artifact ignores
dannon Jun 4, 2024
a74ac4d
Explicitly add newer @babel/core for nvd3_bar -- I think the older pi…
dannon Jun 4, 2024
bdfcce6
Scatterplot uses d3 so must remain at parcel 2.11, also explicitly sp…
dannon Jun 4, 2024
19c7f56
Add buffer dep, fix typo
dannon Jun 4, 2024
1e563af
Add 'GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR' to allow plugins to fail a build
dannon Jun 5, 2024
2fcaa77
Set github client build to fail when a plugin fails, as discussed in …
dannon Jun 5, 2024
ebd913d
Fix nvd3-based charts, babel config is redundant and problematic here,
dannon Jun 5, 2024
9e96eae
Fix scatterplot viz building linkage. It hasn't changed in a long time
dannon Jun 5, 2024
aa62112
Fix scatterplot build. Not perfect, but it should probably work and …
dannon Jun 5, 2024
1fc6140
Fix annotate image, dump jquery.ajax for fetch.
dannon Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading