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
d26b3d9848
Fix all E203, E741 and W504 flake8 errors
2021-01-18 10:35:41 +00:00
Nicola Soranzo
452aba9ee3
Fix remaining issues reported by bugbear; add it to flake8 reqs
2021-01-16 05:58:15 +00: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
d53112aa43
Use `yaml.safe_load() instead of load()`
...
See https://msg.pyyaml.org/load
2019-04-23 16:50:55 +01:00
Nicola Soranzo
0c931235af
Change all remaining old-style classes to new style
2018-09-17 12:26:07 +01:00
Nicola Soranzo
ad02c53154
Fix many links
2018-09-03 14:34:13 +01: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
John Chilton
1c6cc02415
Hierarchical upload API optimized for folders & collections.
...
Allows describing hierarchical data in JSON or inferring structure from archives or directories.
Datasets or archive sources can be specified via uploads, URLs, paths (if admin && allow_path_paste), library_import_dir/user_library_import_dir, and/or FTP imports. Unlike existing API endpoints, a mix of these on a per file basis is allowed and they work seemlessly between libraries and histories.
Supported "archives" include gzip, zip, bagit directories, bagit achives (with fetching and validations of downloads).
The existing upload API endpoint is quite rough to work with both in terms of adding parameters (e.g. the file type and dbkey hanlding in 4563 was difficult to implement, terribly hacky, and should seemingly have been trivial) and in terms of building requests (one needs to build a tool form - not describe sensible inputs in JSON). This API is built to be intelligable from an API standpoint instead of being constrained to the older style tool form. Additionally it built with hierarchical data in mind in a way that would not be easy at all enhancing the tool form components we don't even render.
This implements 5159 though much simpler YAML descriptions of data libraries should be possible basically as the API descriptions. We can replace the data library script in Ephemeris https://github.com/galaxyproject/ephemeris/blob/master/ephemeris/setup_data_libraries.py with one that converts a simple YAML file into an API call and allows many new options for free.
In future PRs I'll add filtering options to this and it will serve as the backend to 4733.
2018-03-08 10:33:36 -05:00
John Chilton
f9969ee97a
Remove API scripts for axed APIs.
2017-12-15 16:02:18 -05:00
Nicola Soranzo
48aca7dce8
Update to flake8-import-order 0.16
2017-12-01 11:09:57 +00:00
Nicola Soranzo
d1bc98dfcb
Python3: fix remaining print statements
...
Remove some debugging prints.
Fix import order.
Consolidate exception logging in ToolShed database migrations.
2017-10-12 18:34:29 +01:00
Nicola Soranzo
9b1832abb1
Fix import order for cron/, scripts/ and test/
2017-09-25 23:44:39 +01:00
Nicola Soranzo
a353b2e88f
Fix E127 errors introduced by previous commit
...
using:
```
autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E127 .
```
2017-08-17 11:35:39 +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
Matt Chambers
25bd7178c1
Remove print of non-existent attribute 'content'
2017-08-16 14:44:51 -05:00
Frederic Sapet
3384e13744
correction of a typo leading to incomplete format string
2017-06-16 14:29:34 +02:00
Martin Cech
0602712a35
deduplicate obsolete API readme
2017-03-20 10:57:06 -04: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
Nicola Soranzo
1d17a29c79
Fixes for pycodestyle 2.2.0
2016-11-15 16:56:50 +00:00
Nicola Soranzo
9c37c6df89
Fixes for flake8-import-order 0.11
...
Also fix Python3 compatibility.
2016-11-11 15:09:34 +00:00
Junzhou Wang
e45f8abb54
Python3:script/api/
2016-06-25 20:49:06 -04:00
Junzhou Wang
a04f6589ea
Python3: test/shed_functional/ and test/unit/
2016-06-25 20:00:42 -04:00
Nicola Soranzo
6ba6f798ec
Fix more E203 flake8 errors
2016-05-17 23:53:16 +01:00
Nicola Soranzo
8a43b2b492
Python 3: use "as" instead of comma in except clause
2016-05-17 23:53:16 +01:00
Matt Chambers
384bdbfe70
Fix flaky "errors"
2016-05-13 11:38:48 -05:00
chambm
3a708a0089
Add filter_failed_datasets_from_collection.py script
2016-05-13 10:53:56 -05: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
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
4a05d5ea12
Merge branch 'dev' of https://github.com/galaxyproject/galaxy into smash_eggs
2015-10-20 18:59:06 -04:00
Eric Rasche
8a66701d4f
Don't re-upload if already there
2015-10-15 16:02:05 -05:00
Eric Rasche
2cca823a78
Prepopulate memoization cache
2015-10-14 16:05:44 -05:00
Eric Rasche
6be301ca8a
Support local/non local data and paths including root
2015-10-14 15:02:27 -05:00
Eric Rasche
33925747b8
Allow linking only
2015-10-14 14:50:35 -05:00
Eric Rasche
aec9961407
Strip newlines
2015-10-14 14:43:08 -05:00
Eric Rasche
decca0e96a
Refactor to accept output of find
2015-10-14 14:37:21 -05:00
Eric Rasche
61f1cdf5d7
Added script to upload a directory to a data library
2015-10-14 14:16:45 -05: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
Nate Coraor
8fadc6392b
Rename universe_wsgi.ini -> galaxy.ini everywhere.
2014-09-15 16:43:51 -04:00
Greg Von Kuster
2d5c37a73f
Enhance the galaxy API for the Tool Shed to retrieve the latest installable revision from the Tool Shed from an installed repository, specifying a name and owner. Enhance the ~/scripts/api/install_tool_shed_repositories.py script to allow the changeset_revision to be optional, and if not specified, the latest installable revision will be installed for the repository specified by the name and owner.
2014-05-14 18:13:33 -04:00
Daniel Blankenberg
ea193ce2e6
Add a very simple example script that uses API to run data managers.
2014-02-10 11:59:58 -05: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
a610d0d458
Enhance the Tool Shed and Galaxy APIs to support resetting metadata on repositories in the Tool Shed or installed into Galaxy respectively. When resetting repository metadata in the Tool Shed, if the API key is associated with an admin user, then setting the my_writable param value to True will restrict resetting metadata to only repositories that are writable by the user in addition to those repositories of type tool_dependency_definition. This param is ignored if the current user is not an admin user, in which case this same restriction is automatic. Also, when resetting metadata in the Tool Shed, repositories of type tool_dependency_definition are reset before repositories of type unrestricted. When setting metadata for installed repositories in Galaxy, neither repository types nor order are considered since these concepts are irrelevant in that environment.
2013-10-16 14:19:26 -04:00