Commit Graph
12 Commits
Author SHA1 Message Date
Dannon Baker 623a5e165a Apply black formatting.
Apply isort.
2022-02-03 07:42:20 -05:00
Nicola Soranzo 9d74bba7fb Drop support for retired Python 3.5
Upgrade syntax using `pyupgrade --py36-plus` .

Manually drop several `six` imports.

Also:
- Remove broken pr_cache in scripts/bootstrap_history.py
- Fix broken prefix removal in lib/galaxy/tool_util/deps/mulled/mulled_build.py
2020-10-07 11:52:13 +01:00
Nicola Soranzo 21b44bf348 Fix all E201 and E202 style errors
using the following command:
```
autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E201,E202 .
```
2017-08-17 11:35:39 +01:00
Nicola Soranzo 3d57c22b63 Fix I201 errors from flake8-import-order
Also fix Python3 compatibility.
Remove unused method
galaxy.tools.parameters.sanitize.ToolParameterSanitizer.restore_param() .
2016-11-23 18:31:04 +00:00
Junzhou Wang e45f8abb54 Python3:script/api/ 2016-06-25 20:49:06 -04:00
Nicola Soranzo d85db9daa6 Use __file__ when adding paths to sys.path instead of os.getcwd() .
Also insert additional paths in position 1 unless strictly necessary.
2016-02-18 15:45:15 +00:00
Nicola Soranzo 93348e7199 Fix the remaining 1334 flake8 errors in scripts/ . Close #391. 2016-02-18 15:45:15 +00:00
Scott McManus a0afee842e Re-commit new /api/folders section 2012-10-15 18:09:25 -04:00
Scott McManus 0148eabc72 Backout 2012-10-15 17:53:37 -04:00
Scott McManus 954e96fc34 Added /api/folders. The api_folders configuration variable controls access to it (and is False by default). 2012-10-15 17:29:29 -04:00
Nate Coraor cce1848d5e Use env for the API example scripts instead of directly referring to /usr/bin/python 2010-07-29 11:18:15 -04:00
Nate Coraor 5eb9ca909f Initial implementation of the Galaxy Web API. Disabled unless
'enable_api = True' in config file.  You should not enable the API on
production sites as this code is brand new and may contain serious bugs and
security flaws!  Implemented:

* Display libraries
* Display library info
* Display library contents
* Display library content info
* Create library folders
* Upload datasets to a library from a server directory or with a path paste.
* Basic example scripts in scripts/api/

Framework changes that were made to support this:

* API Key interface in User Preferences.
* New api_keys database table for storing users' API Keys.
* New API-specific route mapper in webapp.
* API controllers in galaxy.web.api
* Return handling in reused library_common methods.
* expose_api decorator for API controller methods validates key and ensures
  valid JSON format.
* UniverseWebTransaction renamed to GalaxyWebTransaction and subclassed for
  GalaxyWebUITransaction and GalaxyWebAPITransaction.

Things that need to be done next:

* Documentation!
* Refactor reused code from library_common and other controllers into an
  even-more-generic location and format.  The main changes are that the Web UI
  returns redirects and rendered templates, whereas the API returns various
  HTTP status codes and JSON.
* Implement more functionality.
* The request and response format should be considered alpha and are subject to
  change.  They will be standardized as the API matures.

Hints to get started can be found in scripts/api/README
2010-06-22 13:10:28 -04:00