galaxy package

Galaxy root package – this is a namespace package.

Subpackages

Submodules

galaxy.app module

class galaxy.app.UniverseApplication(**kwargs)[source]

Bases: object, galaxy.config.ConfiguresGalaxyMixin

Encapsulates the state of a Universe application

__init__(**kwargs)[source]
configure_fluent_log()[source]
is_job_handler()[source]
shutdown()[source]

galaxy.config module

Universe configuration builder.

class galaxy.config.Configuration(**kwargs)[source]

Bases: object

__init__(**kwargs)[source]
check()[source]
deprecated_options = ('database_file',)
ensure_tempdir()[source]
get(key, default)[source]
get_bool(key, default)[source]
guess_galaxy_port()[source]
is_admin_user(user)[source]

Determine if the provided user is listed in admin_users.

NOTE: This is temporary, admin users will likely be specified in the
database in the future.
reload_sanitize_whitelist(explicit=True)[source]
resolve_path(path)[source]

Resolve a path relative to Galaxy’s root.

sentry_dsn_public

Sentry URL with private key removed for use in client side scripts, sentry server will need to be configured to accept events

class galaxy.config.ConfiguresGalaxyMixin[source]

Shared code for configuring Galaxy-like app objects.

reload_toolbox()[source]
wait_for_toolbox_reload(old_toolbox)[source]
galaxy.config.configure_logging(config)[source]

Allow some basic logging configuration to be read from ini file.

This should be able to consume either a galaxy.config.Configuration object or a simple dictionary of configuration variables.

galaxy.config.find_path(kwargs, var, root)[source]

Find a configuration path that may exist at different defaults.

galaxy.config.find_root(kwargs)[source]
galaxy.config.get_database_engine_options(kwargs, model_prefix='')[source]

Allow options for the SQLAlchemy database engine to be passed by using the prefix “database_engine_option”.

galaxy.config.parse_dependency_options(kwargs, root, dependency_resolvers_config_file)[source]
galaxy.config.resolve_path(path, root)[source]

If ‘path’ is relative make absolute by prepending ‘root’

galaxy.main module

Entry point for starting Galaxy without starting as part of a web server.

Example Usage: Start a job/workflow handler without a web server and with a given name using.

galaxy-main –server-name handler0

Start as a daemon with (requires daemonized - install with ‘pip install daemonize’):

galaxy-main -d –daemon-log-file=handler0-daemon.log –pid-file handler0.pid –server-name handler0

In daemon mode logging of Galaxy (as opposed to this script) is configured via a loggers section in Galaxy’s ini file - this can be overridden with sensible defaults logging to a single file with the following:

galaxy-main -d –server-name handler0 –daemon-log-file=handler0-daemon.log –pid-file handler0.pid –log-file handler0.log

class galaxy.main.GalaxyConfigBuilder(args=None, **kwds)[source]

Bases: object

Generate paste-like configuration from supplied command-line arguments.

__init__(args=None, **kwds)[source]
app_kwds()[source]
classmethod populate_options(arg_parser)[source]
setup_logging()[source]
galaxy.main.absolute_config_path(path, galaxy_root)[source]
galaxy.main.app_loop(args, log)[source]
galaxy.main.find_ini(supplied_ini, galaxy_root)[source]
galaxy.main.load_galaxy_app(config_builder, config_env=False, log=None, **kwds)[source]
galaxy.main.main()[source]

galaxy.queue_worker module

Galaxy control queue and worker. This is used to handle ‘app’ control like reloading the toolbox, etc., across multiple processes.

class galaxy.queue_worker.GalaxyQueueWorker(app, queue=None, task_mapping={'reload_display_application': <function reload_display_application>, 'create_panel_section': <function create_panel_section>, 'reload_toolbox': <function reload_toolbox>, 'reload_tool_data_tables': <function reload_tool_data_tables>, 'recalculate_user_disk_usage': <function recalculate_user_disk_usage>, 'reload_tool': <function reload_tool>, 'admin_job_lock': <function admin_job_lock>, 'reload_sanitize_whitelist': <function reload_sanitize_whitelist>, 'reload_data_managers': <function reload_data_managers>}, connection=None)[source]

Bases: kombu.mixins.ConsumerMixin, threading.Thread

This is a flexible worker for galaxy’s queues. Each process, web or handler, will have one of these used for dispatching so called ‘control’ tasks.

__init__(app, queue=None, task_mapping={'reload_display_application': <function reload_display_application>, 'create_panel_section': <function create_panel_section>, 'reload_toolbox': <function reload_toolbox>, 'reload_tool_data_tables': <function reload_tool_data_tables>, 'recalculate_user_disk_usage': <function recalculate_user_disk_usage>, 'reload_tool': <function reload_tool>, 'admin_job_lock': <function admin_job_lock>, 'reload_sanitize_whitelist': <function reload_sanitize_whitelist>, 'reload_data_managers': <function reload_data_managers>}, connection=None)[source]
bind_and_start()[source]
get_consumers(Consumer, channel)[source]
process_task(body, message)[source]
shutdown()[source]
galaxy.queue_worker.admin_job_lock(app, **kwargs)[source]
galaxy.queue_worker.create_panel_section(app, **kwargs)[source]

Updates in memory toolbox dictionary.

galaxy.queue_worker.recalculate_user_disk_usage(app, **kwargs)[source]
galaxy.queue_worker.reload_data_managers(app, **kwargs)[source]
galaxy.queue_worker.reload_display_application(app, **kwargs)[source]
galaxy.queue_worker.reload_sanitize_whitelist(app)[source]
galaxy.queue_worker.reload_tool(app, **kwargs)[source]
galaxy.queue_worker.reload_tool_data_tables(app, **kwargs)[source]
galaxy.queue_worker.reload_toolbox(app, **kwargs)[source]
galaxy.queue_worker.send_control_task(app, task, noop_self=False, kwargs={})[source]

This sends a control task out to all processes, useful for things like reloading a data table, which needs to happen individually in all processes.

galaxy.queue_worker.send_local_control_task(app, task, kwargs={})[source]

This sends a message to the process-local control worker, which is useful for one-time asynchronous tasks like recalculating user disk usage.

galaxy.queues module

All message queues used by Galaxy

galaxy.queues.all_control_queues_for_declare(config)[source]

For in-memory routing (used by sqlalchemy-based transports), we need to be able to build the entire routing table in producers.

Refactor later to actually persist this somewhere instead of building it repeatedly.

galaxy.queues.connection_from_config(config)[source]
galaxy.queues.control_queue_from_config(config)[source]

Returns a Queue instance with the correct name and routing key for this galaxy process’s config

galaxy.version module