Commit Graph
44183 Commits
Author SHA1 Message Date
Björn Grüning d19ac99d3e Merge pull request #9337 from mvdbeek/various_python3_fixes
[20.01] Various python 3 fixes from sentry
2020-02-09 21:11:52 +01:00
mvdbeek a74035f0bb Fix string maketrans usage in libraries 2020-02-07 19:02:15 +01:00
mvdbeek 3db10dd673 Floor division instead of integer casting 2020-02-07 17:19:25 +01:00
Dannon 6ebb796c56 Merge pull request #9334 from nsoranzo/release_20.01_doc_fixes
[20.01] Various doc fixes
2020-02-07 09:06:12 -05:00
mvdbeek f01ca59ebe Fix openid manager pickle dumping
pickle dumps are binary
Fixes https://sentry.galaxyproject.org/sentry/main/issues/503803/:
```
TypeError: write() argument must be str, not bytes
  File "galaxy/web/framework/middleware/sentry.py", line 43, in __call__
    iterable = self.application(environ, start_response)
  File "/cvmfs/main.galaxyproject.org/venv/lib/python3.6/site-packages/paste/recursive.py", line 85, in __call__
    return self.application(environ, start_response)
  File "galaxy/web/framework/middleware/statsd.py", line 34, in __call__
    req = self.application(environ, start_response)
  File "/cvmfs/main.galaxyproject.org/venv/lib/python3.6/site-packages/paste/httpexceptions.py", line 640, in __call__
    return self.application(environ, start_response)
  File "galaxy/web/framework/base.py", line 143, in __call__
    return self.handle_request(environ, start_response)
  File "galaxy/web/framework/base.py", line 222, in handle_request
    body = method(trans, **kwargs)
  File "galaxy/webapps/galaxy/controllers/openid.py", line 30, in openid_auth
    consumer = self.openid_manager.get_consumer(trans)
  File "galaxy/openid/openid_manager.py", line 58, in get_consumer
    return consumer.Consumer(self.get_session(trans), self.store)
  File "galaxy/openid/openid_manager.py", line 50, in get_session
    pickle.dump(dict(), open(session_file, 'w'))
```
2020-02-07 13:47:06 +01:00
mvdbeek f597185589 Fix as_ucsc_display_file
Should fix https://sentry.galaxyproject.org/sentry/main/issues/501237/:
```
TypeError: a bytes-like object is required, not 'str'
  File "galaxy/datatypes/data.py", line 625, in as_display_type
    return getattr(self, self.supported_display_apps[type]['file_function'])(dataset, **kwd)
  File "galaxy/datatypes/interval.py", line 446, in as_ucsc_display_file
    return Interval.as_ucsc_display_file(self, dataset)
  File "galaxy/datatypes/interval.py", line 225, in as_ucsc_display_file
    fh.write('%s\n' % '\t'.join(tmp))
  File "python3.6/tempfile.py", line 485, in func_wrapper
    return func(*args, **kwargs)
```
2020-02-07 13:33:55 +01:00
mvdbeek 572eeac529 Fix circster launch and saving
Fixes:
```
Error - <class 'binascii.Error'>: decoding with 'hex' codec failed (Error: Odd-length string)
URL: http://127.0.0.1:8080/visualization/circster?id=undefined
File '/Users/mvandenb/src/galaxy/lib/galaxy/web/framework/middleware/error.py', line 154 in __call__
  app_iter = self.application(environ, sr_checker)
File '/Users/mvandenb/src/galaxy/.venv/lib/python3.6/site-packages/paste/recursive.py', line 85 in __call__
  return self.application(environ, start_response)
File '/Users/mvandenb/src/galaxy/.venv/lib/python3.6/site-packages/paste/httpexceptions.py', line 640 in __call__
  return self.application(environ, start_response)
File '/Users/mvandenb/src/galaxy/lib/galaxy/web/framework/base.py', line 143 in __call__
  return self.handle_request(environ, start_response)
File '/Users/mvandenb/src/galaxy/lib/galaxy/web/framework/base.py', line 222 in handle_request
  body = method(trans, **kwargs)
File '/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/controllers/visualization.py', line 764 in circster
  vis = self.get_visualization(trans, id, check_ownership=False, check_accessible=True)
File '/Users/mvandenb/src/galaxy/lib/galaxy/webapps/base/controller.py', line 651 in get_visualization
  visualization = trans.sa_session.query(trans.model.Visualization).get(trans.security.decode_id(id))
File '/Users/mvandenb/src/galaxy/lib/galaxy/security/idencoding.py', line 84 in decode_id
  return int(unicodify(id_cipher.decrypt(codecs.decode(obj_id, 'hex'))).lstrip("!"))
Error: decoding with 'hex' codec failed (Error: Odd-length string)
```
among other things. This happens when a new circster instance is created
and it doens't have an id yet. `id` then is `undefined`, which is not a
valid id.
2020-02-07 13:27:41 +01:00
mvdbeek aa42391171 Restore integer result of division
Fixes:
```
galaxy.web.framework.decorators ERROR 2020-02-07 11:58:02,554 Uncaught exception in exposed API method:
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/web/framework/decorators.py", line 157, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/datasets.py", line 139, in show
    rval = self._data(trans, dataset, **kwd)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/datasets.py", line 289, in _data
    return indexer.get_data(chrom, low, high)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/visualization/data_providers/genome.py", line 1233, in get_data
    result = summarize_region(bbi, chrom, start, end, num_points)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/visualization/data_providers/genome.py", line 1196, in summarize_region
    for i in range(num_points):
TypeError: 'float' object cannot be interpreted as an integer
```
2020-02-07 12:01:44 +01:00
mvdbeek e18dfb9b70 Make binary dataproviders open files in binary mode
Fixes
```
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/web/framework/decorators.py", line 157, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/datasets.py", line 137, in show
    is_true(kwd.get('retry', False)))
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/datasets.py", line 212, in _converted_datasets_state
    if not data_provider.has_data(chrom):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/visualization/data_providers/genome.py", line 1125, in has_data
    f, bbi = self._get_dataset()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/visualization/data_providers/genome.py", line 1261, in _get_dataset
    return f, BigWigFile(file=f)
  File "lib/bx/bbi/bigwig_file.pyx", line 161, in bx.bbi.bigwig_file.BigWigFile.__init__
  File "lib/bx/bbi/bbi_file.pyx", line 125, in bx.bbi.bbi_file.BBIFile.__init__
  File "lib/bx/bbi/bbi_file.pyx", line 135, in bx.bbi.bbi_file.BBIFile.open
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.6/site-packages/bx/misc/binary_file.py", line 40, in __init__
    bytes = file.read(4)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
```
2020-02-07 11:59:00 +01:00
mvdbeek b19798ffda Open non-binary files in 'r' mode in DatasetDataProvider
Fixes https://sentry.galaxyproject.org/sentry/main/issues/501242/
2020-02-07 11:56:20 +01:00
mvdbeek e71e549c56 Fix data table loading from URL
Fixes https://sentry.galaxyproject.org/sentry/main/issues/501021/:
```
Error loading Data Table URL "http://igv.broadinstitute.org/genomes/genomes.txt": a bytes-like object is required, not 'str'
```
2020-02-07 11:37:37 +01:00
Nicola Soranzo 77d8dac19a Various doc fixes
- Merge invisible `doc/source/admin/reports.md` into
  `doc/source/admin/reports.rst`
