galaxy.config package

Universe configuration builder.

galaxy.config.LOGGING_CONFIG_DEFAULT: Dict[str, Any] = {'disable_existing_loggers': False, 'filters': {'stack': {'()': 'galaxy.web_stack.application_stack_log_filter'}}, 'formatters': {'stack': {'()': 'galaxy.web_stack.application_stack_log_formatter'}}, 'handlers': {'console': {'class': 'logging.StreamHandler', 'filters': ['stack'], 'formatter': 'stack', 'level': 'DEBUG', 'stream': 'ext://sys.stderr'}}, 'loggers': {'amqp': {'level': 'INFO', 'qualname': 'amqp'}, 'botocore': {'level': 'INFO', 'qualname': 'botocore'}, 'gunicorn.access': {'handlers': ['console'], 'level': 'INFO', 'propagate': False, 'qualname': 'gunicorn.access'}, 'paste.httpserver.ThreadPool': {'level': 'WARN', 'qualname': 'paste.httpserver.ThreadPool'}, 'routes.middleware': {'level': 'WARN', 'qualname': 'routes.middleware'}, 'sqlalchemy_json.track': {'level': 'WARN', 'qualname': 'sqlalchemy_json.track'}, 'urllib3.connectionpool': {'level': 'WARN', 'qualname': 'urllib3.connectionpool'}, 'watchdog.observers.inotify_buffer': {'level': 'INFO', 'qualname': 'watchdog.observers.inotify_buffer'}}, 'root': {'handlers': ['console'], 'level': 'DEBUG'}, 'version': 1}

Default value for logging configuration, passed to logging.config.dictConfig()

galaxy.config.DEPENDENT_CONFIG_DEFAULTS: Dict[str, str] = {'biotools_service_cache_url': 'database_connection', 'citation_cache_url': 'database_connection', 'mulled_resolution_cache_url': 'database_connection'}

Config parameters whose default is the value of another config parameter This should be moved to a .yml config file.

