Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into cloud_download_tool
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/galaxy/managers/cloud.py
#	lib/galaxy/webapps/galaxy/api/cloud.py
  • Loading branch information
VJalili committed Sep 25, 2018
2 parents 897d024 + 66c6c84 commit 8413f77
Show file tree
Hide file tree
Showing 497 changed files with 11,739 additions and 9,207 deletions.
3 changes: 3 additions & 0 deletions .ci/jenkins/api-py3/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./run_tests.sh --dockerize --python3 --db postgres --clean_pyc --skip_flakey_fails -api "$@"
Empty file modified .ci/jenkins/api/run_tests.sh
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions .ci/jenkins/framework-py3/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./run_tests.sh --dockerize --python3 --db postgres --clean_pyc --framework "$@"
Empty file modified .ci/jenkins/framework/run_tests.sh
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions .ci/jenkins/integration-py3/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./run_tests.sh --dockerize --python3 --db postgres --clean_pyc --integration "$@"
3 changes: 3 additions & 0 deletions .ci/jenkins/main-tools-py3/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./run_tests.sh --dockerize --python3 --db postgres --clean_pyc -main "$@"
3 changes: 3 additions & 0 deletions .ci/jenkins/main-tools/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./run_tests.sh --dockerize --db postgres --external_tmp --clean_pyc -main "$@"
34 changes: 34 additions & 0 deletions .ci/jenkins/selenium-py3/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Enable retries on tests to reduce chances of transient failures.
: ${GALAXY_TEST_SELENIUM_RETRIES:=1}
: ${GALAXY_TEST_CLIENT_BUILD_IMAGE:='node:9.4.0'}

# 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

# Set git environment variables to enable Git. https://github.com/galaxyproject/galaxy/issues/5912
# Setup volume and environment variable to cache this users yarn build.
docker run -e GIT_COMMITTER_NAME=Jenkins -e GIT_COMMITTER_EMAIL=jenkins@galaxyproject.org \
-e YARN_CACHE_FOLDER=$YARN_CACHE_FOLDER -v $YARN_CACHE_FOLDER:$YARN_CACHE_FOLDER:rw \
-v `pwd`:`pwd`:rw -w `pwd` -u $UID $GALAXY_TEST_CLIENT_BUILD_IMAGE \
/bin/bash -c 'make client-production-maps'

# Start Selenium server in the test Docker container.
DOCKER_RUN_EXTRA_ARGS="-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} ${DOCKER_RUN_EXTRA_ARGS}"
export DOCKER_RUN_EXTRA_ARGS

./run_tests.sh --dockerize --python3 --db postgres --clean_pyc --skip_flakey_fails --selenium "$@"
2 changes: 1 addition & 1 deletion .ci/jenkins/selenium/run_tests.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ docker run -e GIT_COMMITTER_NAME=Jenkins -e GIT_COMMITTER_EMAIL=jenkins@galaxypr
/bin/bash -c 'make client-production-maps'

# Start Selenium server in the test Docker container.
DOCKER_RUN_EXTRA_ARGS="-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} ${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} ${DOCKER_RUN_EXTRA_ARGS}"
export DOCKER_RUN_EXTRA_ARGS

./run_tests.sh --dockerize --db postgres --external_tmp --clean_pyc --skip_flakey_fails --selenium "$@"
Empty file modified .ci/jenkins/toolshed/run_tests.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[run]
branch = True
include = lib/galaxy/*
disable_warnings = include-ignored
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,13 @@ tool-data/toolshed.g2.bx.psu.edu/
tool-data/**/*.fa

# Test output
.pytest_cache/
assets/
test-data-cache
run_framework_tests.html
run_functional_tests.html
run_integration_tests.html
run_selenium_tests.html
run_toolshed_tests.html
run_api_tests.html
test/tool_shed/tmp/*
Expand Down
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ env:
- TOX_ENV=qunit
- TOX_ENV=py27-first_startup
- TOX_ENV=py27-lint_docstring_include_list
- TOX_ENV=check_python_dependencies

matrix:
include:
Expand All @@ -33,9 +32,6 @@ matrix:
- ack-grep
- env: TOX_ENV=py34-unit
addons: *py3_addons
allow_failures:
- env: TOX_ENV=check_python_dependencies


install:
- set -e
Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/docs/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ Disabled

```
<div>
<span class="badge badge-default">Default</span>
<span class="badge badge-primary">Primary</span>
<span class="badge badge-secondary">Secondary</span>
<span class="badge badge-success">Success</span>
<span class="badge badge-warning">Warning</span>
<span class="badge badge-danger">Danger</span>
Expand Down
78 changes: 22 additions & 56 deletions client/galaxy/scripts/admin.toolshed.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import * as Backbone from "backbone";
import mod_shed_list_view from "mvc/toolshed/shed-list-view";
import mod_categories_view from "mvc/toolshed/categories-view";
import mod_repositories_view from "mvc/toolshed/repositories-view";
import mod_repository_view from "mvc/toolshed/repository-view";
import mod_repoqueue_view from "mvc/toolshed/repository-queue-view";
import mod_repo_status_view from "mvc/toolshed/repo-status-view";
import mod_workflows_view from "mvc/toolshed/workflows-view";

/* global Galaxy */

