Nicola Soranzo
30f60493c3
Format Python code with black 23.1.0
...
with manual fixes to 3 files to make them compatible with black 22.12.0 .
We need to keep black pinned at `<23` until we vendorise `packaging`, since
the new version of black depends on `packaging >=22.0` which is the version
where `LegacyVersion` (which we use for tool lineages) was removed.
2023-02-01 23:51:03 +00:00
Dannon Baker
03351d2a9f
Apply black to tools as well
2022-02-03 09:12:13 -05:00
Nicola Soranzo
bd0cefa020
Don't use triple-quoted strings as comments
...
They are expressions that get uselessly evaluated.
These were reported as B018 errors by flake8-bugbear 21.11.28 , but B018 for
strings has then been disabled in 21.11.29 since these strings can also be
used as inline attribute doc strings or module variable docstrings (not our
case though).
2021-11-29 23:02:34 +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
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
M Bernt
2ea05e81f8
grouping: redecided for the less intrusive rstrip
2019-11-11 11:17:20 +01:00
M Bernt
3a0d9325a6
grouping: strip newlines
...
fixes https://github.com/galaxyproject/galaxy/issues/8383
more generally: if grouping is done on the last column then the newline
was retained and contained in the output.
2019-11-10 22:16:00 +01:00
Nicola Soranzo
c9f63ac2f8
Simplify code
2019-04-29 19:22:11 +01:00
mvdbeek
0c1334fea0
Fix grouping1 with modern sort, fix test data
...
This tool currently fails with `sort: multi-character tab '$\\\\t'\n`
(https://jenkins.galaxyproject.org/view/All/job/docker-main-tools/lastCompletedBuild/testReport/test.functional/test_toolbox_pytest/test_tool_Grouping1_test_1_/ ).
This also removes test data that should be included in
galaxy-test-data instead (xref
https://github.com/galaxyproject/galaxy-test-data/pull/5 ),
and adds a test file that was missing from
https://github.com/galaxyproject/galaxy/pull/7205 .
2019-04-29 17:38:10 +02:00
bernt@informatik.uni-leipzig.de
bc86e37d85
groupby: reenabled tests and added some, more bugfix
...
- make script exit with code 1 in case of error
- removed one more strip
- adapted tool syntax to best practices
2019-01-12 16:13:23 +01:00
M Bernt
b18aa199aa
group: don't remove empty cells at the begin/start of lines
...
currently group removes empty cells at the begin and end of lines
additionally the sort command line is changed (hoping that this looks a bit
more obvious)
2019-01-11 14:41:11 +01:00
M Bernt
7b027d8a1f
improved grouping
...
- replaces non 'floatable' values to a user supplied default value
- do not strip lines because this removes empty cells at the ends
- added some comments to python code
2018-09-10 12:05:15 +01:00
mvdbeek
2d732715ff
Fix grouping tool
2018-09-05 14:22:00 +02:00
Nicola Soranzo
9b4de72ca6
Fix all E722 errors and ignore E741
...
Introduced in flake8 3.5.0
Fix import order.
2017-10-24 11:29:09 +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
1d17a29c79
Fixes for pycodestyle 2.2.0
2016-11-15 16:56:50 +00:00
Nicola Soranzo
11b4f3a60c
Fix import order and Python3 compatibility for tools/
...
xref #1715
2016-09-29 19:26:22 +01:00
Nicola Soranzo
8a43b2b492
Python 3: use "as" instead of comma in except clause
2016-05-17 23:53:16 +01:00
Daniel Blankenberg
34900f87f5
Fix grouping tool broken in 7347d75a4a / fd85979a86, and enhance performance when removing lines.
2016-04-14 12:00:11 -04:00
Nicola Soranzo
69cda48690
Remove remaining references to galaxy.eggs . flake8 some files in tools/ .
2015-10-26 19:29:13 +00:00
Nate Coraor
6eafa52f41
Remove superflous assignment left over from
...
647fcf1f60 , thanks @nsoranzo.
2015-07-13 14:55:33 -04:00
Nate Coraor
647fcf1f60
Only make the Group tool's return value an integer if rounding is
...
selected, as pointed out by @nsoranzo.
2015-07-13 11:01:55 -04:00
Oleksandr Moskalenko
58091b4b5b
Make the Group tool return integer values when 'round to nearest integer' is selected
2015-07-04 17:58:07 +01:00
Clayton Turner
fd85979a86
Fixed XML versioning and inputfile name
2014-02-14 12:25:20 -05:00
Clayton Turner
7347d75a4a
Added ignore lines starting with specific characters to group tool
2014-02-10 16:00:30 -05:00
Kanwei Li
8ef579f714
Grouping tool: make error clearer when a line doesn't have entry on grouped column
2011-10-04 23:11:23 -04:00
Kanwei Li
068ef1df40
Grouping tool: use system numpy if provided, otherwise use bundled numpy egg
2011-08-24 13:58:48 -04:00
Kanwei Li
a8ff1a91b3
Grouping tool:
...
- Converted to use numpy, which is included with Galaxy, instead of rpy, which is not.
- Don't simply skip lines if a numeric parameter encounters non-numeric data, return descriptive error with line contents instead
- General refactoring
- Added new comprehensive test, disabled until test framework supports multiple repeat inputs
2011-06-03 16:08:26 -04:00
Kanwei Li
82dde6e37e
Refactor Grouping tool and fix bug where data after a blank value in the group_by column returns the wrong data.
2011-03-22 17:49:09 -04:00
Guruprasad Anada
7c798f719a
Fixed ValueError being thrown by randint() function in group tool.
2011-01-28 10:42:08 -05:00
Nate Coraor
e6afe5f830
Use a literal tab character instead of the bash $'\t' syntax in the grouping tool. This makes it compatible with bourne sh and dash.
2010-09-27 21:02:37 -04:00
Guruprasad Anada
d40c580de6
Modified Group tool by adding Mode function to the list of aggregate operations.
2010-07-29 12:21:09 -04:00
Guruprasad Anada
c5ee982295
Adding an option to Group tool to ignore case while grouping.
2009-09-25 14:50:34 -04:00
Greg Von Kuster
d0d7875192
Deprecated code corrections for supporting Python 2.6. Many of the Python 2.6 eggs are still throwing DeprecationWarning messages, so some things still won't work. Eggs for 2.6 need to be re-scrambled after corrections are made.
2009-08-14 15:37:31 -04:00
Guruprasad Anada
167ce59b29
Bug fixes for histogram liftover and grouping tools.
2009-05-29 11:07:18 -04:00
Guruprasad Anada
54667b80e6
Bug fixed in linear regression tool, and new option added to grouping tool.
2009-04-21 10:53:34 -04:00
Guruprasad Anada
50b46e60e3
Removed an option from grouping tool, which is now part of the LCA tool under Taxonomy.
2009-01-16 13:30:01 -05:00
Guruprasad Anada
cc80d63745
Added a new option to the grouping tool to facilitate picking of random entries from columns not chosen for either grouping or aggregate operations.
2009-01-06 11:11:24 -05:00
Guruprasad Anada
8c7c765480
Modified sort options in grouping tool to work correctly on older and newer versions of unix sort. Also included functional tests.
2008-12-22 12:15:02 -05:00
Guruprasad Anada
b88df9bdc3
Bug fixes for compare, Group and filter tools.
2008-12-02 11:41:25 -05:00
Greg Von Kuster
5be8fefaf5
Migrate central repo to alchemy 4.
2008-10-30 16:17:46 -04:00
Guruprasad Anada
e0bf31431c
Fix for grouping.py: New line character appended when grouping by the last column will now be trimmed.
2008-09-08 14:54:40 -04:00
Guruprasad Anada
255fee9ba8
Added new option to Grouping tool to randomly pick an entry from a chosen column.
...
Also corrected a typo in concatenate tool.
2008-07-03 17:48:28 +00:00
Guruprasad Anada
36eaa51b9b
Changed display of decimal numbers in the output.
2008-06-11 19:15:46 +00:00
Greg Von Kuster
04e0834500
Revert 2715.
2008-06-04 13:02:15 +00:00
Greg Von Kuster
dedc7278a1
Requires config change, temporary files are now created in a configurable location - affects many tools.
2008-06-03 20:29:54 +00:00
Greg Von Kuster
135c9a0377
Removed the remainder of the tool version subdirectories.
2008-03-03 18:38:57 +00:00
Greg Von Kuster
78b2d4b78e
Added tool version directories for stats tools directory.
2008-02-22 20:26:57 +00:00
Guruprasad Anada
d5e95f9ece
Modified 'Group' tool - Added new options: Count and Count distinct. Also added an option to round the result.
...
Improved error handling and added better error messages.
2008-02-05 16:57:29 +00:00
Greg Von Kuster
7718b28839
Better error condition handling for some tools. I've made these changes because anything printed to stderr now results in the tool state being "error" and tools with this state are no longer allowed as input datasets for tools.
2007-12-12 19:30:26 +00:00