Commit Graph
486 Commits
Author SHA1 Message Date
Dave Bouvier 871c301e35 Allow specifying the functional tests' install_database_connection with an environment variable. 2014-01-08 14:50:19 -05:00
Greg Von Kuster d26d527bc6 Order imports per database_contexts requirements to fix the tool shed's install and test framework. 2014-01-03 10:02:19 -05:00
John Chilton 82787696ef PEP-8 fixes for set_metadata.py. 2014-01-02 17:50:14 -06:00
John Chilton 7ca5e218fd Tools now properly migrated into install_database_connection database...
... this second database is specified.
2013-12-17 11:19:41 -06:00
John Chilton 8f5b10d6d5 Reuse code between scripts/manage_tools.py and lib/galaxy/model/orm/scripts.py 2013-12-17 11:19:41 -06:00
Daniel Blankenberg 3db7688a56 Add Functional Testing support for locally and ToolShed installed Data Managers. 2013-12-10 12:59:29 -05:00
Daniel Blankenberg 20e478f210 Allow ftp for GALAXY_TEST_DB_TEMPLATE and stricter check for protocol URL prefixes. 2013-12-10 11:08:13 -05:00
Daniel Blankenberg f370e990e0 Fix for using GALAXY_TEST_DB_TEMPLATE with htTp not specified in all lower case. 2013-12-10 10:54:51 -05:00
John Chilton 5e36bde9c8 Rework contribution from pull request #267 to be optional.
To obtain the behavior (assigning all groups for a given user for each job submission) change the property - 'drmaa_external_runjob_script' from  'scripts/drmaa_external_runner.py' to 'scripts/drmaa_external_runner.py --assign_all_groups'.

Making this optional because my concern is that this could be an expensive operation on some clusters.
2013-12-10 08:26:22 -06:00
John Chilton 039780705c PEP-8 fixes for scripts/drmaa_external_runner.py. 2013-12-10 08:02:17 -06:00
John Chilton 96413d7e2b Merge pull request #267. 2013-12-10 08:29:16 -06:00
Dave Bouvier 048e4af5d7 Use walltime configured in job_conf.xml instead of maxseconds for determining whether a test tool run is stuck. 2013-12-05 13:52:22 -05:00
John Chilton 6d37b2890c Models: Database migrations for stand-alone tool_shed_install models.
create_db and manage_db should now work with install as well.

Migrations are symbolic links into lib/galaxy/model/migrate/versions of migrations affecting these tables. All future migrations to these tables should created in one place like this and linked in the other.
2013-12-05 00:20:54 -06:00
John Chilton 79c8f59341 Models: Introduce real class for app.model (ModelMapping).
Shared across Tool Shed and Galaxy to reduce code duplication. Previously this was just a bunch, making it a real class allows placing some shared logic in there.

This refactoring also eliminates some global variables galaxy.model.mapping.Session, galaxy.model.mapping.context, and same for tool shed. This may break things, but these are things that should probably be fixed anyway.

In particular small changes to db_shell.py and a unit test that depended on these global variables have been updated. The functional test frameworks likewise needed to be updated to not depend on these - these changes were more substantial.

To fix these functional tests, I essentially replace old references to global variables in Galaxy with references to global variables just defined in the test framework in test/functional/database_contexts.py (a slight improvement).
2013-12-05 00:20:54 -06:00
John Chilton b686182e13 Modles: Clean up stand-alone database scripts.
Namely create_db.py,db_shell.py, and manage_db.py.

Move duplicated code into lib/galaxy/model/orm/scripts.py - add unit tests. PEP-8 clean up of all 4 files. Add incoherent incoherent comment at top of manage_db.py.

As a result of the code de-duplication create_db.py should be usable with the tool shed now.

Will be refactoring lib/galaxy/model/orm/scripts.py to work with new tool shed install database - it will be good to have a place to test these and allow manage_db.py and clean_db.py to work immediately.
2013-12-05 00:20:54 -06:00
Greg Von Kuster 340762bbf1 Correctly use the initialized test_environment dict when running the tool shed's install and test framework and additional code cleanup for the framework. 2013-12-04 15:07:39 -05:00
Frederik Delaere c939ebb9d8 Fix for two issues
- The secondary user groups are not assigned to the user
 - When the json file is on a NFS share where root access is not allowed this script fails with a "error: JobTemplate file (/path/to/jsonfile) doesn't exist" error

To fix the first we have to go through all the groups of the user in set_user(uid) and assign them with os.setgroups()

