249 Commits
Author SHA1 Message Date
Martin Cech 3072889905 Merge branch 'release_18.05' into release_18.09 2018-09-20 11:48:45 -04:00
John Chilton 56f5bf743a Make newer unit tests more robust with a looped wait...
... instead of raw sleep.
2018-09-19 20:14:08 -04:00
mvdbeek 94082a878d Unit test that fails if we don't return the latest version upon version mismatch 2018-09-19 15:39:00 +02:00
mvdbeek dc49c3ea0e Provide visual feedback if tool is broken 2018-09-08 17:59:45 +02:00
mvdbeek 947389887b Add unit test that exercises reloading for broken tools 2018-09-08 11:29:24 +02:00
John Chilton 84597a1235 Lists-as-tuples collection operations. 2018-08-08 10:28:56 -04:00
John Chilton 55436c3800 Merge pull request #5457 from mvdbeek/select_tag_parameter
Allow selecting subset of collection by group tag
2018-08-07 13:09:18 -04:00
mvdbeek 11f9222122 Fix redirection unit test 2018-08-02 13:21:19 +02:00
mvdbeek cb7ebd7349 py3: Fix history import/export tool
- Open history tarfile in binary mode
 - Fix base64 encoding in history import tool
 - test history export more extensively
2018-08-02 13:21:19 +02:00
John Chilton 45b2b7f434 Merge remote-tracking branch 'jmchilton/dev' into select_tag_parameter 2018-07-24 13:18:13 -04:00
John Chilton 0b98e3ed13 Merge pull request #6443 from ebolyen/multiple_filter_datasetmatcher
Allows DatasetMatcher to use multiple filters
2018-07-05 13:31:36 -04:00
mvdbeek c03a86caea py3: fix test_job_param unit test 2018-07-05 02:49:51 +01:00
mvdbeek c52d147612 No need to explicitly compare to bytestring 2018-07-05 02:49:51 +01:00
mvdbeek af6b572eac py3: Fix history/import export 2018-07-05 02:49:51 +01:00
Nicola Soranzo 64c591a606 More proper fix for some test_tool_deps.py unit tests
Follow up to https://github.com/galaxyproject/galaxy/pull/6436/files#r199368686
2018-07-03 00:24:04 +01:00
Evan Bolyen d145d9ac92 Allows DatasetMatcher to use multiple filters
In particular this enables multiple add_value filters to be used with
<options>'s option_filter_attribute.
2018-07-01 15:52:32 -07:00
Bjoern Gruening 41f25b928a fix a few tool_deps test errors 2018-07-01 21:25:25 +02:00
Nic Herndon 03a4172680 Fixed bugs with unit test on Python 3 2018-06-30 23:06:42 +00:00
Nic Herndon d95c32f4b8 Fixed comparison with binary string 2018-06-30 16:28:43 +00:00
Nic Herndon a221a37af3 Fixed comparison with binary string 2018-06-30 16:28:43 +00:00
Dannon Baker 808686cd60 Merge branch 'release_18.01' into release_18.05 2018-05-02 09:32:07 -04:00
John Chilton 740c4c9344 ToolBuildOptimize - do not fetch hidden datasets for inclusion.
Only fetch visible datasets into big, cached list of history datasets under consideration. Hidden datasets don't seem to be used by the fetcher or initial value stuff so it seems fine to exclude them. The advantage should be clear for histories with a large number of datasets hidden below a signficantly smaller number collections.
2018-04-27 10:16:21 -04:00
John Chilton 2eea566c10 ToolBuildOptimize - Add SummaryDatasetCollectionMatcher.
Use summary data pulled from the database for collections when possible instead of loading potentially hundreds of thousands of individual datasets.
2018-04-27 10:16:21 -04:00
John Chilton 8af243c176 Allow rule based operations on existing collections.
Allow the rules DSL & GUI component to operate on existing collections to allow filtering, sorting, modifying identifiers and general re-organization of existing collections (e.g. the outputs of tools). Implementing this as a collection operation tool so that it should be executable interactively in the tool form and in a batch fashion as part of workflow executions.

For this to be tracked properly as a tool execution and to work properly in the tool form, I've implemented a new tool framework and tool form parameter type called "rules".

