Commit Graph
27 Commits
Author SHA1 Message Date
Nicola Soranzo 26a4e146e0 Fix UP031 errors
reported by ruff 0.8.0 .
2024-11-24 21:35:23 +00:00
Nicola Soranzo 0629908541 Fix new UP031 errors from ruff 0.4.2 2024-04-29 00:09:38 +01:00
Nicola Soranzo d258e5791e Fix new E721 errors from ruff 0.0.290 2023-09-20 01:43:40 +01:00
mvdbeek 130d2b078e Update and apply ruff refactorings
ruff 0.280.0 has a bug that would turn the imports guarded by `if
TYPE_CHECKING` into their non-string variant, which would break the
runtime. So we can't merge 23.1 into dev without this.
2023-08-09 17:14:07 +02:00
Dannon Baker 623a5e165a Apply black formatting.
Apply isort.
2022-02-03 07:42:20 -05:00
Nicola Soranzo 90a729e431 New pyupgrade fixes
Found by running `ack --type=python -f | grep -v '^tools/' | xargs pyupgrade --py36-plus`
2021-10-24 12:10:34 +01:00
Sergey Golitsynskiy 66d2d4b40e Fix printing non-dict output 2021-02-02 16:04:44 -05:00
Sergey Golitsynskiy 211b5d599e Fix bug: i can be str, not dict
Example cause: api/datatypes endpoint returns a list of strings
2021-01-21 22:09:30 -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 f5cd88465e Make str.join()s more efficient
by using generator expressions and tuples instead of lists.
2020-01-23 11:06:32 +00:00
Nicola Soranzo d66a63012a Replace unmaintained pycrypto dependency with pycryptodome
Minimum secret key length for Blowfish was increased from 4 to 5 bytes.

First argument to Blowfish.new() must be a bytestring, and the `mode`
argument is no more optional.

Remove unused `encode_id` function from `scripts/api/common.py` .

Documentation updated, then rebuilt with `make config-rebuild` .
2018-06-13 03:07:04 +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 196d174716 Python 3 support for 3 files. 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
Nate Coraor 0469ed29e0 Remove egg cruft from scripts/ 2015-09-21 15:55:07 -04:00
Nicola Soranzo 34d9388456 Use os.pardir everywhere instead of '..' . 2015-07-14 16:20:29 +01:00
Martin Cech 508b685c70 fix common API scripts so they dont fail when response has no url param 2015-06-15 16:12:21 -04:00
Dannon Baker e26d6e56c7 Tweaks to scripts/api/common.py to fix JSONDecodeError removal and clean up code. 2014-01-15 09:05:38 -05:00
Dannon Baker 559ecb4ec8 Remove dependency on simplejson; convert everything over to using the json module in the python standard library. 2014-01-10 07:29:05 -05:00
Greg Von Kuster b9c6df9d91 Add baseline cupport for installing tool shed repositories from a specified tool shed into Galaxy via a combination of the tool shed API and the now enhanced Galaxy API. There are 3 new example scripts in ~/scripts/api that demonstrate how this works. The are named like: install_repository...
In this implementation, all tools contained in repositories will be loaded into the Galaxy tool panel.

The user can specify the following when sending a POST to the new Galaxy API URL:
/api/tool_shed_repositories/new/install_repository_revision

1) an existing tool panel section id for loading tools or a new tool panel section label in which case a new ToolPanelSection will be created for containing the tools.
2) if they want tool dependencies installed along with the repository.
3) if they want repository dependencies installed along with the repository
4) which defined shed-related tool panel config file to use for installed tools
2013-03-25 17:05:14 -04:00
Nate Coraor 4fe140d6d6 Missing import in library_contents.py 2011-08-29 14:42:04 -04:00
Daniel Blankenberg 7b7453366f Initial pass on API for forms, request_type, users and roles.
Additional effort is needed to abstract more previously existing functionality out of web controllers.

Add script that is able to create a sequencer configuration for the sample tracking system using API.
2010-12-02 16:04:34 -05:00
Ramkrishna Chakrabarty 7d8a5c650a Improved error handling in api methods. 2010-11-07 22:18:22 -05:00
Ramkrishna Chakrabarty d5d27b67ad adding setup_rabbitmq.sh script.
web api minor code fixes
2010-10-27 12:36:56 -04:00
Ramkrishna Chakrabarty 6a9ab2813a sample_tracking:
- added web api methods to update requests, samples using restful api
- removed the old ad-doc web api
- modified the data transfer code to use this api
- code cleanup
2010-10-26 10:00:23 -04:00
Kanwei Li 0fbab45d14 trackster: Inline editing of configuration and removing of tracks, obsoleting the right editing panel. Improved appearance of overview box by adding a background for the scroll bar, and having a sliding window to indicate region shown. Added id numbers in front of API results for upcoming interactive script. 2010-09-23 20:00:58 -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