Commit Graph
397 Commits
Author SHA1 Message Date
mvdbeek 19d32f8b38 Change most str(e) / str(exc) to unicodify
I skipped migrations and import error exceptions.
2019-06-26 14:57:26 +02:00
mvdbeek 47ed81feb9 Remove unreachable print statement
I don't think an exception could ever occur here.
2019-02-26 12:06:07 +01:00
mvdbeek 8d99791afb Fix data_source tools on python 3 2019-01-18 12:13:13 +01:00
John Chilton bf550da2af Merge pull request #6684 from nsoranzo/deprecate_param_size
Deprecate `size` attribute of `<param/>` and remove it from tools
2018-12-12 10:51:28 -05:00
John Chilton f035d642ce Merge pull request #6844 from jmchilton/compressed_types_and_extra_files
Infrastructure/API Support for Composite Uploads/Downloads
2018-11-01 10:57:09 -04:00
Nicola Soranzo f4203ca051 Fix errors reported by flake8 3.6.0
Ignore W504.
2018-10-24 23:22:19 +01:00
John Chilton dd6b185ab8 Implement composite uploads on arbitrary datatypes.
Prior to this, composite uploads were only allowed for select data types. As far as I can tell, the framework itself allows arbitrary datatypes to have extra files. This allows the upload API to take in extra files for datatypes that aren't explicitly annotated has having extra files.

These may be specified one at a time or in directory structures via tar files.
2018-10-24 09:55:25 -04:00
Nicola Soranzo 949dcfdbc3 Do not log exceptions twice
`logging.exception()` already adds the the exception information after
the supplied message.

Also: the `message` attribute of `Exception` class has been dropped in
Python 3, always use `str(e)`.

xref. https://github.com/galaxyproject/galaxy/issues/1715
2018-10-24 12:57:05 +01:00
Pierrick ROGER efc7864cab Merge branch 'dev' into feature/isa_data_type 2018-10-18 10:36:49 +02:00
Nicola Soranzo f865e8359f Deprecate size attribute of <param/> and remove it from tools
Also:
- dos2unix test/functional/tools/for_workflows/head.xml
- Single-quote text and data params in `<command/>`
- Remove deprecated `interpreter` attribute of `<command />`
2018-09-10 11:34:37 +01:00
Nicola Soranzo 952fdac419 Remove unused and broken tool 2018-09-10 11:16:55 +01:00
Nicola Soranzo f5bd245faa Merge branch 'release_18.05' into dev 2018-08-17 16:39:29 +01:00
Dannon Baker 1cd36e3f81 Bump version; 'patch' since it should be the exact same, as much as anything over the net ever could be\? 2018-08-10 11:27:17 -04:00
Dannon Baker 2839475967 Update ucsc genome-test server URL. 2018-08-10 11:19:13 -04:00
mvdbeek 66af9ce961 Make upload tool python3 compatible 2018-07-16 20:15:11 +01:00
takadonet 4b0ae30a83 Added fix to ensure that original ftp files that have been uploaded are purged if set in galaxy.yml with flag ftp_upload_purge. Address issue #6492 2018-07-12 16:35:35 -04:00
Martin Cech 89c62229c5 remove dead link
I did not find the original post
2018-07-12 16:02:00 -04:00
takadonet 4da67218c1 Added fix to ensure that original ftp files that have been uploaded are purged if set in galaxy.yml with flag ftp_upload_purge. Address issue #6492 2018-07-12 12:08:15 -05:00
Daniel Blankenberg 433d464870 Update InterMine 2018-07-01 16:20:13 -07:00
Daniel Blankenberg 08547faddd Intermine from Hack 2018-06-30 15:08:02 -07:00
John Chilton 9b232c87ad Allow empty files to be uploaded if check content is off. 2018-06-29 15:56:39 -07:00
Pierrick Roger 60d0d9d5ec Add grooming for composite files.
Add call to groom_dataset_content() for composite files.
2018-06-07 11:47:56 +01:00
John Chilton cdbae706e6 Respect auto_decompress in fetch API, synchronize upload APIs. 2018-05-15 07:39:14 -04:00
John Chilton b4de30b5fc Small fixes for upload flags (auto_decompress, check_content, space_to_tab). 2018-05-15 06:28:54 -04:00
John Chilton 8a58711e39 Remove validate_mode prop for sniffing, no longer needed with previous fixes.
This does undo an attempt that Nate made to auto sniff fastq.gz files when they can't be converted anyway, but that was kind of broken in its own way.

From Gitter:

jmchilton: natefoo "# Link mode can't decompress anyway, so enable sniffing for keep-compressed datatypes even when auto_decompress is enabled" Did you test this hack? I get the thought process but it seems like it results in uploaded fastq.gz files defaulting to fastqcssanger.gz? Maybe it didn't at some point though?

Nate Coraor: ummmmmmmmmmmm maybe probably not

John Chilton: I have four fixes for compressed datatypes that all fall apart because of this hack... can I just use the configured sniff order or do you want me to try to preserve this and write a test case

Nate Coraor: nah go ahead and de-hack