- Misc fixes and cleanups
2020-02-07 02:37:57 +00:00
Dannon fddc34d9cc Merge pull request #9315 from mvdbeek/fix_workflow_save_as_2
[20.01] Fix workflow editor save as functionality
2020-02-06 14:50:57 -05:00
Dannon 373549bc5b Merge pull request #9330 from natefoo/containers-py3-fix
[20.01] Fix use of next() as a meethod instead of a function
2020-02-06 12:48:44 -05:00
Nate Coraor bc339be5ca Fix use of next() as a meethod instead of a function 2020-02-06 12:37:36 -05:00
Marius van den Beek a69c77219f Merge pull request #9329 from natefoo/containers-py3-fix
[20.01] Fix Python 3 error in containers lib
2020-02-06 18:12:40 +01:00
Nate Coraor b6077e7969 Don't mutate generator 2020-02-06 11:59:55 -05:00
Enis Afgan e438ae99c5 Merge pull request #9322 from nuwang/fix_k8s_slots
Use requests for slots instead of limit
2020-02-06 11:17:03 -05:00
Dannon af153b91de Merge pull request #9327 from mvdbeek/fix_string_module_use
[20.01] Fix string module use
2020-02-06 11:08:31 -05:00
Marius van den BeekandNicola Soranzo c6bbd49ec7 Update lib/galaxy/visualization/plugins/interactive_environments.py
Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com>
2020-02-06 16:34:22 +01:00
Marius van den BeekandSergey Golitsynskiy 61bdd76f35 Update tools/plotting/bar_chart.py
Co-Authored-By: Sergey Golitsynskiy <sgolitsynskiy@gmail.com>
2020-02-06 16:28:52 +01:00
Marius van den BeekandNicola Soranzo 172751676d fix string splitting
Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com>
2020-02-06 16:26:14 +01:00
mvdbeek 2fe556959d Fix string module use 2020-02-06 16:18:28 +01:00
Nicola Soranzo 57cc19eeff Merge pull request #9321 from dannon/fix-reports-disk-usage
[20.01] Fix reports disk usage query for python 3
2020-02-06 09:31:50 +00:00
Nuwan Goonasekera 58715ba73d Use requests for slots instead of limit 2020-02-06 00:22:59 +05:30
Dannon b703548d5d Merge pull request #9316 from mvdbeek/fix_and_enhance_reports
[20.01] Various fixes and enhancements to reports
2020-02-05 13:48:33 -05:00
DannonandNicola Soranzo 0459e0c1e3 Apply suggestions from code review
Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com>
2020-02-05 13:16:10 -05:00
Nicola Soranzo 675163eafb Merge pull request #9293 from mvdbeek/tabular.gz
[20.01] Allow tabular.gz / add embl to uploadable formats
2020-02-05 18:14:59 +00:00
Dannon Baker 8338b257c9 Fix reports disk usage query for python 3 2020-02-05 12:36:34 -05:00
John Chilton 6019d52345 Merge pull request #9314 from mvdbeek/mount_tool_data_path_readonly
[20.01] Mount tool_data_path (ro) when running containerized tools
2020-02-05 11:36:11 -05:00
Marius van den Beek ec5f59b270 Merge pull request #9319 from nsoranzo/unicodify_check_output
[20.01] Python3: unicodify the output of ``subprocess.check_output()``
2020-02-05 16:07:01 +01:00
Nicola Soranzo 1dc1e5f219 Python3: unicodify the output of `subprocess.check_output()`
By default it's a bytestring.

