1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f25e90163bbd/
Changeset: f25e90163bbd
User: martenson
Date: 2014-10-22 21:55:45+00:00
Summary: updated sphinx documentation: added managers; added new API controllers; cleanup
Affected #: 4 files
diff -r 7c66e468c6024b2e17a70ffadae0ad080b174c68 -r f25e90163bbd16626ce9adf7854ff493c79b469d doc/source/conf.py
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import sys, os, datetime
####### REQUIRED GALAXY INCLUDES
@@ -40,7 +40,7 @@
templates_path = ['_templates']
#configure default autodoc's action
-autodoc_default_flags = ['members', 'undoc-members']
+autodoc_default_flags = [ 'members', 'undoc-members', 'show-inheritance' ]
# The suffix of source filenames.
source_suffix = '.rst'
@@ -53,7 +53,7 @@
# General information about the project.
project = u'Galaxy Code'
-copyright = u'2012, Galaxy Team'
+copyright = str( datetime.datetime.now().year ) + u', Galaxy Team'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
diff -r 7c66e468c6024b2e17a70ffadae0ad080b174c68 -r f25e90163bbd16626ce9adf7854ff493c79b469d doc/source/lib/galaxy.managers.rst
--- /dev/null
+++ b/doc/source/lib/galaxy.managers.rst
@@ -0,0 +1,92 @@
+managers Package
+==================
+
+:mod:`managers` Package
+-------------------------
+
+.. automodule:: galaxy.managers
+
+
+:mod:`api_keys` Module
+------------------------------
+
+.. automodule:: galaxy.managers.api_keys
+
+
+:mod:`base` Module
+------------------------------
+
+.. automodule:: galaxy.managers.base
+
+
+:mod:`citations` Module
+------------------------------
+
+.. automodule:: galaxy.managers.citations
+
+
+:mod:`collections` Module
+------------------------------
+
+.. automodule:: galaxy.managers.collections
+
+
+:mod:`collections_util` Module
+------------------------------
+
+.. automodule:: galaxy.managers.collections_util
+
+
+:mod:`context` Module
+------------------------------
+
+.. automodule:: galaxy.managers.context
+
+
+:mod:`folders` Module
+------------------------------
+
+.. automodule:: galaxy.managers.folders
+
+
+:mod:`hdas` Module
+------------------------------
+
+.. automodule:: galaxy.managers.hdas
+
+
+:mod:`histories` Module
+------------------------------
+
+.. automodule:: galaxy.managers.histories
+
+
+:mod:`lddas` Module
+------------------------------
+
+.. automodule:: galaxy.managers.lddas
+
+
+:mod:`libraries` Module
+------------------------------
+
+.. automodule:: galaxy.managers.libraries
+
+
+:mod:`roles` Module
+------------------------------
+
+.. automodule:: galaxy.managers.roles
+
+
+:mod:`tags` Module
+------------------------------
+
+.. automodule:: galaxy.managers.tags
+
+
+:mod:`workflows` Module
+------------------------------
+
+.. automodule:: galaxy.managers.workflows
+ :undoc-members:
diff -r 7c66e468c6024b2e17a70ffadae0ad080b174c68 -r f25e90163bbd16626ce9adf7854ff493c79b469d doc/source/lib/galaxy.rst
--- a/doc/source/lib/galaxy.rst
+++ b/doc/source/lib/galaxy.rst
@@ -38,6 +38,7 @@
galaxy.forms
galaxy.jobs
galaxy.model
+ galaxy.managers
galaxy.objectstore
galaxy.openid
galaxy.quota
@@ -51,4 +52,3 @@
galaxy.web
galaxy.webapps
galaxy.workflow
-
diff -r 7c66e468c6024b2e17a70ffadae0ad080b174c68 -r f25e90163bbd16626ce9adf7854ff493c79b469d doc/source/lib/galaxy.webapps.galaxy.api.rst
--- a/doc/source/lib/galaxy.webapps.galaxy.api.rst
+++ b/doc/source/lib/galaxy.webapps.galaxy.api.rst
@@ -3,16 +3,16 @@
Background
==========
-In addition to being accessible through a web interface, Galaxy can now also be
+In addition to being accessible through a web interface, Galaxy can also be
accessed programmatically, through shell scripts and other programs. The web
interface is appropriate for things like exploratory analysis, visualization,
construction of workflows, and rerunning workflows on new datasets.
The web interface is less suitable for things like
- Connecting a Galaxy instance directly to your sequencer and running
- workflows whenever data is ready
+ workflows whenever data is ready.
- Running a workflow against multiple datasets (which can be done with the
- web interface, but is tedious)
+ web interface, but is tedious).
- When the analysis involves complex control, such as looping and
branching.
@@ -132,7 +132,7 @@
description: API Test Library
name: api_test
- % ./display.py my_key http://localhost:4096/api/libraries/f3f73e481f432006/contents
+ % ./display.py my_key http://localhost:4096/api/libraries/f3f73e481f432006/contents
Collection Members
------------------
/api/libraries/f3f73e481f432006/contents/28202595c0d2591f61ddda595d2c3670
@@ -205,208 +205,6 @@
The request and response format should be considered alpha and are subject to change.
-API Return Codes and Formats
-==================
-
-A set of error codes for API requests is being established and will be
-documented here. This is a long-term project however so stayed tuned.
-
-API Controllers
-===============
-
-:mod:`datasets` Module
-----------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.datasets
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`folder_contents` Module
------------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.folder_contents
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`folders` Module
----------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.folders
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`forms` Module
--------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.forms
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`genomes` Module
----------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.genomes
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`group_roles` Module
--------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.group_roles
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`group_users` Module
--------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.group_users
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`groups` Module
---------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.groups
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`histories` Module
------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.histories
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`history_contents` Module
-------------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.history_contents
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`item_tags` Module
------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.item_tags
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`lda_datasets` Module
---------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.lda_datasets
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`libraries` Module
------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.libraries
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`library_contents` Module
-------------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.library_contents
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`permissions` Module
--------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.permissions
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`quotas` Module
---------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.quotas
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`request_types` Module
----------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.request_types
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`requests` Module
-----------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.requests
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`roles` Module
--------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.roles
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`samples` Module
----------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.samples
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`tools` Module
--------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.tools
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`users` Module
--------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.users
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`visualizations` Module
-----------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.visualizations
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`workflows` Module
------------------------
-
-.. automodule:: galaxy.webapps.galaxy.api.workflows
- :members:
- :undoc-members:
- :show-inheritance:
-
-
API Design Guidelines
=====================
@@ -418,26 +216,34 @@
- API functionality should include docstring documentation for consumption
by readthedocs.org.
- - Developers should familarize themselves with the HTTP status code definitions
+ - Developers should familiarize themselves with the HTTP status code definitions
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. The API responses
should properly set the status code according to the result - in particular
2XX responses should be used for successful requests, 4XX for various
- kinds of client errors, and 5XX for errors on the server side.
+ kinds of client errors, and 5XX for the errors on the server side.
- If there is an error processing some part of request (one item in a list
for instance), the status code should be set to reflect the error and the
partial result may or may not be returned depending on the controller -
this behavior should be documented.
- - (TODO) API methods should throw a finite number of exceptions (defined in)
- `galaxy.exceptions` and these should subclass `MessageException` and not
- paste/wsgi HTTP exceptions. When possible, the framework itself should be
- responsible catching these exceptions, setting the status code, and
- building an error response.
+ - API methods should throw a finite number of exceptions
+ (defined in :doc:`galaxy.exceptions`) and these should subclass
+ `MessageException` and not paste/wsgi HTTP exceptions. When possible,
+ the framework itself should be responsible catching these exceptions,
+ setting the status code, and building an error response.
- Error responses should not consist of plain text strings - they should be
- dictionaries describing the error and containing the following keys (TODO:
- spell out nature of this.) Various error conditions (once a format has
- been chosen and framework to enforce it in place) should be spelled out
- in this document.
- - Backward compatibility is important and should maintained when possible.
+ dictionaries describing the error and containing the following::
+
+ {
+ "status_code": 400,
+ "err_code": 400007,
+ "err_msg": "Request contained invalid parameter, action could not be completed.",
+ "type": "error",
+ "extra_error_info": "Extra information."
+ }
+
+ Various error conditions (once a format has been chosen and framework to
+ enforce it in place) should be spelled out in this document.
+ - Backward compatibility is important and should be maintained when possible.
If changing behavior in a non-backward compatibile way please ensure one
of the following holds - there is a strong reason to believe no consumers
depend on a behavior, the behavior is effectively broken, or the API
@@ -448,7 +254,8 @@
- Functionality should not be copied and pasted between controllers -
consider refactoring functionality into associated classes or short of
- that into Mixins (http://en.wikipedia.org/wiki/Composition_over_inheritance).
+ that into Mixins (http://en.wikipedia.org/wiki/Composition_over_inheritance)
+ or into Managers (:doc:`galaxy.managers`).
- API additions are more permanent changes to Galaxy than many other potential
changes and so a second opinion on API changes should be sought. (Consider a
pull request!)
@@ -457,16 +264,252 @@
`test/functional/api`. (Once such a framework is in place - it is not
right now).
- Changes to reflect modifications to the API should be pushed upstream to
- the BioBlend project possible.
+ the BioBlend project if possible.
Longer term goals/notes.
- It would be advantageous to have a clearer separation of anonymous and
admin handling functionality.
- If at some point in the future, functionality needs to be added that
- breaks backward compatibility in a significant way to a compontent used by
- the community should be alerted - a "dev" variant of the API will be
- established and the community should be alerted and given a timeframe
- for when the old behavior will be replaced with the new behavior.
+ breaks backward compatibility in a significant way to a component used by
+ the community - a "dev" variant of the API will be established and
+ the community should be alerted and given a timeframe for when the old
+ behavior will be replaced with the new behavior.
- Consistent standards for range-based requests, batch requests, filtered
requests, etc... should be established and documented here.
+
+API Controllers
+===============
+
+Galaxy offers the following API controllers:
+
+:mod:`annotations` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.annotations
+
+:mod:`authenticate` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.authenticate
+
+:mod:`configuration` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.configuration
+
+:mod:`dataset_collections` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.dataset_collections
+
+
+:mod:`datasets` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.datasets
+
+
+:mod:`datatypes` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.datatypes
+
+
+:mod:`extended_metadata` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.extended_metadata
+
+
+:mod:`folder_contents` Module
+-----------------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.folder_contents
+
+
+:mod:`folders` Module
+---------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.folders
+
+
+:mod:`forms` Module
+-------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.forms
+
+
+:mod:`ftp_files` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.ftp_files
+
+
+:mod:`genomes` Module
+---------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.genomes
+
+
+:mod:`group_roles` Module
+-------------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.group_roles
+
+
+:mod:`group_users` Module
+-------------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.group_users
+
+
+:mod:`groups` Module
+--------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.groups
+
+
+:mod:`histories` Module
+-----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.histories
+
+
+:mod:`history_contents` Module
+------------------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.history_contents
+
+
+:mod:`item_tags` Module
+-----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.item_tags
+
+
+:mod:`job_files` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.job_files
+
+
+:mod:`jobs` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.jobs
+
+
+:mod:`lda_datasets` Module
+--------------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.lda_datasets
+
+
+:mod:`libraries` Module
+-----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.libraries
+
+
+:mod:`library_contents` Module
+------------------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.library_contents
+
+
+:mod:`metrics` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.metrics
+
+
+:mod:`page_revisions` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.page_revisions
+
+
+:mod:`pages` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.pages
+
+
+:mod:`provenance` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.provenance
+
+
+:mod:`quotas` Module
+--------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.quotas
+
+
+:mod:`request_types` Module
+---------------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.request_types
+
+
+:mod:`requests` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.requests
+
+
+:mod:`roles` Module
+-------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.roles
+
+
+:mod:`samples` Module
+---------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.samples
+
+
+:mod:`search` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.search
+
+
+:mod:`tool_data` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.tool_data
+
+
+:mod:`tool_shed_repositories` Module
+----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.tool_shed_repositories
+
+
+:mod:`tools` Module
+-------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.tools
+
+
+:mod:`users` Module
+-------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.users
+
+
+:mod:`visualizations` Module
+----------------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.visualizations
+
+
+:mod:`workflows` Module
+-----------------------
+
+.. automodule:: galaxy.webapps.galaxy.api.workflows
+
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/7c66e468c602/
Changeset: 7c66e468c602
User: martenson
Date: 2014-10-22 18:08:57+00:00
Summary: data libs API documentation
Affected #: 1 file
diff -r 2fd74c3386c8934297d2b85249539a17353d8269 -r 7c66e468c6024b2e17a70ffadae0ad080b174c68 lib/galaxy/webapps/galaxy/api/lda_datasets.py
--- a/lib/galaxy/webapps/galaxy/api/lda_datasets.py
+++ b/lib/galaxy/webapps/galaxy/api/lda_datasets.py
@@ -370,8 +370,8 @@
:param encoded_dataset_id: the encoded id of the dataset to change
:type encoded_dataset_id: an encoded id string
+ :returns: dict containing information about the dataset
:rtype: dictionary
- :returns: dict containing information about the dataset
"""
undelete = util.string_as_bool( kwd.get( 'undelete', False ) )
try:
@@ -400,16 +400,34 @@
@expose_api
def load( self, trans, **kwd ):
"""
- Load dataset from the given source into the library.
+ load( self, trans, **kwd ):
+ * POST /api/libraries/datasets
+ Load dataset from the given source into the library.
+ Source can be:
+ user directory - root folder specified in galaxy.ini as "$user_library_import_dir"
+ example path: path/to/galaxy/$user_library_import_dir/user(a)example.com/{user can browse everything here}
+ the folder with the user login has to be created beforehand
+ (admin)import directory - root folder specified in galaxy ini as "$library_import_dir"
+ example path: path/to/galaxy/$library_import_dir/{admin can browse everything here}
+ (admin)any absolute or relative path - option allowed with "allow_library_path_paste" in galaxy.ini
+
+ :param encoded_folder_id: the encoded id of the folder to import dataset(s) to
+ :type encoded_folder_id: an encoded id string
+ :param source: source the datasets should be loaded form
+ :type source: str
+ :param link_data: flag whether to link the dataset to data or copy it to Galaxy, defaults to copy
+ while linking is set to True all symlinks will be resolved _once_
+ :type link_data: bool
+ :param preserve_dirs: flag whether to preserve the directory structure when importing dir
+ if False only datasets will be imported
+ :type preserve_dirs: bool
+ :param file_type: file type of the loaded datasets, defaults to 'auto' (autodetect)
+ :type file_type: str
+ :param dbkey: dbkey of the loaded genome, defaults to '?' (unknown)
+ :type dbkey: str
- :param encoded_folder_id: the encoded id of the folder to import dataset to
- :type encoded_folder_id: an encoded id string
- :param source: source of the dataset to be loaded
- :type source: str
- :param link_data: flag whether to link the dataset to data or copy it to Galaxy
- :type link_data: bool
- :param preserve_dirs: flag whether to preserver directory structure when importing dir
- :type preserve_dirs: bool
+ :returns: dict containing information about the created upload job
+ :rtype: dictionary
"""
kwd[ 'space_to_tab' ] = 'False'
@@ -443,9 +461,7 @@
if user_base_dir is None:
raise exceptions.ConfigDoesNotAllowException( 'The configuration of this Galaxy instance does not allow upload from user directories.' )
full_dir = os.path.join( user_base_dir, user_login )
- # path_to_root_import_folder = None
if not path.lower().startswith( full_dir.lower() ):
- # path_to_root_import_folder = path
path = os.path.join( full_dir, path )
if not os.path.exists( path ):
raise exceptions.RequestParameterInvalidException( 'Given path does not exist on the host.' )
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/28a24d7d3e84/
Changeset: 28a24d7d3e84
User: jmchilton
Date: 2014-10-21 16:32:57+00:00
Summary: Require pyyaml egg before using.
Thanks @natefoo.
Affected #: 1 file
diff -r 70f7ff8c6a96ede6e439beb62d64152cc5ad2b04 -r 28a24d7d3e84e5c9ce7af1dd92f7a89d83159703 lib/galaxy/web/base/interactive_environments.py
--- a/lib/galaxy/web/base/interactive_environments.py
+++ b/lib/galaxy/web/base/interactive_environments.py
@@ -6,6 +6,8 @@
from galaxy.util.bunch import Bunch
from galaxy import web
+from galaxy import eggs
+eggs.require("PyYAML")
import yaml
from galaxy.managers import api_keys
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d1e1beeb5322/
Changeset: d1e1beeb5322
Branch: stable
User: natefoo
Date: 2014-10-21 13:00:16+00:00
Summary: Update tag latest_2014.10.06 for changeset a7b2aabb27ff
Affected #: 1 file
diff -r a7b2aabb27ffe5cc3216774ab01b18f13b4fc941 -r d1e1beeb532239250396dd8fbdc0156508c6744e .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -20,4 +20,4 @@
ca45b78adb4152fc6e7395514d46eba6b7d0b838 release_2014.08.11
548ab24667d6206780237bd807f7d857a484c461 latest_2014.08.11
2092948937ac30ef82f71463a235c66d34987088 release_2014.10.06
-e1404e285ccb9e52bd09c5827934cd0da1974acc latest_2014.10.06
+a7b2aabb27ffe5cc3216774ab01b18f13b4fc941 latest_2014.10.06
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.