The second one is fixed by removing the check if the json file exists in the function validate_paramters and move that check to a new function which is called after set_user(uid). Because its possible that the new user (the one in uid) has access to that file but root hasn't
2013-11-26 15:04:57 +00:00
John Chilton c28260faf7 Functional testing of workflows (for Galaxy).
... tool shed integration will be more challenging, but this can be used for directly configured Galaxy tools and outlines a syntax that could be shared with a tool shed driven approach.

The one tricky part is how to match workflow outputs to things to check. Right now it is based on the index of the output across the workflow. This is both difficult to determine and very brittle to workflow modifications - how to proceed - require annontation string to be setup? Modify workflow data model to all assigning names to outputs the way inputs havenames? At any rate this current syntax should be considered beta and may change - if it does Galaxy will not continue to support this syntax.

To run the sample test execute the following test command:

sh run_functional_tests.sh -workflow test-data/workflows/1.xml
2013-11-21 19:17:13 -06:00
John Chilton bf18bea107 Small clean up of argument processing in functional_tests.py 2013-11-21 19:17:13 -06:00
John Chilton 569c5db221 Add new option, tools, and data to functional test framework to test/demonstrate tool framework itself.
Add smaple repeat tool demonstrating some weaknesses of twill-based current framework.
2013-11-21 19:17:12 -06:00
John Chilton 79f645eabc Twill-less tool tests - allow tests with GALAXY_TEST_EXTERNAL...
... if GALAXY_TEST_EXTERNAL is ever fixed.
2013-11-21 19:17:12 -06:00
John Chilton 0e31d6c113 Inject master API key into functional test Galaxy.
Override or set external key with GALAXY_TEST_MASTER_API_KEY.
2013-11-21 19:17:12 -06:00
John Chilton 4ecaf654ea Refactor shared code in functional_tests.py into a method. 2013-11-21 19:17:12 -06:00
John Chilton 6ef8fc7181 Do not reference values before use when GALAXY_TEST_EXTERNAL used.
GALAXY_TEST_EXTERNAL still quite broken.
2013-11-17 00:47:26 -06:00
John Chilton 43a17b3d9b Implement functional test env. variable GALAXY_TEST_DB_TEMPLATE.
Middle ground between recreating a completely new database and pointing at existing database with GALAXY_TEST_DBURI. The former requires a lot of setup time, the latter results in test failures in certain cases (namely tool shed tests expecting clean database).

GALAXY_TEST_DB_TEMPLATE can be either a file path (absolute) or URL.

In order to facilitate this, a new Galaxy config option (database_auto_migrate) has been added. If this option is enabled, when Galaxy starts up and points at an existing database, if that database is not at the newest version it will be automatically migrated. This option defaults to False, but is enabled in testing if GALAXY_TEST_DB_TEMPLATE is set.

