1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/8376ad08ae41/ changeset: 8376ad08ae41 user: jgoecks date: 2012-04-11 20:45:44 summary: Remove enable_api flag; API is now enabled by default and cannot be disabled. affected #: 9 files diff -r bb7f51fb545d0517eeceb902fa83dc5a659c64df -r 8376ad08ae41b9b7efa06622b031cb731e2c0bcf lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -42,8 +42,6 @@ tempfile.tempdir = self.new_file_path self.openid_consumer_cache_path = resolve_path( kwargs.get( "openid_consumer_cache_path", "database/openid_consumer_cache" ), self.root ) self.cookie_path = kwargs.get( "cookie_path", "/" ) - # web API - self.enable_api = string_as_bool( kwargs.get( 'enable_api', False ) ) # Galaxy OpenID settings self.enable_openid = string_as_bool( kwargs.get( 'enable_openid', False ) ) self.openid_config = kwargs.get( 'openid_config_file', 'openid_conf.xml' ) diff -r bb7f51fb545d0517eeceb902fa83dc5a659c64df -r 8376ad08ae41b9b7efa06622b031cb731e2c0bcf lib/galaxy/web/buildapp.py --- a/lib/galaxy/web/buildapp.py +++ b/lib/galaxy/web/buildapp.py @@ -103,37 +103,37 @@ webapp.add_route( '/u/:username/h/:slug', controller='history', action='display_by_username_and_slug' ) webapp.add_route( '/u/:username/w/:slug', controller='workflow', action='display_by_username_and_slug' ) webapp.add_route( '/u/:username/v/:slug', controller='visualization', action='display_by_username_and_slug' ) - # If enabled, add the web API - if asbool( kwargs.get( 'enable_api', False ) ): - add_api_controllers( webapp, app ) - webapp.api_mapper.resource( 'content', - 'contents', - controller='library_contents', - name_prefix='library_', - path_prefix='/api/libraries/:library_id', - parent_resources=dict( member_name='library', collection_name='libraries' ) ) - webapp.api_mapper.resource( 'content', - 'contents', - controller='history_contents', - name_prefix='history_', - path_prefix='/api/histories/:history_id', - parent_resources=dict( member_name='history', collection_name='histories' ) ) - webapp.api_mapper.resource( 'permission', - 'permissions', - path_prefix='/api/libraries/:library_id', - parent_resources=dict( member_name='library', collection_name='libraries' ) ) - webapp.api_mapper.resource( 'library', 'libraries', path_prefix='/api' ) - webapp.api_mapper.resource( 'sample', 'samples', path_prefix='/api' ) - webapp.api_mapper.resource( 'request', 'requests', path_prefix='/api' ) - webapp.api_mapper.resource( 'form', 'forms', path_prefix='/api' ) - webapp.api_mapper.resource( 'request_type', 'request_types', path_prefix='/api' ) - webapp.api_mapper.resource( 'role', 'roles', path_prefix='/api' ) - webapp.api_mapper.resource_with_deleted( 'quota', 'quotas', path_prefix='/api' ) - webapp.api_mapper.resource( 'tool', 'tools', path_prefix='/api' ) - webapp.api_mapper.resource_with_deleted( 'user', 'users', path_prefix='/api' ) - webapp.api_mapper.resource( 'workflow', 'workflows', path_prefix='/api' ) - webapp.api_mapper.resource_with_deleted( 'history', 'histories', path_prefix='/api' ) - #webapp.api_mapper.connect( 'run_workflow', '/api/workflow/{workflow_id}/library/{library_id}', controller='workflows', action='run', workflow_id=None, library_id=None, conditions=dict(method=["GET"]) ) + + # Add the web API + add_api_controllers( webapp, app ) + webapp.api_mapper.resource( 'content', + 'contents', + controller='library_contents', + name_prefix='library_', + path_prefix='/api/libraries/:library_id', + parent_resources=dict( member_name='library', collection_name='libraries' ) ) + webapp.api_mapper.resource( 'content', + 'contents', + controller='history_contents', + name_prefix='history_', + path_prefix='/api/histories/:history_id', + parent_resources=dict( member_name='history', collection_name='histories' ) ) + webapp.api_mapper.resource( 'permission', + 'permissions', + path_prefix='/api/libraries/:library_id', + parent_resources=dict( member_name='library', collection_name='libraries' ) ) + webapp.api_mapper.resource( 'library', 'libraries', path_prefix='/api' ) + webapp.api_mapper.resource( 'sample', 'samples', path_prefix='/api' ) + webapp.api_mapper.resource( 'request', 'requests', path_prefix='/api' ) + webapp.api_mapper.resource( 'form', 'forms', path_prefix='/api' ) + webapp.api_mapper.resource( 'request_type', 'request_types', path_prefix='/api' ) + webapp.api_mapper.resource( 'role', 'roles', path_prefix='/api' ) + webapp.api_mapper.resource_with_deleted( 'quota', 'quotas', path_prefix='/api' ) + webapp.api_mapper.resource( 'tool', 'tools', path_prefix='/api' ) + webapp.api_mapper.resource_with_deleted( 'user', 'users', path_prefix='/api' ) + webapp.api_mapper.resource( 'workflow', 'workflows', path_prefix='/api' ) + webapp.api_mapper.resource_with_deleted( 'history', 'histories', path_prefix='/api' ) + #webapp.api_mapper.connect( 'run_workflow', '/api/workflow/{workflow_id}/library/{library_id}', controller='workflows', action='run', workflow_id=None, library_id=None, conditions=dict(method=["GET"]) ) webapp.finalize_config() # Wrap the webapp in some useful middleware diff -r bb7f51fb545d0517eeceb902fa83dc5a659c64df -r 8376ad08ae41b9b7efa06622b031cb731e2c0bcf lib/galaxy/web/controllers/requests_admin.py --- a/lib/galaxy/web/controllers/requests_admin.py +++ b/lib/galaxy/web/controllers/requests_admin.py @@ -625,9 +625,6 @@ or not scp_configs.get( 'user_name', '' ) \ or not scp_configs.get( 'password', '' ): err_msg += "Error in external service login information. " - # Make sure web API is enabled and API key exists - if not trans.app.config.enable_api: - err_msg += "The 'enable_api = True' setting is not correctly set in the Galaxy config file. " if not trans.user.api_keys: err_msg += "Set your API Key in your User Preferences to transfer datasets. " # Check if library_import_dir is set diff -r bb7f51fb545d0517eeceb902fa83dc5a659c64df -r 8376ad08ae41b9b7efa06622b031cb731e2c0bcf lib/galaxy/webapps/community/config.py --- a/lib/galaxy/webapps/community/config.py +++ b/lib/galaxy/webapps/community/config.py @@ -39,8 +39,6 @@ self.file_path = resolve_path( kwargs.get( "file_path", "database/files" ), self.root ) self.new_file_path = resolve_path( kwargs.get( "new_file_path", "database/tmp" ), self.root ) self.cookie_path = kwargs.get( "cookie_path", "/" ) - # web API - self.enable_api = string_as_bool( kwargs.get( 'enable_api', False ) ) self.enable_quotas = string_as_bool( kwargs.get( 'enable_quotas', False ) ) self.datatypes_config = kwargs.get( 'datatypes_config_file', 'datatypes_conf.xml' ) self.test_conf = resolve_path( kwargs.get( "test_conf", "" ), self.root ) diff -r bb7f51fb545d0517eeceb902fa83dc5a659c64df -r 8376ad08ae41b9b7efa06622b031cb731e2c0bcf scripts/api/README --- a/scripts/api/README +++ b/scripts/api/README @@ -3,7 +3,6 @@ Set these options in universe_wsgi.ini and start the server: -enable_api = True admin_users = you@example.org library_import_dir = /path/to/some/directory diff -r bb7f51fb545d0517eeceb902fa83dc5a659c64df -r 8376ad08ae41b9b7efa06622b031cb731e2c0bcf templates/user/index.mako --- a/templates/user/index.mako +++ b/templates/user/index.mako @@ -12,9 +12,7 @@ %if webapp == 'galaxy': <li><a href="${h.url_for( controller='user', action='manage_user_info', cntrller=cntrller, webapp=webapp )}">${_('Manage your information')}</a></li><li><a href="${h.url_for( controller='user', action='set_default_permissions', cntrller=cntrller, webapp=webapp )}">${_('Change default permissions')}</a> for new histories</li> - %if trans.app.config.enable_api: - <li><a href="${h.url_for( controller='user', action='api_keys', cntrller=cntrller, webapp=webapp )}">${_('Manage your API keys')}</a></li> - %endif + <li><a href="${h.url_for( controller='user', action='api_keys', cntrller=cntrller, webapp=webapp )}">${_('Manage your API keys')}</a></li> %if trans.app.config.enable_openid: <li><a href="${h.url_for( controller='user', action='openid_manage', cntrller=cntrller, webapp=webapp )}">${_('Manage OpenIDs')}</a> linked to your account</li> %endif diff -r bb7f51fb545d0517eeceb902fa83dc5a659c64df -r 8376ad08ae41b9b7efa06622b031cb731e2c0bcf templates/webapps/galaxy/base_panels.mako --- a/templates/webapps/galaxy/base_panels.mako +++ b/templates/webapps/galaxy/base_panels.mako @@ -166,8 +166,7 @@ menu_options.append( [ _('Saved Datasets'), h.url_for( controller='/dataset', action='list' ), "galaxy_main" ] ) if app.config.get_bool( 'enable_pages', False ): menu_options.append( [ _('Saved Pages'), h.url_for( controller='/page', action='list' ), "_top" ] ) - if app.config.enable_api: - menu_options.append( [ _('API Keys'), h.url_for( controller='/user', action='api_keys', cntrller='user', webapp='galaxy' ), "galaxy_main" ] ) + menu_options.append( [ _('API Keys'), h.url_for( controller='/user', action='api_keys', cntrller='user', webapp='galaxy' ), "galaxy_main" ] ) if app.config.use_remote_user: menu_options.append( [ _('Public Name'), h.url_for( controller='/user', action='edit_username', cntrller='user', webapp='galaxy' ), "galaxy_main" ] ) diff -r bb7f51fb545d0517eeceb902fa83dc5a659c64df -r 8376ad08ae41b9b7efa06622b031cb731e2c0bcf test/functional/test_sample_tracking.py --- a/test/functional/test_sample_tracking.py +++ b/test/functional/test_sample_tracking.py @@ -853,7 +853,7 @@ sample_dataset_ids = [ self.security.encode_id( dataset.id ) for dataset in request1_sample1.datasets ] strings_displayed = [ 'Manage "%s" datasets' % request1_sample1.name ] strings_displayed_count = [ ( galaxy.model.SampleDataset.transfer_status.NOT_STARTED, len( request1_sample1.datasets ) ) ] - strings_displayed_after_submit = [ "Error in sequencer login information. The 'enable_api = True' setting is not correctly set in the Galaxy config file. Set your API Key in your User Preferences to transfer datasets." ] + strings_displayed_after_submit = [ "Error in sequencer login information. Please set your API Key in your User Preferences to transfer datasets." ] strings_not_displayed = [ galaxy.model.SampleDataset.transfer_status.IN_QUEUE, galaxy.model.SampleDataset.transfer_status.TRANSFERRING, galaxy.model.SampleDataset.transfer_status.ADD_TO_LIBRARY, diff -r bb7f51fb545d0517eeceb902fa83dc5a659c64df -r 8376ad08ae41b9b7efa06622b031cb731e2c0bcf universe_wsgi.ini.sample --- a/universe_wsgi.ini.sample +++ b/universe_wsgi.ini.sample @@ -504,9 +504,6 @@ #enable_openid = False #openid_config_file = openid_conf.xml -# Enable the (experimental! beta!) Web API. Documentation forthcoming. -#enable_api = False - # Optional list of email addresses of API users who can make calls on behalf of # other users #api_allow_run_as = None Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.