Merge branch 'dev' into registration_mako

This commit is contained in:
guerler
2019-01-29 13:27:43 -05:00
44 changed files with 216 additions and 243 deletions
+1 -9
View File
@@ -2,7 +2,6 @@
# 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" ];
@@ -20,15 +19,8 @@ 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="--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}"
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 "$@"
+1 -9
View File
@@ -2,7 +2,6 @@
# 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" ];
@@ -20,15 +19,8 @@ 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="--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}"
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 --db postgres --clean_pyc --skip_flakey_fails --selenium "$@"
+1 -2
View File
@@ -117,6 +117,7 @@ test/unit/**.log
# Project files
*.kpf
.idea
.vscode
client/**/jsconfig.json
@@ -152,5 +153,3 @@ client/webpack-stats.json
.DS_Store
*.rej
*~
.idea
.vscode
@@ -448,7 +448,7 @@
<hot-table
id="hot-table"
ref="hotTable"
:data="hotData['data']"
:data="hotData.data"
:colHeaders="colHeadersDisplay"
:readOnly="true"
stretchH="all"
@@ -1029,7 +1029,6 @@ export default {
}
return {
rules: rules,
colHeadersPerRule: [],
mapping: mapping,
state: "build", // 'build', 'error', 'wait',
ruleView: "normal", // 'normal' or 'source'
@@ -1257,8 +1256,7 @@ export default {
return targets;
},
colHeaders() {
const data = this.hotData["data"];
const columns = this.hotData["columns"];
let { data, columns } = this.hotData;
return RuleDefs.colHeadersFor(data, columns);
},
colHeadersDisplay() {
@@ -1374,6 +1372,44 @@ export default {
valid = false;
}
return valid;
},
hotData() {
let data, sources, columns;
if (
this.elementsType == "datasets" ||
this.elementsType == "library_datasets" ||
this.elementsType == "ftp"
) {
sources = this.initialElements.slice();
data = sources.map(el => []);
columns = [];
} else if (this.elementsType == "collection_contents") {
const collection = this.initialElements;
if (collection) {
const obj = this.populateElementsFromCollectionDescription(
collection.elements,
collection.collection_type
);
data = obj.data;
sources = obj.sources;
columns = [];
} else {
data = [];
sources = [];
columns = [];
}
} else {
data = this.initialElements.slice();
sources = data.map(el => null);
columns = [];
if (this.initialElements) {
this.initialElements[0].forEach(() => columns.push("new"));
}
}
return RuleDefs.applyRules(data, sources, columns, this.rules);
},
colHeadersPerRule() {
return this.hotData.colHeadersPerRule;
}
},
methods: {
@@ -1412,42 +1448,6 @@ export default {
this.rules.push(rule);
}
},
hotData() {
let data, sources, columns;
if (
this.elementsType == "datasets" ||
this.elementsType == "library_datasets" ||
this.elementsType == "ftp"
) {
data = this.initialElements.map(el => []);
sources = this.initialElements.slice();
columns = [];
} else if (this.elementsType == "collection_contents") {
const collection = this.initialElements;
if (collection) {
const obj = this.populateElementsFromCollectionDescription(
collection.elements,
collection.collection_type
);
data = obj.data;
sources = obj.sources;
columns = [];
} else {
data = [];
sources = [];
columns = [];
}
} else {
data = this.initialElements.slice();
sources = data.map(el => null);
columns = [];
if (this.initialElements) {
this.initialElements[0].forEach(() => columns.push("new"));
}
}
this.colHeadersPerRule = [];
return RuleDefs.applyRules(data, sources, columns, this.rules, this.colHeadersPerRule);
},
viewSource() {
this.resetSource();
this.ruleView = "source";
@@ -1684,7 +1684,7 @@ export default {
return identifierColumns;
},
buildRequestElements(createDatasetDescription, createSubcollectionDescription, subElementProp) {
const data = this.hotData["data"];
const data = this.hotData.data;
const identifierColumns = this.identifierColumns();
if (identifierColumns.length < 1) {
console.log("Error but this shouldn't have happened, create button should have been disabled.");
@@ -1791,8 +1791,7 @@ export default {
return elementsByName;
},
creationElementsFromDatasets() {
const sources = this.hotData["sources"];
const data = this.hotData["data"];
const { sources, data } = this.hotData;
const mappingAsDict = this.mappingAsDict;
const elementsByCollectionName = this.buildRequestElements(
@@ -1811,7 +1810,7 @@ export default {
},
creationElementsForFetch() {
// fetch elements for HDCA
const data = this.hotData["data"];
const data = this.hotData.data;
const mappingAsDict = this.mappingAsDict;
const elementsByCollectionName = this.buildRequestElements(
@@ -1830,7 +1829,7 @@ export default {
},
creationDatasetsForFetch() {
// fetch elements for HDAs if not collection information specified.
const data = this.hotData["data"];
const data = this.hotData.data;
const mappingAsDict = this.mappingAsDict;
const datasets = [];
+14 -3
View File
@@ -9,6 +9,18 @@ import { CommunicationServerView } from "layout/communication-server-view";
import Webhooks from "mvc/webhooks";
import Utils from "utils/utils";
function logoutClick() {
let galaxy = getGalaxyInstance();
let token = galaxy.session_csrf_token || "";
if (galaxy.user) {
galaxy.user.clearSessionStorage();
}
let url = `${galaxy.root}user/logout?session_csrf_token=${token}`;
window.top.location.href = url;
}
var Collection = Backbone.Collection.extend({
model: Backbone.Model.extend({
defaults: {
@@ -277,9 +289,8 @@ var Collection = Backbone.Collection.extend({
},
{
title: _l("Logout"),
url: `user/logout?session_csrf_token=${Galaxy.session_csrf_token}`,
target: "_top",
divider: true
divider: true,
onclick: logoutClick
},
{
title: _l("Saved Datasets"),
@@ -48,7 +48,7 @@ var View = Backbone.View.extend({
var err_msg = response.responseJSON && response.responseJSON.err_msg;
self.message.update({
status: "danger",
message: err_msg || "Error occured while loading the dataset."
message: err_msg || "Error occurred while loading the dataset."
});
}
});
@@ -73,7 +73,7 @@ var View = Backbone.View.extend({
var err_msg = response.responseJSON && response.responseJSON.err_msg;
self.message.update({
status: "danger",
message: err_msg || "Error occured while editing the dataset attributes."
message: err_msg || "Error occurred while editing the dataset attributes."
});
}
});
@@ -36,7 +36,7 @@ var View = Backbone.View.extend({
error: response => {
var error_response = {
status: "error",
message: "Error occured while loading the job.",
message: "Error occurred while loading the job.",
persistent: true,
cls: "errormessage"
};
@@ -47,7 +47,7 @@ var View = Backbone.View.extend({
error: response => {
var error_response = {
status: "error",
message: "Error occured while loading the dataset.",
message: "Error occurred while loading the dataset.",
persistent: true,
cls: "errormessage"
};
@@ -61,7 +61,7 @@ var View = Backbone.View.extend({
this.$el.empty().append(`
${this._templateHeader()}
<h2>Dataset Error</h2>
<p>An error occured while running the tool <b>${job.tool_id}</b>.</p>
<p>An error occurred while running the tool <b>${job.tool_id}</b>.</p>
<p>Tool execution generated the following messages:</p>
<pre class="code">${_.escape(job.stderr)}</pre>
@@ -194,7 +194,7 @@ var View = Backbone.View.extend({
error: response => {
var error_response = {
status: "error",
message: "Error occured while saving. Please fill all the required fields and try again.",
message: "Error occurred while saving. Please fill all the required fields and try again.",
persistent: true,
cls: "errormessage"
};
@@ -276,7 +276,7 @@ var LibraryDatasetView = Backbone.View.extend({
if (typeof response.responseJSON !== "undefined") {
mod_toastr.error(`Dataset not imported. ${response.responseJSON.err_msg}`);
} else {
mod_toastr.error("An error occured. Dataset not imported. Please try again.");
mod_toastr.error("An error occurred. Dataset not imported. Please try again.");
}
}
}
@@ -446,7 +446,7 @@ var LibraryDatasetView = Backbone.View.extend({
if (typeof response.responseJSON !== "undefined") {
mod_toastr.error(response.responseJSON.err_msg);
} else {
mod_toastr.error("An error occured while attempting to update the library dataset.");
mod_toastr.error("An error occurred while attempting to update the library dataset.");
}
}
});
@@ -136,7 +136,7 @@ var FolderRowView = Backbone.View.extend({
if (typeof response.responseJSON !== "undefined") {
mod_toastr.error(`Dataset was not undeleted. ${response.responseJSON.err_msg}`);
} else {
mod_toastr.error("An error occured! Dataset was not undeleted. Please try again.");
mod_toastr.error("An error occurred! Dataset was not undeleted. Please try again.");
}
}
});
@@ -163,7 +163,7 @@ var FolderRowView = Backbone.View.extend({
if (typeof response.responseJSON !== "undefined") {
mod_toastr.error(`Folder was not undeleted. ${response.responseJSON.err_msg}`);
} else {
mod_toastr.error("An error occured! Folder was not undeleted. Please try again.");
mod_toastr.error("An error occurred! Folder was not undeleted. Please try again.");
}
}
});
@@ -213,7 +213,7 @@ var FolderRowView = Backbone.View.extend({
if (typeof response.responseJSON !== "undefined") {
mod_toastr.error(response.responseJSON.err_msg);
} else {
mod_toastr.error("An error occured while attempting to update the folder.");
mod_toastr.error("An error occurred while attempting to update the folder.");
}
}
});
@@ -885,7 +885,7 @@ var FolderToolbarView = Backbone.View.extend({
mod_toastr.success("Selected files imported into the current folder");
Galaxy.modal.hide();
} else {
mod_toastr.error("An error occured.");
mod_toastr.error("An error occurred.");
}
return true;
}
@@ -934,7 +934,7 @@ var FolderToolbarView = Backbone.View.extend({
Galaxy.modal.hide();
} else {
// TODO better error report
mod_toastr.error("An error occured.");
mod_toastr.error("An error occurred.");
}
return true;
}
@@ -162,7 +162,7 @@ var LibraryRowView = Backbone.View.extend({
if (typeof response.responseJSON !== "undefined") {
mod_toastr.error(response.responseJSON.err_msg);
} else {
mod_toastr.error("An error occured while attempting to update the library.");
mod_toastr.error("An error occurred while attempting to update the library.");
}
}
});
@@ -197,7 +197,7 @@ var LibraryRowView = Backbone.View.extend({
if (typeof response.responseJSON !== "undefined") {
mod_toastr.error(response.responseJSON.err_msg);
} else {
mod_toastr.error("An error occured during deleting the library.");
mod_toastr.error("An error occurred during deleting the library.");
}
}
});
@@ -224,7 +224,7 @@ var LibraryRowView = Backbone.View.extend({
if (typeof response.responseJSON !== "undefined") {
mod_toastr.error(response.responseJSON.err_msg);
} else {
mod_toastr.error("An error occured while undeleting the library.");
mod_toastr.error("An error occurred while undeleting the library.");
}
}
});
@@ -112,7 +112,7 @@ var LibraryToolbarView = Backbone.View.extend({
if (typeof response.responseJSON !== "undefined") {
mod_toastr.error(response.responseJSON.err_msg);
} else {
mod_toastr.error("An error occured.");
mod_toastr.error("An error occurred.");
}
}
});
@@ -861,8 +861,8 @@ const colHeadersFor = function(data, columns) {
}
};
const applyRules = function(data, sources, columns, rules, colHeadersPerRule) {
colHeadersPerRule = colHeadersPerRule || [];
const applyRules = function(data, sources, columns, rules, headersPerRule = []) {
let colHeadersPerRule = Array.from(headersPerRule);
let hasRuleError = false;
for (var ruleIndex in rules) {
const ruleHeaders = colHeadersFor(data, columns);
@@ -889,7 +889,7 @@ const applyRules = function(data, sources, columns, rules, colHeadersPerRule) {
columns = res.columns || columns;
}
}
return { data, sources, columns };
return { data, sources, columns, colHeadersPerRule };
};
export default {
@@ -98,7 +98,7 @@ const GroupDetailView = Backbone.View.extend({
'<% _.each(group.get("repositories"), function(repo) { %>',
"<tr>",
"<td>",
'<a data-toggle="tooltip" data-placement="top" title="Details of <%= _.escape(repo.name) %>" href="/view/<%= _.escape(repo.owner) %>/<%= _escape(repo.name) %>" id="<%= repo.id %>"><%= _.escape(repo.name) %></a>',
'<a data-toggle="tooltip" data-placement="top" title="Details of <%= _.escape(repo.name) %>" href="/view/<%= _.escape(repo.owner) %>/<%= _.escape(repo.name) %>" id="<%= repo.id %>"><%= _.escape(repo.name) %></a>',
"</td>",
"<td>",
"<%= _.escape(repo.description) %>",
+6 -20
View File
@@ -181,12 +181,11 @@ galaxy:
# Enable / disable checking if any tools defined in the above non-shed
# tool_config_files (i.e., tool_conf.xml) have been migrated from the
# Galaxy code distribution to the Tool Shed. This setting should
# generally be set to False only for development Galaxy environments
# that are often rebuilt from scratch where migrated tools do not need
# to be available in the Galaxy tool panel. If the following setting
# remains commented, the default setting will be True.
#check_migrate_tools: true
# Galaxy code distribution to the Tool Shed. This functionality is
# largely untested in modern Galaxy releases and has serious issues
# such as #7273 and the possibility of slowing down Galaxy startup, so
# the default and recommended value is False.
#check_migrate_tools: false
# Tool config maintained by tool migration scripts. If you use the
# migration scripts to install tools that have been migrated to the
@@ -599,8 +598,7 @@ galaxy:
# Activation grace period (in hours). Activation is not forced (login
# is not disabled) until grace period has passed. Users under grace
# period can't run jobs. Enter 0 to disable grace period. Users with
# OpenID logins have grace period forever.
# period can't run jobs. Enter 0 to disable grace period.
#activation_grace_period: 3
# Shown in warning box to users that were not activated yet. In use
@@ -1428,18 +1426,6 @@ galaxy:
# particular history
#history_local_serial_workflow_scheduling: false
# Enable authentication via OpenID. Allows users to log in to their
# Galaxy account by authenticating with an OpenID provider.
#enable_openid: false
# If OpenID is enabled, this configuration file specifies providers to
# use. Falls back to the .sample variant in config if default does not
# exist.
#openid_config_file: config/openid_conf.xml
# If OpenID is enabled, consumer cache directory to use.
#openid_consumer_cache_path: database/openid_consumer_cache
# Enables and disables OpenID Connect (OIDC) support.
#enable_oidc: false
-4
View File
@@ -351,10 +351,6 @@ tool_shed:
# will not clobber each other.
#cookie_path: null
# Enable authentication via OpenID. Allows users to log in to their
# Galaxy account by authenticating with an OpenID provider.
#enable_openid: false
# Turn on logging of user actions to the database. Actions currently
# logged are grid views, tool searches, and use of "recently" used
# tools menu. The log_events and log_actions functionality will
-11
View File
@@ -5,7 +5,6 @@ Galaxy supports the following authentication mechanisms:
* [Galaxy Database](#galaxy-database) - Galaxy-specific login using e-mail address and password (the default);
* [OIDC and OAuth2.0](#OIDC-and-OAuth2.0) - Login to Galaxy using your Google account, without having to create a Galaxy user;
* [Authentication Framework](#authentication-framework) - A plugin-driven framework supporting LDAP/Active Directory and PAM;
* [OpenID](#openid) - authentication with Galaxy as a relying party;
* [Proxy Authentication](#proxy_authentication) - HTTP [remote user](http://httpd.apache.org/docs/current/mod/mod_cgi.html#env) provided by any front-end Web server.
## Galaxy Database
@@ -38,16 +37,6 @@ To configure one or more authentication plugins, simply copy ``config/auth_conf.
The provided sample configuration file has numerous commented out examples and serves as the most up-to-date source
of documentation on configuring these plugins.
## OpenID
[OpenID](https://en.wikipedia.org/wiki/OpenID) is becoming less popular and probably shouldn't be used the primary mechanism
for authentication in Galaxy but it is an available option.
Enabling OpenID requires you to edit Galaxy's configuration file and set `enable_openid` to `true`. This file is
likely located in `config/galaxy.yml` and can be created by copying Galaxy's sample `config/galaxy.yml.sample`.
Enabling this option enables OpenID and causes the OpenID form to be displayed on the login screen.
## Remote User Authentication
If Galaxy is deployed with either nginx or Apache serving as a front-end proxy for Galaxy requests, they can be configured
-2
View File
@@ -75,8 +75,6 @@ Additional configuration files and their purposes are:
used by users to control runtime parameters such as memory allocations, cluster selection, and so forth.
- ``object_store_conf.xml``: Configures more advanced storage paradigms for Galaxy datasets, including layout across
multiple filesystems, or in object storage systems such as Swift or Amazon S3.
- ``openid_conf.xml``: Controls which OpenID (if enabled) providers should be presented as options to the user on the
login form.
- ``swarm_manager_conf.yml``: Configures the experimental Docker Swarm manager.
- ``tool_destinations.yml``: Configures dynamic tool destinations, which allow for mapping tools to job destinations
based on certain runtime job properties, such as the user submitting it, input sizes, and so forth.
+7 -41
View File
@@ -208,13 +208,12 @@
:Description:
Enable / disable checking if any tools defined in the above non-
shed tool_config_files (i.e., tool_conf.xml) have been migrated
from the Galaxy code distribution to the Tool Shed. This setting
should generally be set to False only for development Galaxy
environments that are often rebuilt from scratch where migrated
tools do not need to be available in the Galaxy tool panel. If
the following setting remains commented, the default setting will
be True.
:Default: ``true``
from the Galaxy code distribution to the Tool Shed. This
functionality is largely untested in modern Galaxy releases and
has serious issues such as #7273 and the possibility of slowing
down Galaxy startup, so the default and recommended value is
False.
:Default: ``false``
:Type: bool
@@ -1107,7 +1106,7 @@
Activation grace period (in hours). Activation is not forced
(login is not disabled) until grace period has passed. Users
under grace period can't run jobs. Enter 0 to disable grace
period. Users with OpenID logins have grace period forever.
period.
:Default: ``3``
:Type: int
@@ -2952,39 +2951,6 @@
:Type: bool
~~~~~~~~~~~~~~~~~
``enable_openid``
~~~~~~~~~~~~~~~~~
:Description:
Enable authentication via OpenID. Allows users to log in to their
Galaxy account by authenticating with an OpenID provider.
:Default: ``false``
:Type: bool
~~~~~~~~~~~~~~~~~~~~~~
``openid_config_file``
~~~~~~~~~~~~~~~~~~~~~~
:Description:
If OpenID is enabled, this configuration file specifies providers
to use. Falls back to the .sample variant in config if default
does not exist.
:Default: ``config/openid_conf.xml``
:Type: str
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``openid_consumer_cache_path``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Description:
If OpenID is enabled, consumer cache directory to use.
:Default: ``database/openid_consumer_cache``
:Type: str
~~~~~~~~~~~~~~~
``enable_oidc``
~~~~~~~~~~~~~~~
-20
View File
@@ -1,20 +0,0 @@
galaxy\.openid package
======================
.. automodule:: galaxy.openid
:members:
:undoc-members:
:show-inheritance:
Submodules
----------
galaxy\.openid\.providers module
--------------------------------
.. automodule:: galaxy.openid.providers
:members:
:undoc-members:
:show-inheritance:
-1
View File
@@ -25,7 +25,6 @@ Subpackages
galaxy.managers
galaxy.model
galaxy.objectstore
galaxy.openid
galaxy.quota
galaxy.security
galaxy.tools
-8
View File
@@ -33,14 +33,6 @@ galaxy\.web\.framework\.decorators module
:undoc-members:
:show-inheritance:
galaxy\.web\.framework\.openid\_manager module
----------------------------------------------
.. automodule:: galaxy.web.framework.openid_manager
:members:
:undoc-members:
:show-inheritance:
galaxy\.web\.framework\.webapp module
-------------------------------------
+1 -1
View File
@@ -238,7 +238,7 @@ class Configuration(object):
# Check for tools defined in the above non-shed tool configs (i.e., tool_conf.xml) tht have
# been migrated from the Galaxy code distribution to the Tool Shed.
self.check_migrate_tools = string_as_bool(kwargs.get('check_migrate_tools', True))
self.check_migrate_tools = string_as_bool(kwargs.get('check_migrate_tools', False))
self.shed_tool_data_path = kwargs.get("shed_tool_data_path", None)
self.x_frame_options = kwargs.get("x_frame_options", "SAMEORIGIN")
if self.shed_tool_data_path:
+1 -1
View File
@@ -271,7 +271,7 @@ class _Isa(data.Data):
if investigation is None:
html = """<html><header><title>Error while reading ISA archive.</title></header>
<body>
<h1>An error occured while reading content of ISA archive.</h1>
<h1>An error occurred while reading content of ISA archive.</h1>
<p>If you have tried to load your archive with the uploader by selecting isa-tab as composite data type, then try to load it again with isa-json instead. Conversely, if you have tried to load your archive with the uploader by selecting isa-json as composite data type, then try isa-tab instead.</p>
<p>You may also try to look into your zip file in order to find out if this is a proper ISA archive. If you see a file i_Investigation.txt inside, then it is an ISA-Tab archive. If you see a file with extension .json inside, then it is an ISA-JSON archive. If you see nothing like that, then either your ISA archive is corrupted, or it is not an ISA archive.</p>
</body></html>"""
-3
View File
@@ -130,9 +130,6 @@ class ConditionalDependencies(object):
def check_azure_storage(self):
return 'azure_blob' in self.object_stores
def check_cloudbridge(self):
return 'cloud' in self.object_stores
def check_kamaki(self):
return 'pithos' in self.object_stores
@@ -1,7 +1,6 @@
# These dependencies are only required when certain config options are set
psycopg2-binary==2.7.4
weberror==0.10.3
python-openid
mysql-python
fluent-logger
raven
@@ -13,7 +12,6 @@ azure-storage==0.32.0
# PyRods not in PyPI
python-ldap==2.4.44
python-pam
cloudbridge==1.0.1
galaxycloudrunner
# Chronos client
@@ -140,7 +140,7 @@ s3transfer==0.1.13
simplejson==3.16.0
six==1.11.0
social-auth-core[openidconnect]==1.5.0
sqlalchemy-migrate==0.11.0
sqlalchemy-migrate==0.12.0
sqlalchemy-utils==0.33.10
sqlalchemy==1.2.16
sqlparse==0.2.4
+2 -2
View File
@@ -254,11 +254,11 @@ class DRMAAJobRunner(AsynchronousJobRunner):
"""
look at a single watched job, determine its state, and deal with errors
that could happen in this process. to be called from check_watched_items()
returns the state or None if exceptions occured
returns the state or None if exceptions occurred
in the latter case the job is appended to new_watched if a
1 drmaa.InternalException,
2 drmaa.InvalidJobExceptionnot, or
3 drmaa.DrmCommunicationException occured
3 drmaa.DrmCommunicationException occurred
(which causes the job to be tested again in the next iteration of check_watched_items)
- the job is finished as errored if any other exception occurs
- the job is finished OK or errored after the maximum number of retries
+2 -2
View File
@@ -355,7 +355,7 @@ class DatasetAssociationManager(base.ModelManager,
if action == 'remove_restrictions':
trans.app.security_agent.make_dataset_public(dataset)
if not trans.app.security_agent.dataset_is_public(dataset):
raise exceptions.InternalServerError('An error occured while making dataset public.')
raise exceptions.InternalServerError('An error occurred while making dataset public.')
elif action == 'make_private':
if not trans.app.security_agent.dataset_is_private_to_user(trans, dataset):
private_role = trans.app.security_agent.get_private_user_role(trans.user)
@@ -364,7 +364,7 @@ class DatasetAssociationManager(base.ModelManager,
trans.sa_session.flush()
if not trans.app.security_agent.dataset_is_private_to_user(trans, dataset):
# Check again and inform the user if dataset is not private.
raise exceptions.InternalServerError('An error occured and the dataset is NOT private.')
raise exceptions.InternalServerError('An error occurred and the dataset is NOT private.')
elif action == 'set_permissions':
def to_role_id(encoded_role_id):
+1 -1
View File
@@ -153,7 +153,7 @@ class JobSearch(object):
# We need to make sure that the job we are looking for has been run with identical inputs.
# Here we deal with 3 requirements:
# - the jobs' input dataset (=b) version is 0, meaning the job's input dataset is not yet ready
# - b's update_time is older than the job create time, meaning no changes occured
# - b's update_time is older than the job create time, meaning no changes occurred
# - the job has a dataset_version recorded, and that versions' metadata matches c's metadata.
or_(
and_(or_(a.dataset_version.in_([0, b.version]),
+1 -1
View File
@@ -4049,7 +4049,7 @@ class Workflow(Dictifiable, RepresentById):
top_level_workflow = self
if self.stored_workflow is None:
# TODO: enforce this at creation...
assert len(self.parent_workflow_steps) == 1
assert len(set(w.uuid for w in self.parent_workflow_steps)) == 1
return self.parent_workflow_steps[0].workflow.top_level_workflow
return top_level_workflow
+13 -1
View File
@@ -222,6 +222,11 @@ def parse_xml(fname):
tree = ElementTree.ElementTree()
try:
root = tree.parse(fname, parser=ElementTree.XMLParser(target=DoctypeSafeCallbackTarget()))
for elem in root.iter('*'):
if elem.text is not None:
elem.text = elem.text.strip()
if elem.tail is not None:
elem.tail = elem.tail.strip()
except ParseError:
log.exception("Error parsing file %s", fname)
raise
@@ -231,11 +236,18 @@ def parse_xml(fname):
def parse_xml_string(xml_string):
tree = ElementTree.fromstring(xml_string)
for elem in tree.iter('*'):
if elem.text is not None:
elem.text = elem.text.strip()
if elem.tail is not None:
elem.tail = elem.tail.strip()
return tree
def xml_to_string(elem, pretty=False):
"""Returns a string from an xml tree"""
"""
Returns a string from an xml tree.
"""
try:
if elem is not None:
if PY2:
+1 -1
View File
@@ -46,7 +46,7 @@ class FileLock(object):
if e.errno != errno.EEXIST:
raise
if (time.time() - start_time) >= self.timeout:
raise FileLockException("Timeout occured.")
raise FileLockException("Timeout occurred.")
time.sleep(self.delay)
self.is_locked = True
@@ -53,7 +53,7 @@ class AuthenticationController(BaseAPIController):
raise exceptions.ObjectNotFound('The user does not exist.')
elif len(user) > 1:
# DB is inconsistent and we have more users with the same email.
raise exceptions.InconsistentDatabase('An error occured, please contact your administrator.')
raise exceptions.InconsistentDatabase('An error occurred, please contact your administrator.')
else:
user = user[0]
is_valid_user = self.app.auth_manager.check_password(user, password)
+1 -1
View File
@@ -295,7 +295,7 @@ class LibrariesController(BaseAPIController):
elif action == 'remove_restrictions':
is_public = self.library_manager.make_public(trans, library)
if not is_public:
raise exceptions.InternalServerError('An error occured while making library public.')
raise exceptions.InternalServerError('An error occurred while making library public.')
elif action == 'set_permissions':
# ACCESS LIBRARY ROLES
@@ -230,7 +230,7 @@ class LibraryDatasetsController(BaseAPIController, UsesVisualizationMixin, Libra
if action == 'remove_restrictions':
trans.app.security_agent.make_dataset_public(dataset)
if not trans.app.security_agent.dataset_is_public(dataset):
raise exceptions.InternalServerError('An error occured while making dataset public.')
raise exceptions.InternalServerError('An error occurred while making dataset public.')
elif action == 'make_private':
if not trans.app.security_agent.dataset_is_private_to_user(trans, dataset):
private_role = trans.app.security_agent.get_private_user_role(trans.user)
@@ -239,7 +239,7 @@ class LibraryDatasetsController(BaseAPIController, UsesVisualizationMixin, Libra
trans.sa_session.flush()
if not trans.app.security_agent.dataset_is_private_to_user(trans, dataset):
# Check again and inform the user if dataset is not private.
raise exceptions.InternalServerError('An error occured and the dataset is NOT private.')
raise exceptions.InternalServerError('An error occurred and the dataset is NOT private.')
elif action == 'set_permissions':
# ACCESS DATASET ROLES
valid_access_roles = []
+4 -6
View File
@@ -182,16 +182,14 @@ mapping:
check_migrate_tools:
type: bool
default: true
default: false
required: false
desc: |
Enable / disable checking if any tools defined in the above non-shed
tool_config_files (i.e., tool_conf.xml) have been migrated from the Galaxy
code distribution to the Tool Shed. This setting should generally be set to
False only for development Galaxy environments that are often rebuilt from
scratch where migrated tools do not need to be available in the Galaxy tool
panel. If the following setting remains commented, the default setting will
be True.
code distribution to the Tool Shed. This functionality is largely untested
in modern Galaxy releases and has serious issues such as #7273 and the possibility
of slowing down Galaxy startup, so the default and recommended value is False.
migrated_tools_config:
type: str
@@ -587,6 +587,11 @@ class AdminToolshed(AdminGalaxy):
repository_id = kwd.get('id', None)
if repository_id is None:
return trans.show_error_message('Missing required encoded repository id.')
if repository_id and isinstance(repository_id, list):
# FIXME: This is a hack that avoids unhandled and duplicate url parameters leaking in.
# This should be handled somewhere in the grids system, but given the legacy status
# this should be OK.
repository_id = [r for r in repository_id if '=' not in r][0] # This method only work for a single repo id
operation = kwd.get('operation', None)
repository = repository_util.get_installed_tool_shed_repository(trans.app, repository_id)
if repository is None:
+3 -1
View File
@@ -440,8 +440,10 @@ class SubWorkflowModule(WorkflowModule):
label = workflow_output['label']
if not label:
label = "%s:%s" % (order_index, workflow_output['output_name'])
workflow_output_uuid = workflow_output.get('uuid') or object()
for data_output in data_outputs:
if data_output['name'] == workflow_output['output_name'] or data_output['uuid'] == workflow_output['uuid']:
data_output_uuid = data_output.get('uuid') or object()
if data_output['name'] == workflow_output['output_name'] or data_output_uuid == workflow_output_uuid:
data_output['label'] = label
data_output['name'] = label
# That's the right data_output
+24 -13
View File
@@ -285,20 +285,31 @@ then
DOCKER_EXTRA_ARGS=${DOCKER_ARGS:-""}
DOCKER_RUN_EXTRA_ARGS=${DOCKER_RUN_EXTRA_ARGS:-""}
DOCKER_IMAGE=${DOCKER_IMAGE:-${DOCKER_DEFAULT_IMAGE}}
if [ "$1" = "--python3" ]; then
DOCKER_RUN_EXTRA_ARGS="-e GALAXY_VIRTUAL_ENV=/galaxy_venv3 $DOCKER_RUN_EXTRA_ARGS"
shift 1
fi
if [ "$1" = "--db" ]; then
db_type=$2
shift 2
else
db_type="sqlite"
fi
db_type="sqlite"
while [ $# -gt 0 ]; do
case "$1" in
--python3)
DOCKER_RUN_EXTRA_ARGS="${DOCKER_RUN_EXTRA_ARGS} -e GALAXY_VIRTUAL_ENV=/galaxy_venv3"
shift 1
;;
--db)
db_type=$2
shift 2
;;
*)
break
;;
esac
done
# Skip client build process in the Docker container for all tests except Selenium
GALAXY_SKIP_CLIENT_BUILD=1
case "$*" in
*-selenium*)
GALAXY_SKIP_CLIENT_BUILD=0
;;
esac
MY_UID=$(id -u)
# Skip client build process in the Docker container for all tests, the Jenkins task builds the client
# locally before testing - you will need to do this also if using this script for Selenium testing.
DOCKER_RUN_EXTRA_ARGS="-e GALAXY_TEST_UID=${MY_UID} -e GALAXY_SKIP_CLIENT_BUILD=1 ${DOCKER_RUN_EXTRA_ARGS}"
DOCKER_RUN_EXTRA_ARGS="${DOCKER_RUN_EXTRA_ARGS} -e GALAXY_TEST_UID=${MY_UID} -e GALAXY_SKIP_CLIENT_BUILD=${GALAXY_SKIP_CLIENT_BUILD}"
echo "Docker version:"
docker --version
echo "Launching docker container for testing with extra args ${DOCKER_RUN_EXTRA_ARGS}..."
+2 -5
View File
@@ -38,11 +38,8 @@ def inherit(context):
<%def name="javascript_app()">
${ parent.javascript_app() }
<script type="text/javascript">
//HACK: should happen before we get to this page - _before_ logged out of session
config.addInitialization(function(galaxy, config) {
if (galaxy.user) {
galaxy.user.clearSessionStorage();
}
config.addInitialization(function(galaxy) {
window.location.href = galaxy.root;
});
</script>
</%def>
+1 -1
View File
@@ -192,7 +192,7 @@ class HistoriesApiTestCase(api.ApiTestCase):
def test_import_metadata_regeneration(self):
history_name = "for_import_metadata_regeneration"
history_id = self.dataset_populator.new_history(name=history_name)
self.dataset_populator.new_dataset(history_id, content=open(self.test_data_resolver.get_filename("1.bam"), 'rb'), file_type='bam')
self.dataset_populator.new_dataset(history_id, content=open(self.test_data_resolver.get_filename("1.bam"), 'rb'), file_type='bam', wait=True)
imported_history_id = self._reimport_history(history_id, history_name)
self._assert_history_length(imported_history_id, 1)
import_bam_metadata = self.dataset_populator.get_history_dataset_details(
+54
View File
@@ -1,5 +1,17 @@
from tempfile import NamedTemporaryFile
from galaxy import util
SECTION_XML = """<?xml version="1.0" ?>
<section id="fasta_fastq_manipulation" name="Fasta Fastq Manipulation" version="">
<tool file="toolshed.g2.bx.psu.edu/repos/peterjc/seq_filter_by_id/fb1313d79396/seq_filter_by_id/tools/seq_filter_by_id/seq_filter_by_id.xml" guid="toolshed.g2.bx.psu.edu/repos/peterjc/seq_filter_by_id/seq_filter_by_id/0.2.5">
<tool_shed>
toolshed.g2.bx.psu.edu
</tool_shed>
</tool>
</section>
"""
def test_strip_control_characters():
s = '\x00bla'
@@ -15,3 +27,45 @@ def test_strip_control_characters_nested():
assert util.strip_control_characters_nested(l)[0] == stripped_s
assert util.strip_control_characters_nested(t)[0] == stripped_s
assert util.strip_control_characters_nested(d)[42] == stripped_s
def test_parse_xml_string():
section = util.parse_xml_string(SECTION_XML)
_verify_section(section)
def test_parse_xml_file():
with NamedTemporaryFile(mode='w') as tmp:
tmp.write(SECTION_XML)
tmp.flush()
section = util.parse_xml(tmp.name).getroot()
_verify_section(section)
def _verify_section(section):
tool = next(iter(section))
assert sorted(tool.items()) == [
('file',
'toolshed.g2.bx.psu.edu/repos/peterjc/seq_filter_by_id/fb1313d79396/seq_filter_by_id/tools/seq_filter_by_id/seq_filter_by_id.xml'),
('guid',
'toolshed.g2.bx.psu.edu/repos/peterjc/seq_filter_by_id/seq_filter_by_id/0.2.5')
]
assert next(iter(tool)).text == 'toolshed.g2.bx.psu.edu'
def test_xml_to_string():
section = util.parse_xml_string(SECTION_XML)
s = util.xml_to_string(section)
assert len(s.split('\n')) == 1
def test_xml_to_string_pretty():
section = util.parse_xml_string(SECTION_XML)
s = util.xml_to_string(section, pretty=True)
PRETTY = """<?xml version="1.0" ?>
<section id="fasta_fastq_manipulation" name="Fasta Fastq Manipulation" version="">
<tool file="toolshed.g2.bx.psu.edu/repos/peterjc/seq_filter_by_id/fb1313d79396/seq_filter_by_id/tools/seq_filter_by_id/seq_filter_by_id.xml" guid="toolshed.g2.bx.psu.edu/repos/peterjc/seq_filter_by_id/seq_filter_by_id/0.2.5">
<tool_shed>toolshed.g2.bx.psu.edu</tool_shed>
</tool>
</section>"""
assert s == PRETTY
+1 -1
View File
@@ -1139,7 +1139,7 @@ def launch_ssaha(linker_fname, query_fname, output_fh):
print("ok.")
except Exception:
print("\n")
raise RuntimeError('An error occured during the SSAHA2 execution, aborting.')
raise RuntimeError('An error occurred during the SSAHA2 execution, aborting.')
def read_ssaha_data(ssahadata_fh):