This can thought of as a more GUI friendly alternative to my proposed collection operations that consumed JavaScript expressions.

This includes API tests for both tool and workflow execution of the new tool as well as Selenium tests for tool form execution, workflow editor interactions, and workflow running.
2018-04-24 11:10:43 -04:00
John Chilton bb7de2c0db Improved tool test API.
Cleanup up internal representations used to bridge the tool parser and the tool testing modules to produce more sensible dictified representations when exported via the API. This is mostly replacing tuples (which get converted to JSON lists) to dicts but there are some other small cleanups.
2018-03-06 20:07:52 -05:00
Nicola Soranzo 24d2d3b4fa Print toolbox dict if test fails 2018-03-05 09:44:26 +00:00
Martin Cech ba3b3d5c18 do not allow codefiles for TS tool loading 2018-02-12 14:06:50 -05:00
mvdbeek 4afbdbab31 Fix unit tests 2018-02-04 19:47:00 +01:00
Nate Coraor 080148a161 Merge pull request #5193 from jmchilton/structured_job_environment_1
Improved home and temp directory handling.
2018-01-19 11:33:26 -05:00
Martin Cech b91d8e1398 Merge pull request #5240 from gvlproject/discover_datasets_recursive
Added support for recursively discovering output datasets
2018-01-17 10:37:47 -05:00
John Chilton db0633eb89 Follow up on comments for #5193. 2018-01-09 11:51:04 -05:00
John Chilton 4bf47d0877 Improved home and temp directory handling.
Home Directory Handling
-----------------------

- For profile < 18.01 tools:
  - If use_shared_home="false" is set on the command block - the tool will be given a clean $HOME directory.
  - If ``shared_home_dir`` is set in Galaxy's config or the job destination configuration, Galaxy will set $HOME in the tool's job environment to point at this directory.
- For profile >= 18.01 tools, jobs will be given a clean home directory by default unless ``use_shared_home="true"`` is set. If that is set, the profile < 18.01 behavior is used.

In addition to these changes for Galaxy tools, the tool framework itself has been updated to allow other potential behaviors including the CWL defaults.

Integration tests for each of these cases has been added.

Upgrading to 18.01 - we recommend dropping overriding ``HOME`` in any Galaxy environment configuration (e.g. env directives in job_conf.xml). If any such configuration is found, we recommend instead setting "shared_home_dir" for destinations to the that cluster destination's shared HOME directory. If all destinations share a single HOME directory, this can be set in galaxy.ini instead of job_conf.xml.

Temp Directory Handling
-----------------------

There were serious disagreements with how to proceed here. I felt we should aggressively isolate tool TMP directories and provide deployers options to tweak these through structured arguments. Nicola felt we should defer to the environment variables already being set job_conf.xml - but tweak their meanings by default. Nate fell somewhere in between. I think all sides have merit and could make sense depending on what you want to improve (easing cognative load, reducing out-of-box errors, easing advanced deployer configs, structured reasonsing of paths by Galaxy, etc...).

I've navigated a path here that doesn't particularly reduce out of the box errors as I wanted by setting up a per-job temp directory by default but does make it possible and shouldn't break any existing configurations and doesn't make it anything more difficult to manage these things via environment variables.

The new approach doesn't change any thing by default for Galaxy tools (regardless of tool profile version). The only way to achieve new behaviors is for the deployer to set a job_conf parameter called "tmp_dir". If this is set, it can be set to "True" (to default to a new, clean directory below the job directory) or to a shell expression to allow setting this dynamically at runtime to paths or paths beneath directories as needed on a per-destination basis. If a temp directory is set this way all three variables TMP, TMPDIR, and TEMP are set.

Docker Environment Handling
---------------------------