galaxy.config.configure_logging(config, facts=None)[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_root(kwargs) str[source]
galaxy.config.expand_pretty_datetime_format(value)[source]
>>> expand_pretty_datetime_format("%H:%M:%S %Z")
'%H:%M:%S %Z'
>>> locale_format = expand_pretty_datetime_format("$locale (UTC)")
>>> import locale
>>> expected_format = '%s (UTC)' % locale.nl_langinfo(locale.D_T_FMT)
>>> locale_format == expected_format
True
>>> expand_pretty_datetime_format("$iso8601")
'%Y-%m-%d %H:%M:%S'
class galaxy.config.BaseAppConfiguration(**kwargs)[source]

Bases: object

renamed_options: Dict[str, str] | None = None
deprecated_dirs: Dict[str, str] = {}
paths_to_check_against_root: Set[str] = {}
add_sample_file_to_defaults: Set[str] = {}
listify_options: Set[str] = {}
object_store_store_by: str
shed_tools_dir: str
__init__(**kwargs)[source]
is_set(key)[source]

Check if a configuration option has been explicitly set.

resolve_path(path)[source]

Resolve a path relative to Galaxy’s root.

class galaxy.config.CommonConfigurationMixin[source]

Bases: object

Shared configuration settings code for Galaxy and ToolShed.

sentry_dsn: str
config_dict: Dict[str, str]
property admin_users
is_admin_user(user: User | None) bool[source]

Determine if the provided user is listed in admin_users.

property 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

get_bool(key, default)[source]
get(key, default=None)[source]
class galaxy.config.GalaxyAppConfiguration(**kwargs)[source]

Bases: BaseAppConfiguration, CommonConfigurationMixin

renamed_options: Dict[str, str] | None = {'activation_email': 'email_from', 'blacklist_file': 'email_domain_blocklist_file', 'containers_resolvers_config_file': 'container_resolvers_config_file', 'fetch_url_whitelist': 'fetch_url_allowlist', 'ga4gh_service_organization_name': 'organization_name', 'ga4gh_service_organization_url': 'organization_url', 'sanitize_whitelist_file': 'sanitize_allowlist_file', 'user_library_import_symlink_whitelist': 'user_library_import_symlink_allowlist', 'whitelist_file': 'email_domain_allowlist_file'}
deprecated_options = ['blacklist_file', 'whitelist_file', 'sanitize_whitelist_file', 'user_library_import_symlink_whitelist', 'fetch_url_whitelist', 'containers_resolvers_config_file', 'activation_email', 'ga4gh_service_organization_name', 'ga4gh_service_organization_url', 'database_file', 'track_jobs_in_database']
default_config_file_name = 'galaxy.yml'
deprecated_dirs: Dict[str, str] = {'config_dir': 'config', 'data_dir': 'database'}
paths_to_check_against_root: Set[str] = {'auth_config_file', 'build_sites_config_file', 'data_manager_config_file', 'datatypes_config_file', 'dependency_resolvers_config_file', 'error_report_file', 'file_path', 'job_config_file', 'job_metrics_config_file', 'job_resource_params_file', 'local_conda_mapping_file', 'markdown_export_css', 'markdown_export_css_invocation_reports', 'markdown_export_css_pages', 'migrated_tools_config', 'modules_mapping_files', 'object_store_config_file', 'oidc_backends_config_file', 'oidc_config_file', 'shed_data_manager_config_file', 'shed_tool_config_file', 'shed_tool_data_table_config', 'themes_config_file', 'tool_config_file', 'tool_data_table_config_path', 'tool_destinations_config_file', 'tool_sheds_config_file', 'user_preferences_extra_conf_path', 'workflow_resource_params_file', 'workflow_schedulers_config_file'}
add_sample_file_to_defaults: Set[str] = {'build_sites_config_file', 'datatypes_config_file', 'tool_config_file', 'tool_data_table_config_path'}
listify_options: Set[str] = {'tool_config_file', 'tool_data_table_config_path'}
allowed_origin_hostnames: List[str]
builds_file_path: str
container_resolvers_config_file: str
database_connection: str
drmaa_external_runjob_script: str
email_from: str | None
enable_tool_shed_check: bool
galaxy_data_manager_data_path: str
galaxy_infrastructure_url: str
hours_between_check: int
integrated_tool_panel_config: str
involucro_path: str
len_file_path: str
manage_dependency_relationships: bool
monitor_thread_join_timeout: int
mulled_channels: List[str]
new_file_path: str
nginx_upload_store: str
password_expiration_period: timedelta
preserve_python_environment: str
pretty_datetime_format: str
sanitize_allowlist_file: str
shed_tool_data_path: str
themes: Dict[str, Dict[str, str]]
themes_by_host: Dict[str, Dict[str, Dict[str, str]]]
tool_data_path: str
tool_dependency_dir: str | None
tool_filters: List[str]
tool_label_filters: List[str]
tool_path: str
tool_section_filters: List[str]
toolbox_filter_base_modules: List[str]
track_jobs_in_database: bool
trust_jupyter_notebook_conversion: bool
tus_upload_store: str
use_remote_user: bool
user_library_import_dir_auto_creation: bool
user_tool_filters: List[str]
user_tool_label_filters: List[str]
user_tool_section_filters: List[str]
visualization_plugins_directory: str
workflow_resource_params_mapper: str
__init__(**kwargs)[source]
config_value_for_host(config_option, host)[source]
reload_sanitize_allowlist(explicit=True)[source]
ensure_tempdir()[source]
check()[source]
is_fetch_with_celery_enabled()[source]

True iff celery is enabled and celery_conf[“task_routes”][“galaxy.fetch_data”] != DISABLED_FLAG.

galaxy.config.Configuration

alias of GalaxyAppConfiguration

galaxy.config.reload_config_options(current_config)[source]

Reload modified reloadable config options.

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”.

Submodules

galaxy.config.config_manage module

class galaxy.config.config_manage.App(config_paths, default_port, expected_app_factories, destination, schema_path)[source]

Bases: tuple

config_paths: List[str]

Alias for field number 0

default_port: str

Alias for field number 1

expected_app_factories: List[str]

Alias for field number 2

destination: str

Alias for field number 3

schema_path: Traversable

Alias for field number 4

property app_name: str
property sample_destination: str
property schema: AppSchema
class galaxy.config.config_manage.OptionValue(name, value, option)[source]

Bases: tuple

name: str

Alias for field number 0

value: Any

Alias for field number 1

option: Dict[str, Any]

Alias for field number 2

galaxy.config.config_manage.main(argv: List[str] | None = None) None[source]

Entry point for conversion process.

galaxy.config.schema module

class galaxy.config.schema.Schema(mapping)[source]

Bases: object

__init__(mapping)[source]
get_app_option(name)[source]
class galaxy.config.schema.AppSchema(schema_path: Traversable, app_name: str)[source]

Bases: Schema

__init__(schema_path: Traversable, app_name: str)[source]
property defaults
property paths_to_resolve
property reloadable_options
property per_host_options
validate_path_resolution_graph()[source]

This method is for tests only: we SHOULD validate the schema’s path resolution graph as part of automated testing; but we should NOT validate it at runtime.

galaxy.config.script module

galaxy.config.script.main(argv=None)[source]