Also:
- don't use `shell=True`
- add a `splitlines()` forgotten in commit 670897ec5c
- raise exception instead of returning `error_info` in `docker_to_singularity()`
- use a random temp dir in `singularity_container_test()`
2020-02-05 12:13:39 +00:00
Marius van den Beek e0b5097b33 Merge pull request #9281 from dannon/fix-tag-display-in-select
[20.01] Tag display fixes for ui-select.
2020-02-05 12:14:22 +01:00
mvdbeek 92b4cce329 Revert "Allow spaces in step labels"
This reverts commit 2804f5e17f.
2020-02-05 11:11:54 +01:00
mvdbeek 5ede51c4ce Also quote job_parameters example
I rarely read entire help texts (shame on me, I know), so I missed the
example below that was quoting when there is a whitespace.
For consistency it's probably better too to qute all parameters.
2020-02-05 11:11:43 +01:00
mvdbeek 9fbfed1fd3 Fix string substitution, fixes display collections as workflow invocation outputs 2020-02-04 20:24:15 +01:00
mvdbeek 2804f5e17f Allow spaces in step labels 2020-02-04 20:24:15 +01:00
mvdbeek 50f704ea23 Scale images to PDF width 2020-02-04 19:49:03 +01:00
mvdbeek 118d3f2fbe Allow showing png and jpg contents as invocation outputs 2020-02-04 19:48:41 +01:00
mvdbeek 39e47c5145 Fix workflow editor save as functionality
Fixes https://github.com/galaxyproject/galaxy/issues/9308
2020-02-04 19:46:22 +01:00
mvdbeek 392753af54 Mount tool_data_path (ro) when running containerized tools
This affects instances that store reference data outside of the galaxy
root.
2020-02-04 19:42:59 +01:00
Nicola Soranzo 666d1595bf Merge pull request #9309 from dannon/backport-reports-py3-fix
[20.01] Backport reports config/py3 fix
2020-02-04 15:42:22 +00:00
Dannon Baker 7c6522ea3b Fixes reports app under py3 by swapping to the more standard (modern...) log configuration function 2020-02-04 08:55:46 -05:00
John Chilton bd96d8d3c8 Merge pull request #9294 from dannon/no_cache_bootstrapped_client
[20.01] Prevent caching of bootstrapped client data
2020-02-03 09:43:24 -05:00
Dannon Baker 0688ec88a6 Prevent caching of bootstrapped client data. 2020-01-31 17:21:06 -05:00
mvdbeek c7078e5ad2 Display embl format in upload 2020-01-31 22:05:58 +01:00
mvdbeek ef666b0716 Allow tabular.gz 2020-01-31 22:01:59 +01:00
Nicola Soranzo d525fd0913 Merge branch 'release_19.09' into release_20.01 2020-01-31 15:00:26 +00:00
Nicola Soranzo 44859c7d6d Merge pull request #9290 from nsoranzo/release_19.09_fix_9178
[19.09] Python3: don't check for has_key attribute
2020-01-31 14:51:53 +00:00
Nicola Soranzo 2e587f14a7 Python3: don't check for has_key attribute
Also partially backport commit f892231b8b .
Fix https://github.com/galaxyproject/galaxy/issues/9178 .
2020-01-31 01:17:02 +00:00