Commit Graph
12 Commits
Author SHA1 Message Date
John Chilton 63a4c36770 Add utility for debugging sqlalchemy queries in db_shell.py.
Should aid in interactively building up queries.
2014-06-10 15:01:38 -05: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
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
Dannon Baker cd23ac7014 Make sure dependent eggs are loaded for sqlalchemy-migrate, regardless of entry point. This is a hack, and dependency management should/will eventually handle it. 2013-05-03 12:55:55 -04:00
Dannon Baker e436468f28 Require decorator egg wherever we have sqlalchemy-migrate. Should be able to resolve dependencies and do this automatically 2013-05-03 12:31:20 -04:00
Greg Von Kuster ae39ab8f2b Rename community_wsgi.ini.sample to be tool_shed_wsgi.ini.sample, run_community.sh to run_tool_shed.sh, and fix references to these files in the code. 2013-03-18 10:24:03 -04:00
Greg Von Kuster f539d3071b Change the name and path of the community webapp to be tool_shed. 2013-02-27 16:23:19 -05:00
Daniel Blankenberg 94a2f94529 Fix minor typos in db_shell.py 2012-10-11 16:43:37 -04:00
John Chilton de62173aff Actually we don't want to set that environment variable, that make
python behave like -i every execution.
2012-03-05 15:23:28 -06:00
John Chilton ecb256ef46 Adding db_shell.py that can be used to simplify writing command line
scripts against the Galaxy model/database layer or to make use of
Galaxy models in an interactive shell.
2012-03-05 12:11:53 -06:00