John Chilton: There is a good argument to be made for making the behavior more consistent anyway right? Cool thanks
2018-05-10 18:35:31 -04:00
mvdbeek 2e18ed2c97 Set ext explicitly to dataset.file_type
since it is being used again later. Thanks @nsoranzo!
2018-04-19 10:40:17 +02:00
mvdbeek 6c020a6dbc Fix uploads of link-only datasets to data library
`ext` was never being set in the case of link only datasets, where I think the
right thing is to fall back on `dataset.file_type`.
Fixes https://github.com/galaxyproject/galaxy/issues/5915.
2018-04-19 10:40:17 +02:00
Nicola Soranzo 6e36af5c0e Fix linking option for library dataset uploads
Broken in commit a45cbfeb8d .

Found by BioBlend tests:
https://travis-ci.org/galaxyproject/bioblend/jobs/356761960
2018-03-22 10:36:58 +00:00
Nate Coraor 11917108f3 Improve extension stripping 2018-03-16 16:33:39 -04:00
Nate Coraor 0163a57f0e Additional fixes for failing tests 2018-03-15 16:56:41 -04:00
Nate Coraor ef6f7f62ab Memory usage bug fixes and code cleanup/simplification for upload tool 2018-03-15 14:32:02 -04:00
John Chilton 495d1258fd Consistent sniffing regardless of in_place.
Previously sniffing would happen on the original file (before carriage returns and tabular spaces were converted) if in_place was false and on the converted file if it was true.
2018-03-08 10:33:42 -05: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 a45cbfeb8d Stronger assertion about link_data_only option in upload.py. 2018-03-08 10:32:19 -05:00
John Chilton ebac0fd9e5 Upload simplification - just base this check on link_only. 2018-03-08 10:32:19 -05:00
John Chilton d9d8f5d327 Eliminate precreated datasets concept in upload API.
Was used by the async controller in the past I think (https://github.com/galaxyproject/galaxy/blob/v13.01/lib/galaxy/webapps/galaxy/controllers/tool_runner.py#L256), but doesn't seem to be used now.
2018-02-26 11:00:05 -05:00
Nicola Soranzo 75b0618705 Do not remove external path files during library uploads
xref. https://github.com/galaxyproject/galaxy/pull/5264#issuecomment-367172820
2018-02-21 16:02:36 +00:00
Nicola Soranzo b59fb06fd9 Remove unused import 2018-01-17 16:26:56 +00:00
Matthias Bernt 4b2bf122b6 fix for microbial import tool
There seems to be no UnvalidatedValue class anymore. So I removed these
checks which seems to make the tool functional again.

Note that there is one more instance of such a check in the Galaxy
sources (in tools/parameters/basic.py). I guess this can also be
removed?
2018-01-17 15:55:10 +00:00
John Chilton 3f75a2d3a6 Re-work upload clarification from #5206.
See post-merge discussion on that issue.
2018-01-04 09:30:16 -05:00
Dannon Baker 6bf5d663b4 Merge pull request #5229 from jmchilton/upload_refactor
Refactor upload.py toward reuse
2017-12-18 11:15:37 -05:00
John Chilton 7e1bff7d69 Upload refactor - change upload.py to use exceptions.
Make decomposing and reuse of this easier downstream and feels cleaner to me.
2017-12-15 13:24:44 -05:00
John Chilton cafac19f65 Upload refactor - make link_data_only a bool.
Since it is a bool.
2017-12-15 13:24:44 -05:00
John Chilton 09f51f59af Upload optimization - eliminate second call to check_binary in upload.py. 2017-12-15 13:24:44 -05:00
Nicola Soranzo 6d3eadedbd Merge pull request #5227 from jmchilton/merge_1709
Merge 17.09.
2017-12-15 18:14:34 +00:00
John Chilton 90ba35a9a4 Merge remote-tracking branch 'jmchilton/release_17.09' into merge_1709 2017-12-15 12:02:07 -05:00
John Chilton 121285b40b Let ToolProvidedMetadata interface more directly decide if it has failed outputs.
I like this better for three reasons:

- Since usually it is scripts producing this JSON - we have the most control at that point for determining the failure and we don't have to deal with an artificial dependency between the tool's stdio and the output.
- At some point we could potentially allow some datasets to be ok now even though the job fails.
- It is a cleaner interface at the Python level between job finish and output collection IMO (no need for isinstance checking).
2017-12-15 08:34:35 -05:00
John Chilton 099c1562fe Re-organize edge case upload options for my own clarity.
I think setting each of these variables once and simplifing the context they are used in (in the case of purge_upload) makes it more clear what each variable is and how it is set. I also think one, more detailed comment for each variable helps.

Note: This will break run-as-user uploads started prior to the upgrade to 18.XX and executed after the upgrade. It is a small switch to restore the old behavior but I'm not sure it is worth the complexity it adds to the file.

```
run_as_real_user = dataset.get('run_as_real_user', False) or dataset_get.('in_place', True)
```
2017-12-13 12:54:03 -05:00
mvdbeek bac56d6b27 Drop samtools from metadata and upload tools
We only need samtools for the dataproviders, which shouldn't
be used by these tools.
2017-12-08 11:35:31 +01:00
Nicola Soranzo 0dfe73a54c Determine dynamically if an extension corresponds to an unsniffable binary datatype
Remove the need to call `Binary.register_unsniffable_binary_ext()` for
each unsniffable binary datatype.

Fix https://github.com/galaxyproject/galaxy/issues/3441 , where the upload
of files of a datatype defined in datatypes_conf.xml as subclass of an
unsniffable binary datatype ended up with "The uploaded binary file
contains inappropriate content" because it was not possible to register the
subclassed datatype as unsniffable.

Also remove unused `stop_err()` function in upload.py .
2017-12-01 10:30:24 +00:00