- Mirror the CWL behavior of mounting an external /tmp by default.
- For newer tools, pass through the HOME, TMP, TMPDIR, and TEMP environment variables into the Docker container in addition to GALAXY_SLOTS.
- Fix the pass through of environment variables into Docker containers.
2018-01-09 09:30:16 -05:00
John Chilton f017de30bf Tool-centric annotation of out of memory errors.
- Update explicit stdio definitions as well as detect_errors-based definitions to allow this.
- Update runner code to allow resubmission in such cases.
2017-12-22 09:08:18 -05:00
Nuwan Goonasekera 8b76a5a698 Added support for recursively discovering output datasets 2017-12-21 22:59:50 +05:30
mvdbeek 4f162f2804 Add unit test for ValidationContext and ToolValidator 2017-12-03 16:21:59 +01:00
Nicola Soranzo 2cd95c48f6 Fix import order everywhere
- Add flake8-import-order to flake8 Pipfile and remove py27-lint-imports
  and py27-lint-imports-include-list tox envs
- Fix most E201 and E202 errors reported by flake8-import-order v0.15,
  but pin flake8-import-order to v0.14.3 until
  https://github.com/PyCQA/flake8-import-order/issues/123
  is fixed

This let us drop 2 jobs on Travis per each job.
2017-11-14 19:42:39 +00:00
Nicola Soranzo 8ef1e51a4a Remove requirement from shell_commands() parameters 2017-11-06 16:28:59 +00:00
Nicola Soranzo 9b4de72ca6 Fix all E722 errors and ignore E741
Introduced in flake8 3.5.0
Fix import order.
2017-10-24 11:29:09 +01:00
Nicola Soranzo 9b1832abb1 Fix import order for cron/, scripts/ and test/ 2017-09-25 23:44:39 +01:00
John Chilton d3d134030a Rework #4635 to preserve backward compatibility on modules shared via galaxy-lib.
Also cleanup comments and such in xml_macros to reflect this doesn't apply just to tools.
2017-09-21 10:09:19 -04:00
mvdbeek ac10e0d224 Reload tools if a macro changes
We do this by recording any macros that are required to load a tool.  When
loading a tool we register the macro to be watched, and if the macro changes we
reload all corresponding tools.
2017-09-19 12:16:05 +02:00
Aurélien Bernard 9822f5f2a9 Fix attempt for the modulepath issue in unit tests
On a computer where LMOD is not installed, the MODULEPATH variable is not defined and the modulepath attributes of the LMOD dependency resolver must be used.
2017-08-24 15:11:52 +02:00
Aurélien Bernard bbec357bbd Fix the import order error raised by Travis
The order of the import statements in the test_tool_deps script was incorrect (as stated by travis). That should no longer be the case.
2017-08-24 14:43:26 +02:00
Aurélien Bernard eda36ffb99 LMOD Dependency resolver - Unit tests added
The unit/tools/tests_tool_deps.py script has been updated to includ unit tests for the LMOD dependency resolver.
2017-08-24 14:34:48 +02:00
John Chilton 517f248ac4 Overhaul of tool provided job metadata.
- Add another test to demonstrate referencing entries in galaxy.json for datasets by dataset path basename instead of ID.
- Add a bit more documentation to test tools.
- Redo the structure of galaxy.json for profile >= 17.09 tools with two new test tools to demonstrate the new structure - for both output dataset metadata and discovered dataset metadata.
- Improved abstractions for interaction between tools and jobs to enable different tool provided metadata collection depending on tool profile version.
2017-08-17 15:41:10 -04:00
Nicola Soranzo 21b44bf348 Fix all E201 and E202 style errors
using the following command:
```
autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E201,E202 .
```
2017-08-17 11:35:39 +01:00
Björn Grüning b6f0600e98 Merge pull request #4387 from jmchilton/tool_unit_test_cleanup
Cleanup of Unit Test Code for Loading Tools
2017-08-16 14:55:14 +02:00
John Chilton 11365e9620 Bugfix: __str__ method on tool parsers would throw an Exception. 2017-08-08 22:53:08 -04:00
John Chilton a462afa0b7 Eliminate second unit test variant of MockApp.
As well as my failed experiment in mocking out sqlalchemy - I think the in-memory database is more useful than mocking out sqlalchemy in retrospect.
2017-08-08 09:41:59 -04:00
mvdbeek b19640b81a Stop loading tools that require a newer galaxy
We look at a tools profile attribute, and if it is too new we will not
load the tool. This is a first step towards
https://github.com/galaxyproject/galaxy/issues/2086
2017-08-07 18:53:25 +02:00