I think we should go a step further and make this (database_auto_migrate) default to True if database_connection references an sqlite database - unless we believe there are Galaxy instances out there based on sqlite that are REALLY old or that are production enough to warrent requiring admins to do that database migration in a separate step (presumably encouraging them to make a backup pre-migration). Thoughts?
2013-10-30 00:01:15 -05:00
John Chilton b1e173d214 PEP-8 fixes for scripts/functional_tests.py.
Still contains some unused imports. Perhaps these are reimported elsewhere?
2013-10-30 00:01:15 -05:00
Greg Von Kuster a610d0d458 Enhance the Tool Shed and Galaxy APIs to support resetting metadata on repositories in the Tool Shed or installed into Galaxy respectively. When resetting repository metadata in the Tool Shed, if the API key is associated with an admin user, then setting the my_writable param value to True will restrict resetting metadata to only repositories that are writable by the user in addition to those repositories of type tool_dependency_definition. This param is ignored if the current user is not an admin user, in which case this same restriction is automatic. Also, when resetting metadata in the Tool Shed, repositories of type tool_dependency_definition are reset before repositories of type unrestricted. When setting metadata for installed repositories in Galaxy, neither repository types nor order are considered since these concepts are irrelevant in that environment. 2013-10-16 14:19:26 -04:00
John Chilton 0f63caaff0 Bug fix in scripts/functional_tests.py.
A tempdir is referenced before it is created in certain cases.
2013-10-14 21:50:12 -05:00
Ross Lazarus 8c4f96ed81 backout -r 10808 2013-10-08 10:55:24 +11:00
Ross Lazarus 87b1203b4a branch merge 2013-10-05 09:56:05 +10:00
Ross Lazarus 7938d1fc81 local changes 2013-10-05 09:51:18 +10:00
Dave Bouvier 962be8d8ec Remove sam_fa_indices.loc.sample from tool-data. Update migration xml to the correct revisions of cufflinks repositories. 2013-10-01 15:49:08 -04:00
Dave Bouvier 695aa8f44d Migrate cuffcompare, cuffdiff, cufflinks, and cuffmerge from the distribution to the tool shed. Update the 'Review migration stages' layout. 2013-10-01 13:54:57 -04:00
Dave Bouvier b0efe4ddea Migrate tools from the distribution to the tool shed, including but not limited to samtools and fastx_toolkit tools. 2013-09-26 10:05:00 -04:00
Nate Coraor ed9fc69f33 Fix a few postgres dialect renaming misses. 2013-09-26 09:34:27 -04:00
Greg Von Kuster b5ecae6f3b Enhance the Galaxy API to display the list of exported workflows contained in an installed tool shed repository and to import one or more of those exported workflows into Galaxy. This change set is loosely based on John Chilton's pull request # 223 titled "Implement API methods for interfacing with an installed tool shed repository's workflows", but the implementation has been re-worked. All of John's contributed features should be available in this change set. 2013-09-24 12:05:17 -04:00
Nate Coraor 126c02eb71 Experimental/alpha/in-development/incomplete object store plugin for iRODS. This plugin will probably set your iRODS instance on fire: do not use except in development/testing. 2013-08-28 16:20:19 -04:00
Greg Von Kuster 0a704cdb6d Automatically eliminate tool entries from non-shed-related tool panel configs for tools contained in tool shed repositories that were migrated out of the Galaxy distribution. 2013-08-22 10:12:08 -04:00
Carl Eberhard 89c8698169 Functional tests: fix sqlite db_path var; fix api test for hda update with nonsense key 2013-08-21 10:00:09 -07:00
Dave Bouvier aa5d0ca8a7 Merge in bugfix from stable. 2013-08-19 13:06:42 -04:00
Dave Bouvier 7adc736e16 Fix for case where running functional tests might overwrite certain files in database/files. 2013-08-19 13:06:17 -04:00
Dannon Baker 67ff535694 Merged in lance_parsons/galaxy-central-pull-requests/cleanup_datasets_unicode_fix (pull request #196)
Fix unicode issue when printing history names in cleanup_datasets.py script
2013-08-15 11:18:37 -04:00
Greg Von Kuster cf96dccddb Add the ability to export a specified repository revision from the tool shed to a gzip compressed archive saved locally. The ability to import this archive to the same or another tool shed is not yet implemented, but coming soon. All of the repository's repository dependencies can optionally be exported into the same archive. The archive includes a manifest.xml file that contains the order in whcih the repositories in the archive must be imported.
This feature is now available for any installable revision of a repository using the new "Export this revision" option in the Repository actions menu in the browser.  It is also available via the Tool Shed API using a command like the following:

export.py --url http://testtoolshed.g2.bx.psu.edu --name chemicaltoolbox --owner bgruening --revision 4133dbf7ff4d --export_repository_dependencies True --download_dir /tmp
2013-08-02 19:30:03 -04:00
Lance Parsons 91ba836a00 Fix unicode issue when printing history names in cleanup_datasets.py script 2013-07-22 14:24:13 -04:00
Nate Coraor 86f25f3bcf GCC2013 Advanced Tool and Data Source Configuration workshop: "The test framework uses tool_conf.xml.sample for reasons unknown and lost to time."
Use tool_conf.xml for running functional tests, rather than tool_conf.xml.sample.
2013-06-30 10:04:58 -04:00
Dannon Baker eed1f76001 Merged in lance_parsons/galaxy-central-pull-requests/dataset-cleanup (pull request #158)
Basic administrative dataset cleanup script
2013-09-10 13:14:10 -04:00
Greg Von Kuster 586c673338 Add support for repairing an installed tool shed repository and all of it's repository dependency hierarchy. Repairing a repository hierarchy will attempt to ensure all repositories in the hierarchy are correctly installed and all tool dependencies of each repository in the hierarchy are correctly installed.
There is a new Repository Actions pop-up menu item for each repository labeled "Repair repository" that enables this in the browser.

This is also supported in the enhanced Galaxy API using a command like the following from the ~/scripts/api directory:

python ./repair_tool_shed_repository.py --api  <Galaxy admin API key> -l http://localhost:8763 --url http://localhost:9009/ -o test -r 1018e3cee313  --name chemicaltoolbox
2013-06-26 21:17:00 -04:00
Dannon Baker b66c39c951 galaxy.model.orm is a more sensible location than mapping for dialect_to_egg 2013-06-20 10:58:52 -04:00
Dannon Baker be4bc4694a Consolidate dialect_to_egg to a single location. 2013-06-20 10:50:31 -04:00
Carl Eberhard c86637486b scripts/api: Fixes to upload_to_history.py 2013-06-12 10:35:11 -04:00