diff --git a/.ci/jenkins/api-py3 b/.ci/jenkins/api-py3 new file mode 120000 index 00000000000..9e5bfb42d23 --- /dev/null +++ b/.ci/jenkins/api-py3 @@ -0,0 +1 @@ +api \ No newline at end of file diff --git a/.ci/jenkins/api-py3/run_tests.sh b/.ci/jenkins/api-py3/run_tests.sh deleted file mode 100755 index 24790d0b720..00000000000 --- a/.ci/jenkins/api-py3/run_tests.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./run_tests.sh --dockerize --python3 --db postgres --clean_pyc --skip_flakey_fails -api "$@" diff --git a/.ci/jenkins/framework-py3 b/.ci/jenkins/framework-py3 new file mode 120000 index 00000000000..e3939d229ce --- /dev/null +++ b/.ci/jenkins/framework-py3 @@ -0,0 +1 @@ +framework \ No newline at end of file diff --git a/.ci/jenkins/framework-py3/run_tests.sh b/.ci/jenkins/framework-py3/run_tests.sh deleted file mode 100755 index f8bfe97335d..00000000000 --- a/.ci/jenkins/framework-py3/run_tests.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./run_tests.sh --dockerize --python3 --db postgres --clean_pyc --framework "$@" diff --git a/.ci/jenkins/integration-py3 b/.ci/jenkins/integration-py3 new file mode 120000 index 00000000000..c0bfe0d4f94 --- /dev/null +++ b/.ci/jenkins/integration-py3 @@ -0,0 +1 @@ +integration \ No newline at end of file diff --git a/.ci/jenkins/integration-py3/run_tests.sh b/.ci/jenkins/integration-py3/run_tests.sh deleted file mode 100755 index ffc6c87e98c..00000000000 --- a/.ci/jenkins/integration-py3/run_tests.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -DOCKER_RUN_EXTRA_ARGS="--privileged" ./run_tests.sh --dockerize --python3 --db postgres --clean_pyc --integration "$@" diff --git a/.ci/jenkins/main-tools-py3 b/.ci/jenkins/main-tools-py3 new file mode 120000 index 00000000000..49589fdd3a8 --- /dev/null +++ b/.ci/jenkins/main-tools-py3 @@ -0,0 +1 @@ +main-tools \ No newline at end of file diff --git a/.ci/jenkins/main-tools-py3/run_tests.sh b/.ci/jenkins/main-tools-py3/run_tests.sh deleted file mode 100755 index 442b15cdf2d..00000000000 --- a/.ci/jenkins/main-tools-py3/run_tests.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./run_tests.sh --dockerize --python3 --db postgres --clean_pyc -main "$@" diff --git a/.ci/jenkins/selenium-compose/run_galaxy.bash b/.ci/jenkins/selenium-compose/run_galaxy.bash index aaf10b77401..c16901324c1 100755 --- a/.ci/jenkins/selenium-compose/run_galaxy.bash +++ b/.ci/jenkins/selenium-compose/run_galaxy.bash @@ -20,8 +20,7 @@ virtualenv "$GALAXY_VIRTUAL_ENV" chown -R "$GALAXY_TEST_UID:$GALAXY_TEST_UID" "$GALAXY_VIRTUAL_ENV" cd /galaxy -HOME=/galaxy -sudo -E -u "#${GALAXY_TEST_UID}" ./scripts/common_startup.sh || { echo "common_startup.sh failed"; exit 1; } +sudo -E -H -u "#${GALAXY_TEST_UID}" ./scripts/common_startup.sh || { echo "common_startup.sh failed"; exit 1; } echo "Waiting for postgres to become available" while ! nc -z postgres 5432; @@ -34,7 +33,7 @@ echo "Creating postgres database for Galaxy" createdb -w -U postgres -h postgres galaxy echo "Starting and waiting for Galaxy daemon(s)" -sudo -E -u "#${GALAXY_TEST_UID}" GALAXY_RUN_ALL=1 bash "$GALAXY_ROOT/run.sh" --daemon --wait +sudo -E -H -u "#${GALAXY_TEST_UID}" GALAXY_RUN_ALL=1 bash "$GALAXY_ROOT/run.sh" --daemon --wait echo "Galaxy daemon ready, monitoring Galaxy logs" tail -f "$GALAXY_ROOT/main.log" diff --git a/.ci/jenkins/selenium-py3 b/.ci/jenkins/selenium-py3 new file mode 120000 index 00000000000..954f0db0bc0 --- /dev/null +++ b/.ci/jenkins/selenium-py3 @@ -0,0 +1 @@ +selenium \ No newline at end of file diff --git a/.ci/jenkins/selenium-py3/run_tests.sh b/.ci/jenkins/selenium-py3/run_tests.sh deleted file mode 100755 index 827151835f6..00000000000 --- a/.ci/jenkins/selenium-py3/run_tests.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Enable retries on tests to reduce chances of transient failures. -: ${GALAXY_TEST_SELENIUM_RETRIES:=1} - -# If in Jenkins environment, use it for artifacts. -if [ -n "$BUILD_NUMBER" ]; -then - : ${GALAXY_TEST_ERRORS_DIRECTORY:=${BUILD_NUMBER}-test-errors} - : ${GALAXY_TEST_SCREENSHOTS_DIRECTORY:=${BUILD_NUMBER}-test-screenshots} -else - : ${GALAXY_TEST_ERRORS_DIRECTORY:=database/test-errors} - : ${GALAXY_TEST_SCREENSHOTS_DIRECTORY:=database/test-screenshots} -fi - -mkdir -p "$GALAXY_TEST_ERRORS_DIRECTORY" -mkdir -p "$GALAXY_TEST_SCREENSHOTS_DIRECTORY" - -mkdir -p ~/.jenkins-yarn-cache -YARN_CACHE_FOLDER=~/.jenkins-yarn-cache - -# Start Selenium server in the test Docker container. -DOCKER_RUN_EXTRA_ARGS="${DOCKER_RUN_EXTRA_ARGS} --shm-size=2g -v $YARN_CACHE_FOLDER:$YARN_CACHE_FOLDER -e YARN_CACHE_FOLDER=$YARN_CACHE_FOLDER -e USE_SELENIUM=1 -e GALAXY_TEST_SELENIUM_RETRIES=${GALAXY_TEST_SELENIUM_RETRIES} -e GALAXY_TEST_ERRORS_DIRECTORY=${GALAXY_TEST_ERRORS_DIRECTORY} -e GALAXY_TEST_SCREENSHOTS_DIRECTORY=${GALAXY_TEST_SCREENSHOTS_DIRECTORY}" -export DOCKER_RUN_EXTRA_ARGS - -./run_tests.sh --dockerize --python3 --db postgres --clean_pyc --skip_flakey_fails --selenium "$@" diff --git a/.circleci/config.yml b/.circleci/config.yml index 7904c41fac3..3afbbc0bb98 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,7 +95,8 @@ jobs: <<: *set_workdir steps: - *restore_repo_cache - - *install_tox + # Ensure minimum virtualenv version due to https://github.com/pypa/virtualenv/issues/1670 + - run: sudo pip install tox 'virtualenv>=20.0.8' - run: tox -e py27-unit py35_docstring: docker: @@ -135,6 +136,10 @@ jobs: <<: *set_workdir steps: - *restore_repo_cache + - run: sh scripts/common_startup.sh + - run: wget -q https://github.com/jmchilton/galaxy-downloads/raw/master/db_gx_rev_0127.sqlite + - run: mv db_gx_rev_0127.sqlite database/universe.sqlite + - run: sh manage_db.sh -c ./config/galaxy.yml.sample upgrade - *install_tox - run: tox -e py35-first_startup validate_test_tools: diff --git a/.github/workflows/converter_tests.yaml b/.github/workflows/converter_tests.yaml new file mode 100644 index 00000000000..8b20d095f3a --- /dev/null +++ b/.github/workflows/converter_tests.yaml @@ -0,0 +1,34 @@ +name: Converter tests +on: [push, pull_request] +jobs: + + test: + name: Test + runs-on: ubuntu-18.04 + strategy: + matrix: + python-version: [3.7] + steps: + - uses: actions/checkout@v2 + with: + path: 'galaxy root' + - name: Clone galaxyproject/galaxy-test-data + uses: actions/checkout@v2 + with: + repository: galaxyproject/galaxy-test-data + path: galaxy-test-data + - uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Cache venv dir + uses: actions/cache@v1 + id: pip-cache + with: + path: ~/.cache/pip + key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} + - name: Move test data + run: rsync -av --remove-source-files --exclude .git galaxy-test-data/ 'galaxy root/test-data/' + - name: Install planemo + run: pip install planemo + - name: Run tests + run: planemo test --galaxy_python_version ${{ matrix.python-version }} --galaxy_root 'galaxy root' 'galaxy root'/lib/galaxy/datatypes/converters/*xml diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 5530e5017bf..3bd0aaf4d69 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -2,8 +2,8 @@ name: Integration on: [push, pull_request] env: GALAXY_TEST_DBURI: 'postgres://postgres:postgres@localhost:5432/galaxy?client_encoding=utf8' + GALAXY_TEST_AMQP_URL: 'amqp://localhost:5672//' jobs: - test: name: Test runs-on: ubuntu-18.04 @@ -20,11 +20,22 @@ jobs: POSTGRES_DB: postgres ports: - 5432:5432 + rabbitmq: + image: rabbitmq + ports: + - 5672:5672 steps: + - name: Prune unused docker image, volumes and containers + run: docker system prune -a -f + - name: Clean dotnet folder for space + if: matrix.subset == 'kubernetes' + run: rm -Rf /usr/share/dotnet - name: Setup Minikube if: matrix.subset == 'kubernetes' id: minikube - uses: CodingNagger/minikube-setup-action@v1.0.2 + uses: CodingNagger/minikube-setup-action@v1.0.3 + with: + minikube-version: "1.9.0-0_amd64" - name: Launch Minikube if: matrix.subset == 'kubernetes' run: eval ${{ steps.minikube.outputs.launcher }} @@ -32,9 +43,8 @@ jobs: if: matrix.subset == 'kubernetes' run: | kubectl get pods - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: - fetch-depth: 1 path: 'galaxy root' - uses: actions/setup-python@v1 with: @@ -44,6 +54,7 @@ jobs: id: pip-cache with: path: ~/.cache/pip - key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} + key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} - name: Run tests run: './run_tests.sh -integration test/integration -- -k "${{ matrix.subset }}"' + working-directory: 'galaxy root' diff --git a/.github/workflows/mulled.yaml b/.github/workflows/mulled.yaml index f31e310452b..1bdcd1dfde0 100644 --- a/.github/workflows/mulled.yaml +++ b/.github/workflows/mulled.yaml @@ -9,19 +9,20 @@ jobs: matrix: python-version: [3.7] steps: - - name: Cache tox dir - uses: actions/cache@v1 - id: cache-tox-mulled + - uses: actions/checkout@v2 with: - path: .tox/mulled - key: tox-mulled-${{ matrix.python-version }} - - uses: actions/checkout@v1 - with: - fetch-depth: 1 + path: 'galaxy root' - uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} + - name: Cache pip dir + uses: actions/cache@v1 + id: pip-cache + with: + path: ~/.cache/pip + key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} - name: Install tox run: pip install tox - name: run tests run: tox -e mulled + working-directory: 'galaxy root' diff --git a/.github/workflows/osx_startup.yaml b/.github/workflows/osx_startup.yaml new file mode 100644 index 00000000000..f59525e812b --- /dev/null +++ b/.github/workflows/osx_startup.yaml @@ -0,0 +1,28 @@ +name: OSX +on: [push, pull_request] +jobs: + + test: + name: Startup test + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + path: 'galaxy root' + - name: Cache pip dir + uses: actions/cache@v1 + id: pip-cache + with: + path: ~/Library/Caches/pip + # scripts/common_startup.sh creates a conda env for Galaxy containing Python 3.6 + key: pip-cache-3.6-${{ hashFiles('galaxy root/requirements.txt') }} + - name: Install tox + run: pip install tox + - name: Install and activate miniconda # use this job to test using Python from a conda environment + uses: goanpeca/setup-miniconda@v1 + with: + activate-environment: '' + - name: run tests + run: tox -e first_startup + shell: bash -l {0} # need this to have CONDA_EXE set + working-directory: 'galaxy root' diff --git a/.github/workflows/toolshed.yaml b/.github/workflows/toolshed.yaml new file mode 100644 index 00000000000..38628962cea --- /dev/null +++ b/.github/workflows/toolshed.yaml @@ -0,0 +1,37 @@ +name: Toolshed +on: [push, pull_request] +env: + GALAXY_TEST_DBURI: 'postgres://postgres:postgres@localhost:5432/galaxy?client_encoding=utf8' + TOOL_SHED_TEST_DBURI: 'postgres://postgres:postgres@localhost:5432/toolshed?client_encoding=utf8' +jobs: + test: + name: Test + runs-on: ubuntu-18.04 + strategy: + matrix: + python-version: [3.7] + services: + postgres: + image: postgres:11 + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: postgres + ports: + - 5432:5432 + steps: + - uses: actions/checkout@v2 + with: + path: 'galaxy root' + - uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Cache pip dir + uses: actions/cache@v1 + id: pip-cache + with: + path: ~/.cache/pip + key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} + - name: Run tests + run: './run_tests.sh -toolshed' + working-directory: 'galaxy root' diff --git a/.gitignore b/.gitignore index 31f42a91144..e4d13b558e7 100644 --- a/.gitignore +++ b/.gitignore @@ -176,3 +176,5 @@ packages/*/*.egg-info # Plugin build artifacts -- TODO make this more generic as a part of the standard plugin interface config/plugins/visualizations/**/static/script.js +# TODO: Really need to follow up on this and make it standard. +config/plugins/visualizations/**/static/main.css diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 942e8625b46..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -os: osx -# No version of Python is available via virtualenv on OS X workers, see https://github.com/travis-ci/travis-ci/issues/2312 -language: generic - -env: - - TOX_ENV=py27-first_startup - - TOX_ENV=py35-first_startup - -install: - - set -e - - pip install tox - - | - if [ "$TOX_ENV" == "py27-first_startup" ]; then - sh scripts/common_startup.sh - wget -q https://github.com/jmchilton/galaxy-downloads/raw/master/db_gx_rev_0127.sqlite - mv db_gx_rev_0127.sqlite database/universe.sqlite - sh manage_db.sh upgrade - elif [ "$TOX_ENV" == "py35-first_startup" ]; then - MINICONDA_URL="https://repo.anaconda.com/miniconda" - MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" - curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}" - bash $MINICONDA_FILE -b - ~/miniconda3/bin/conda create --yes --override-channels --channel conda-forge --channel defaults --name _galaxy_ 'python=3.5' 'pip>=9' 'virtualenv>=16' - . ~/miniconda3/bin/activate _galaxy_ - fi - -script: tox -e $TOX_ENV - -notifications: - email: false diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 800d4762594..d6507a7be42 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -86,6 +86,7 @@ The following individuals have contributed code to Galaxy: * Joachim Jacob * Xiaoqian Jiang * Jim Johnson +* Kaivan Kamali * Radhesh Kamath * Iyad Kandalaft * Jan Kanis diff --git a/client/.eslintrc.js b/client/.eslintrc.js index f5b615f0a69..50e8fe35157 100644 --- a/client/.eslintrc.js +++ b/client/.eslintrc.js @@ -1,7 +1,7 @@ module.exports = { extends: [ "eslint:recommended", - "plugin:vue/strongly-recommended", + "plugin:vue/strongly-recommended" //"airbnb-base", eventually ], env: { @@ -15,17 +15,20 @@ module.exports = { parser: "babel-eslint", sourceType: "module" }, - plugins: ["html"], rules: { // Standard rules "no-console": "off", "no-unused-vars": ["error", { args: "none" }], "prefer-const": "error", + "one-var": ["error", "never"], + + "vue/valid-v-slot": "error", + "vue/v-slot-style": ["error", { atComponent: "v-slot", default: "v-slot", named: "longform" }], // Vue TODO (enable these) - "vue/require-default-prop": "off", - "vue/require-prop-types": "off", - "vue/prop-name-casing": "off", + "vue/require-default-prop": "warn", + "vue/require-prop-types": "warn", + "vue/prop-name-casing": "warn", // Prettier compromises/workarounds -- mostly #wontfix? "vue/html-indent": "off", diff --git a/client/galaxy/images/light_gray_grid.gif b/client/galaxy/images/light_gray_grid.gif deleted file mode 100644 index 33471924df2..00000000000 Binary files a/client/galaxy/images/light_gray_grid.gif and /dev/null differ diff --git a/client/galaxy/scripts/app/galaxy.js b/client/galaxy/scripts/app/galaxy.js index 075ce79822d..86dd4f59728 100644 --- a/client/galaxy/scripts/app/galaxy.js +++ b/client/galaxy/scripts/app/galaxy.js @@ -39,7 +39,7 @@ try { } /** initalize options and sub-components */ -GalaxyApp.prototype._init = function(options, bootstrapped) { +GalaxyApp.prototype._init = function (options, bootstrapped) { _.extend(this, Backbone.Events); if (localDebugging) { this.logger = console; @@ -98,7 +98,7 @@ GalaxyApp.prototype.defaultOptions = { patchExisting: true, /** root url of this app */ root: "/", - session_csrf_token: null + session_csrf_token: null, }; /** filter to options present in defaultOptions (and default to them) */ @@ -162,8 +162,8 @@ GalaxyApp.prototype._initLogger = function _initLogger(loggerOptions) { this.logger = new metricsLogger.MetricsLogger(loggerOptions); this.emit = {}; - ["log", "debug", "info", "warn", "error", "metric"].map(i => { - this.emit[i] = data => { + ["log", "debug", "info", "warn", "error", "metric"].map((i) => { + this.emit[i] = (data) => { this.logger.emit(i, arguments[0], Array.prototype.slice.call(arguments, 1)); }; }); @@ -188,7 +188,10 @@ GalaxyApp.prototype._initLocale = function _initLocale(options) { /** add the localize fn to this object and the window namespace (as '_l') */ GalaxyApp.prototype._initUserLocale = function _initUserLocale(options) { // Choose best locale - const global_locale = this.config.default_locale ? this.config.default_locale.toLowerCase() : false; + const global_locale = + this.config.default_locale && this.config.default_locale != "auto" + ? this.config.default_locale.toLowerCase() + : false; let extra_user_preferences = {}; if (this.user && this.user.attributes.preferences && "extra_user_preferences" in this.user.attributes.preferences) { @@ -209,7 +212,7 @@ GalaxyApp.prototype._initUserLocale = function _initUserLocale(options) { ? "__root" : (navigator.language || navigator.userLanguage || "__root").toLowerCase(); - const locale = user_locale || global_locale || nav_locale; + const locale = user_locale || nav_locale || global_locale; sessionStorage.setItem("currentLocale", locale); }; @@ -237,7 +240,7 @@ GalaxyApp.prototype._setUpListeners = function _setUpListeners() { this.lastAjax = { url: location.href.slice(0, -1) + options.url, - data: data + data: data, }; //TODO:?? we might somehow manage to *retry* ajax using either this hook or Backbone.sync }); @@ -298,5 +301,5 @@ GalaxyApp.prototype.toString = function toString() { // ============================================================================ export default { - GalaxyApp: GalaxyApp + GalaxyApp: GalaxyApp, }; diff --git a/client/galaxy/scripts/app/monitor.js b/client/galaxy/scripts/app/monitor.js index 253a834fb05..42b48f0de0c 100644 --- a/client/galaxy/scripts/app/monitor.js +++ b/client/galaxy/scripts/app/monitor.js @@ -8,20 +8,20 @@ import { serverPath } from "utils/serverPath"; const galaxyStub = { root: getAppRoot(), - config: {} + config: {}, }; if (!window.Galaxy) { Object.defineProperty(window, "Galaxy", { enumerable: true, - get: function() { + get: function () { console.warn("accessing (get) window.Galaxy", serverPath()); return getGalaxyInstance() || galaxyStub; }, - set: function(newValue) { + set: function (newValue) { console.warn("accessing (set) window.Galaxy", serverPath()); setGalaxyInstance(newValue); - } + }, }); } else { console.error("Detected redefinition of window.Galaxy -- skipping, but this should be investigated.", serverPath()); diff --git a/client/galaxy/scripts/bundleEntries.js b/client/galaxy/scripts/bundleEntries.js index 6c352c38119..8e6efed234d 100644 --- a/client/galaxy/scripts/bundleEntries.js +++ b/client/galaxy/scripts/bundleEntries.js @@ -52,14 +52,14 @@ export function multiHistory(options) { order: options.order, limitOnFirstFetch: options.limit, limitPerFetch: options.limit, - currentHistoryId: options.current_history_id + currentHistoryId: options.current_history_id, }); const multipanel = new MultiPanel.MultiPanelColumns({ el: $("#center").get(0), - histories: histories + histories: histories, }); - histories.fetchFirst({ silent: true }).done(function() { + histories.fetchFirst({ silent: true }).done(function () { multipanel.createColumns(); multipanel.render(0); }); @@ -85,7 +85,7 @@ export function chart(options) { export const chartUtilities = { Datasets: Datasets, Jobs: Jobs, - Series: Series + Series: Series, }; export { initMasthead } from "components/Masthead/initMasthead"; @@ -93,9 +93,9 @@ export { panelManagement } from "onload/globalInits/panelManagement"; export { mountMakoTags } from "components/Tags"; export { mountJobMetrics } from "components/JobMetrics"; export { mountJobParameters } from "components/JobParameters"; -export { mountWorkflowEditor, mountWorkflowPanel } from "components/Workflow/Editor/mount"; -export { mountToolBoxWorkflow } from "components/Panels/mount"; +export { mountWorkflowEditor } from "components/Workflow/Editor/mount"; export { mountPageDisplay } from "components/PageDisplay"; +export { mountDestinationParams } from "components/JobDestinationParams"; // Used in common.mako export { default as store } from "storemodern"; diff --git a/client/galaxy/scripts/components/Alert.vue b/client/galaxy/scripts/components/Alert.vue index f33a3bf6bd6..232e1d54f67 100644 --- a/client/galaxy/scripts/components/Alert.vue +++ b/client/galaxy/scripts/components/Alert.vue @@ -13,21 +13,21 @@ export default { */ message: { type: String, - default: "" + default: "", }, /** * Alias for variant, takes precedence if both are set */ status: { type: String, - default: "" + default: "", }, /** * Alert type, one of done/success, info, warning, error/danger */ variant: { type: String, - default: "done" + default: "done", }, /** Display a close button in the alert that allows it to be dismissed */ dismissible: Boolean, @@ -36,7 +36,7 @@ export default { /** If a number, number of seconds to show before dismissing */ show: [Boolean, Number], /** Should the alert fade out */ - fade: Boolean + fade: Boolean, }, computed: { galaxyKwdToBootstrap() { @@ -48,7 +48,7 @@ export default { done: "success", info: "info", warning: "warning", - error: "danger" + error: "danger", }; if (variant in galaxyKwdToBoostrapDict) { return galaxyKwdToBoostrapDict[variant]; @@ -66,7 +66,7 @@ export default { } else { return false; } - } - } + }, + }, }; diff --git a/client/galaxy/scripts/components/Citations.vue b/client/galaxy/scripts/components/Citations.vue index 0d9e8ecfe32..b15df077da5 100644 --- a/client/galaxy/scripts/components/Citations.vue +++ b/client/galaxy/scripts/components/Citations.vue @@ -1,33 +1,52 @@ diff --git a/client/galaxy/scripts/components/User/UserPreferencesModel.js b/client/galaxy/scripts/components/User/UserPreferencesModel.js index 3a8ac11ac3e..9f18625916c 100644 --- a/client/galaxy/scripts/components/User/UserPreferencesModel.js +++ b/client/galaxy/scripts/components/User/UserPreferencesModel.js @@ -6,83 +6,87 @@ export const getUserPreferencesModel = () => { const config = Galaxy.config; return { information: { - title: _l("Manage information"), + title: _l("Manage Information"), + id: "edit-preferences-information", description: "Edit your email, addresses and custom parameters or change your public name.", url: `api/users/${Galaxy.user.id}/information/inputs`, icon: "fa-user", redirect: "user", - shouldRender: !config.use_remote_user + shouldRender: !config.use_remote_user, }, password: { - title: _l("Change password"), + title: _l("Change Password"), + id: "edit-preferences-password", description: _l("Allows you to change your login credentials."), icon: "fa-unlock-alt", url: `api/users/${Galaxy.user.id}/password/inputs`, - submit_title: "Save password", + submit_title: "Save Password", redirect: "user", - shouldRender: !config.use_remote_user + shouldRender: !config.use_remote_user, }, communication: { - title: _l("Change communication settings"), + title: _l("Change Communication Settings"), + id: "edit-preferences-communication", description: _l("Enable or disable the communication feature to chat with other users."), url: `api/users/${Galaxy.user.id}/communication/inputs`, icon: "fa-comments-o", redirect: "user", - shouldRender: !!config.enable_communication_server + shouldRender: !!config.enable_communication_server, }, permissions: { - title: _l("Set dataset permissions for new histories"), + title: _l("Set Dataset Permissions for new Histories"), + id: "edit-preferences-permissions", description: "Grant others default access to newly created histories. Changes made here will only affect histories created after these settings have been stored.", url: `api/users/${Galaxy.user.id}/permissions/inputs`, icon: "fa-users", - submit_title: "Save permissions", - redirect: "user" + submit_title: "Save Permissions", + redirect: "user", }, make_data_private: { - title: _l("Make all data private"), + title: _l("Make all Data Private"), + id: "edit-preferences-make-data-private", description: _l("Click here to make all data private."), - icon: "fa-lock" + icon: "fa-lock", }, api_key: { - title: _l("Manage API key"), + title: _l("Manage API Key"), + id: "edit-preferences-api-key", description: _l("Access your current API key or create a new one."), url: `api/users/${Galaxy.user.id}/api_key/inputs`, icon: "fa-key", - submit_title: "Create a new key", - submit_icon: "fa-check" + submit_title: "Create a new Key", + submit_icon: "fa-check", }, cloud_auth: { + id: "edit-preferences-cloud-auth", title: _l("Manage Cloud Authorization"), description: _l("Add or modify the configuration that grants Galaxy to access your cloud-based resources."), icon: "fa-cloud", - submit_title: "Create a new key", - submit_icon: "fa-check" + submit_title: "Create a new Key", + submit_icon: "fa-check", }, toolbox_filters: { - title: _l("Manage Toolbox filters"), + title: _l("Manage Toolbox Filters"), + id: "edit-preferences-toolbox-filters", description: _l("Customize your Toolbox by displaying or omitting sets of Tools."), url: `api/users/${Galaxy.user.id}/toolbox_filters/inputs`, icon: "fa-filter", - submit_title: "Save filters", + submit_title: "Save Filters", redirect: "user", - shouldRender: !!config.has_user_tool_filters + shouldRender: !!config.has_user_tool_filters, }, custom_builds: { - title: _l("Manage custom builds"), + title: _l("Manage Custom Builds"), description: _l("Add or remove custom builds using history datasets."), - icon: "fa-cubes" - }, - genomespace: { - title: _l("Request GenomeSpace token"), - description: _l("Requests token through OpenID."), - icon: "fa-openid" + icon: "fa-cubes", }, logout: { - title: _l("Sign out"), + title: _l("Sign Out"), + id: "edit-preferences-custom-builds", description: _l("Click here to sign out of all sessions."), icon: "fa-sign-out", - shouldRender: !!Galaxy.session_csrf_token - } + shouldRender: !!Galaxy.session_csrf_token, + }, }; }; diff --git a/client/galaxy/scripts/components/UtcDate.vue b/client/galaxy/scripts/components/UtcDate.vue index 80539145ed9..4ebd16b3a6f 100644 --- a/client/galaxy/scripts/components/UtcDate.vue +++ b/client/galaxy/scripts/components/UtcDate.vue @@ -14,20 +14,20 @@ export default { props: { date: { type: String, - required: true + required: true, }, mode: { type: String, - default: "date" // or elapsed - } + default: "date", // or elapsed + }, }, computed: { - elapsedTime: function() { + elapsedTime: function () { return moment(moment.utc(this.date)).from(moment().utc()); }, - fullDate: function() { + fullDate: function () { return moment.utc(this.date).format(); - } - } + }, + }, }; diff --git a/client/galaxy/scripts/components/WaitButton.vue b/client/galaxy/scripts/components/WaitButton.vue new file mode 100644 index 00000000000..27f0942481b --- /dev/null +++ b/client/galaxy/scripts/components/WaitButton.vue @@ -0,0 +1,67 @@ +/** Button variant with waiting and progress tracking. */ + + + diff --git a/client/galaxy/scripts/components/Workflow/Editor/Attributes.test.js b/client/galaxy/scripts/components/Workflow/Editor/Attributes.test.js new file mode 100644 index 00000000000..0f2ec364e83 --- /dev/null +++ b/client/galaxy/scripts/components/Workflow/Editor/Attributes.test.js @@ -0,0 +1,37 @@ +import Vue from "vue"; +import { mount } from "@vue/test-utils"; +import Attributes from "./Attributes"; +import { __RewireAPI__ as rewire } from "./Attributes"; + +describe("Attributes", () => { + beforeEach(() => { + rewire.__Rewire__( + "Services", + class { + async updateWorkflow() { + return {}; + } + } + ); + }); + it("test attributes", async () => { + const wrapper = mount(Attributes, { + propsData: { + id: "workflow_id", + name: "workflow_name", + tags: ["workflow_tag_0", "workflow_tag_1"], + parameters: ["workflow_parameter_0", "workflow_parameter_1"], + versions: ["workflow_version_0"], + }, + }); + const name = wrapper.find("#workflow-name"); + expect(name.element.value).to.equal("workflow_name"); + wrapper.setProps({ name: "new_workflow_name" }); + await Vue.nextTick(); + expect(name.element.value).to.equal("new_workflow_name"); + const parameters = wrapper.findAll(".list-group-item"); + expect(parameters.length).to.equal(2); + expect(parameters.at(0).text()).to.equal("1: workflow_parameter_0"); + expect(parameters.at(1).text()).to.equal("2: workflow_parameter_1"); + }); +}); diff --git a/client/galaxy/scripts/components/Workflow/Editor/Attributes.vue b/client/galaxy/scripts/components/Workflow/Editor/Attributes.vue new file mode 100644 index 00000000000..dfdb0ce4799 --- /dev/null +++ b/client/galaxy/scripts/components/Workflow/Editor/Attributes.vue @@ -0,0 +1,143 @@ + + + diff --git a/client/galaxy/scripts/components/Workflow/Editor/EditorPanel.vue b/client/galaxy/scripts/components/Workflow/Editor/EditorPanel.vue new file mode 100644 index 00000000000..c1a4df0f285 --- /dev/null +++ b/client/galaxy/scripts/components/Workflow/Editor/EditorPanel.vue @@ -0,0 +1,33 @@ + + + diff --git a/client/galaxy/scripts/components/Workflow/Editor/Index.vue b/client/galaxy/scripts/components/Workflow/Editor/Index.vue index dbf04825155..96e6e392e72 100644 --- a/client/galaxy/scripts/components/Workflow/Editor/Index.vue +++ b/client/galaxy/scripts/components/Workflow/Editor/Index.vue @@ -1,82 +1,239 @@ - - - - diff --git a/client/galaxy/scripts/components/Workflow/Editor/Node.test.js b/client/galaxy/scripts/components/Workflow/Editor/Node.test.js new file mode 100644 index 00000000000..0b142a25849 --- /dev/null +++ b/client/galaxy/scripts/components/Workflow/Editor/Node.test.js @@ -0,0 +1,26 @@ +import Vue from "vue"; +import { mount } from "@vue/test-utils"; +import Node from "./Node"; + +describe("Node", () => { + it("test attributes", async () => { + const wrapper = mount(Node, { + propsData: { + id: "node-id", + title: "node-title", + type: "tool", + }, + }); + const icon = wrapper.findAll("i"); + expect(icon.at(2).classes()).to.contain("fa-wrench"); + const toolLinks = wrapper.findAll("i"); + expect(toolLinks.length).to.equal(3); + wrapper.setProps({ type: "subworkflow" }); + await Vue.nextTick(); + expect(icon.at(2).classes()).to.contain("fa-sitemap"); + const subworkflowLinks = wrapper.findAll("i"); + expect(subworkflowLinks.length).to.equal(2); + const workflowTitle = wrapper.find(".node-title"); + expect(workflowTitle.text()).to.equal("node-title"); + }); +}); diff --git a/client/galaxy/scripts/components/Workflow/Editor/Node.vue b/client/galaxy/scripts/components/Workflow/Editor/Node.vue index a4e6c36bfd7..0acf23edeb7 100644 --- a/client/galaxy/scripts/components/Workflow/Editor/Node.vue +++ b/client/galaxy/scripts/components/Workflow/Editor/Node.vue @@ -1,64 +1,109 @@ diff --git a/client/galaxy/scripts/components/Workflow/Editor/Options.vue b/client/galaxy/scripts/components/Workflow/Editor/Options.vue index 44157f9ce2a..8ed339efa5d 100644 --- a/client/galaxy/scripts/components/Workflow/Editor/Options.vue +++ b/client/galaxy/scripts/components/Workflow/Editor/Options.vue @@ -8,7 +8,6 @@ variant="link" aria-label="Save Workflow" v-b-tooltip.hover - v-b-tooltip.bottom @click="$emit('onSave')" > @@ -20,7 +19,6 @@ variant="link" aria-label="Edit Report" v-b-tooltip.hover - v-b-tooltip.bottom @click="$emit('onReport')" > @@ -34,7 +32,6 @@ variant="link" aria-label="Workflow Options" v-b-tooltip.hover - v-b-tooltip.bottom >