var AdminToolshedRouter = Backbone.Router.extend({
initialize: function() {
this.routesHit = 0;
Expand Down Expand Up @@ -48,81 +52,43 @@ var AdminToolshedRouter = Backbone.Router.extend({

var GalaxyAdminToolshedApp = Backbone.View.extend({
app_config: {
known_views: ["toolsheds", "queue", "status", "categories", "repositories", "repoository"]
known_views: ["toolsheds", "queue", "status", "categories", "repositories", "repository"]
},

initialize: function() {
Galaxy.admintoolshedapp = this;
this.admin_toolshed_router = new AdminToolshedRouter();

this.admin_toolshed_router.on("route:queue", () => {
if (Galaxy.admintoolshedapp.adminRepoQueueView) {
Galaxy.admintoolshedapp.adminRepoQueueView.reDraw();
} else {
Galaxy.admintoolshedapp.adminRepoQueueView = new mod_repoqueue_view.RepoQueueView();
}
Galaxy.admintoolshedapp.adminRepoQueueView = new mod_repoqueue_view.RepoQueueView();
});
this.admin_toolshed_router.on("route:toolsheds", () => {
if (Galaxy.admintoolshedapp.adminShedListView) {
Galaxy.admintoolshedapp.adminShedListView.reDraw();
} else {
Galaxy.admintoolshedapp.adminShedListView = new mod_shed_list_view.ShedListView();
}
Galaxy.admintoolshedapp.adminShedListView = new mod_shed_list_view.ShedListView();
});
this.admin_toolshed_router.on("route:categories", tool_shed => {
if (Galaxy.admintoolshedapp.adminShedCategoriesView) {
Galaxy.admintoolshedapp.adminShedCategoriesView.reDraw({
tool_shed: tool_shed.replace(/\//g, "%2f")
});
} else {
Galaxy.admintoolshedapp.adminShedCategoriesView = new mod_categories_view.CategoryView({
tool_shed: tool_shed.replace(/\//g, "%2f")
});
}
Galaxy.admintoolshedapp.adminShedCategoriesView = new mod_categories_view.CategoryView({
tool_shed: tool_shed.replace(/\//g, "%2f")
});
});
this.admin_toolshed_router.on("route:repositories", (tool_shed, category_id) => {
if (Galaxy.admintoolshedapp.adminShedCategoryView) {
Galaxy.admintoolshedapp.adminShedCategoryView.reDraw({
tool_shed: tool_shed.replace(/\//g, "%2f"),
category_id: category_id
});
} else {
Galaxy.admintoolshedapp.adminShedCategoryView = new mod_repositories_view.Category({
tool_shed: tool_shed.replace(/\//g, "%2f"),
category_id: category_id
});
}
Galaxy.admintoolshedapp.adminShedCategoryView = new mod_repositories_view.Category({
tool_shed: tool_shed.replace(/\//g, "%2f"),
category_id: category_id
});
});
this.admin_toolshed_router.on("route:repository", (tool_shed, repository_id) => {
if (Galaxy.admintoolshedapp.adminRepositoryView) {
Galaxy.admintoolshedapp.adminRepositoryView.reDraw({
tool_shed: tool_shed.replace(/\//g, "%2f"),
repository_id: repository_id
});
} else {
Galaxy.admintoolshedapp.adminRepositoryView = new mod_repository_view.RepoDetails({
tool_shed: tool_shed.replace(/\//g, "%2f"),
repository_id: repository_id
});
}
Galaxy.admintoolshedapp.adminRepositoryView = new mod_repository_view.RepoDetails({
tool_shed: tool_shed.replace(/\//g, "%2f"),
repository_id: repository_id
});
});
this.admin_toolshed_router.on("route:status", repositories => {
if (Galaxy.admintoolshedapp.adminRepoStatusView) {
Galaxy.admintoolshedapp.adminRepoStatusView.reDraw({
repositories: repositories.split("|")
});
} else {
Galaxy.admintoolshedapp.adminRepoStatusView = new mod_repo_status_view.RepoStatus({
repositories: repositories.split("|")
});
}
Galaxy.admintoolshedapp.adminRepoStatusView = new mod_repo_status_view.RepoStatus({
repositories: repositories.split("|")
});
});
this.admin_toolshed_router.on("route:workflows", () => {
if (Galaxy.admintoolshedapp.adminWorkflowsView) {
Galaxy.admintoolshedapp.adminWorkflowsView.reDraw();
} else {
Galaxy.admintoolshedapp.adminWorkflowsView = new mod_workflows_view.Workflows();
}
Galaxy.admintoolshedapp.adminWorkflowsView = new mod_workflows_view.Workflows();
});

Backbone.history.start({ pushState: false });
Expand Down
18 changes: 17 additions & 1 deletion client/galaxy/scripts/apps/admin.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import * as Backbone from "backbone";
import * as _ from "underscore";
import _l from "utils/localization";
import jQuery from "jquery";
var $ = jQuery;
Expand All @@ -13,13 +15,16 @@ import DataTables from "components/admin/DataTables.vue";
import DataTypes from "components/admin/DataTypes.vue";
import Vue from "vue";

/* global Galaxy */

window.app = function app(options, bootstrapped) {
window.Galaxy = new GalaxyApp.GalaxyApp(options, bootstrapped);
Galaxy.debug("admin app");

/** Routes */
var AdminRouter = Router.extend({
routes: {
"(/)admin(/)": "home",
"(/)admin(/)users": "show_users",
"(/)admin(/)roles": "show_roles",
"(/)admin(/)groups": "show_groups",
Expand All @@ -29,13 +34,24 @@ window.app = function app(options, bootstrapped) {
"(/)admin(/)forms": "show_forms",
"(/)admin(/)form(/)(:form_id)": "show_form",
"(/)admin/data_tables": "show_data_tables",
"(/)admin/data_types": "show_data_types"
"(/)admin/data_types": "show_data_types",
"*notFound": "not_found"
},

authenticate: function() {
return Galaxy.user && Galaxy.user.id && Galaxy.user.get("is_admin");
},

not_found: function() {
window.location.href = window.location.href;
},

home: function() {
this.page
.$("#galaxy_main")
.prop("src", `${Galaxy.root}admin/center?message=${options.message}&status=${options.status}`);
},

show_users: function() {
this.page.display(
new GridView({
Expand Down
8 changes: 7 additions & 1 deletion client/galaxy/scripts/apps/analysis.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import $ from "jquery";
import "bootstrap";
import * as _ from "underscore";
import decodeUriComponent from "decode-uri-component";
import GalaxyApp from "galaxy";
import Router from "layout/router";
import ToolPanel from "./panels/tool-panel";
Expand Down Expand Up @@ -357,7 +358,12 @@ window.app = function app(options, bootstrapped) {
/** load the center panel with a tool form described by the given params obj */
_loadToolForm: function(params) {
//TODO: load tool form code async
params.id = decodeURIComponent(params.tool_id);
if (params.tool_id) {
params.id = decodeUriComponent(params.tool_id);
}
if (params.version) {
params.version = decodeUriComponent(params.version);
}
this.page.display(new ToolForm.View(params));
},

Expand Down
33 changes: 13 additions & 20 deletions client/galaxy/scripts/apps/panels/admin-panel.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import * as Backbone from "backbone";
import * as _ from "underscore";

import _l from "utils/localization";

/* global Galaxy */
/* global $ */

var AdminPanel = Backbone.View.extend({
initialize: function(page, options) {
var self = this;
this.page = page;
this.root = options.root;
this.config = options.config;
this.settings = options.settings;
this.message = options.message;
this.status = options.status;
this.model = new Backbone.Model({
title: `Galaxy version ${Galaxy.config.version_major}`
});
Expand Down Expand Up @@ -77,12 +81,6 @@ var AdminPanel = Backbone.View.extend({
title: _l("Forms"),
url: "admin/forms",
target: "__use_router__"
},
{
title: _l("API keys"),
url: "admin/api_keys",
target: "__use_router__",
id: "admin-link-api-keys"
}
]
},
Expand Down Expand Up @@ -147,7 +145,7 @@ var AdminPanel = Backbone.View.extend({
this.$el.empty();
this.categories.each(category => {
var $section = $(self._templateSection(category.attributes));
var $entries = $section.find(".ui-side-section-body");
var $entries = $section.find(".toolSectionBody");
_.each(category.get("items"), item => {
if (item.enabled === undefined || item.enabled) {
var $link = $("<a/>")
Expand All @@ -166,29 +164,24 @@ var AdminPanel = Backbone.View.extend({
}
$entries.append(
$("<div/>")
.addClass("ui-side-section-body-title")
.addClass("toolTitle")
.append($link)
);
}
});
self.$el.append($section);
});
this.page
.$("#galaxy_main")
.prop("src", `${this.root}admin/center?message=${this.message}&status=${this.status}`);
},

_templateSection: function(options) {
return [
"<div>",
`<div class="ui-side-section-title">${_l(options.title)}</div>`,
'<div class="ui-side-section-body"/>',
"</div>"
].join("");
return `<div class="toolSectionWrapper">
<div class="toolSectionTitle">${_l(options.title)}</div>
<div class="toolSectionBody"/>
</div>`;
},

_template: function() {
return '<div class="ui-side-panel"/>';
return '<div class="toolMenuContainer"/>';
},

toString: function() {
Expand Down
4 changes: 2 additions & 2 deletions client/galaxy/scripts/components/Citations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<b-card>
<h4 slot="header" class="mb-0">
Citations
<b-button v-if="viewRender" @click="toggleViewRender" title="Show all in BibTeX format.">
<b-button v-if="viewRender" @click="toggleViewRender" title="Show all in BibTeX format." class="citations-to-bibtex">
<i class="fa fa-pencil-square-o"></i>
Show BibTeX
</b-button>
Expand All @@ -20,7 +20,7 @@
</p>
</span>
<pre v-else>
<code>
<code class="citations-bibtex">
{{ content }}
</code>
</pre>
Expand Down

0 comments on commit 8413f77

Please sign in to comment.