Commit Graph
50 Commits
Author SHA1 Message Date
Nicola Soranzo 7fee81607c Add linting with ruff
ruff (https://github.com/charliermarsh/ruff) is a new and extremely fast
Python linter, written in Rust.
Ruff can be used to replace Flake8 (plus a variety of plugins), isort,
pydocstyle, yesqa, eradicate, pyupgrade, and autoflake.
Here ruff is added to our current linters (flake8, flake8-bugbear and isort)
while we assess its reliability.
I've not enabled the isort rules because many of the options we use are not
implemented yet. I have instead enabled the pyupgrade rules (a tool which I
run manually every few months).

Also:
- Fix new linting errors reported by ruff.
2023-01-16 14:34:56 +00:00
Dannon Baker 03351d2a9f Apply black to tools as well 2022-02-03 09:12:13 -05:00
Dannon Baker 623a5e165a Apply black formatting.
Apply isort.
2022-02-03 07:42:20 -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
Alexandru Mahmoud da860b09c8 filtering.py check_expression adding 'Constant' 2020-09-22 17:04:52 -04:00
Wolfgang Maier e003fbc081 Add doctests for additional allowed types 2020-08-26 14:17:43 +02:00
Wolfgang Maier 8639de2dee Allow unary plus and minus in filtering 2020-08-26 14:06:40 +02:00
Nicola Soranzo f4203ca051 Fix errors reported by flake8 3.6.0
Ignore W504.
2018-10-24 23:22:19 +01:00
Anthony Bretaudeau 0b191abaf1 pass the condition by a json file instead of arg 2018-04-19 15:24:29 +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
Daniel Blankenberg ba07956117 Fix tabular filtering tool broken in #2983 2016-10-13 10:40:40 -04: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
Nicola Soranzo ed4132d9c0 Python3: Use open() instead of file() 2016-05-17 23:53:16 +01:00
Nicola Soranzo 69cda48690 Remove remaining references to galaxy.eggs . flake8 some files in tools/ . 2015-10-26 19:29:13 +00:00
John Chilton be172fdfda Merge Pull Request #244. 2013-11-04 23:42:06 -06:00
John Chilton 4fb2b89347 White-list expressions executed by filtering and dna_filtering tools. 2013-11-04 14:55:00 -05:00
Bjoern Gruening b172b602ad add [ and ] to mapped strings and advanced filters 2013-10-25 10:34:28 +02:00
Jeremy Goecks ea8d337316 Add parameter to filtering tool to optionally skip header lines. Add test for new parameter usage as well. 2013-01-29 10:37:16 -05:00
Jeremy Goecks a4b56c0b74 Improve filtering tool's stdout reporting of lines filtered; fixes #536 2011-06-15 13:22:18 -04:00
Kanwei Li 34155271b3 [Peter Cock] Filtering tool: Only cast used columns. Fix valid lines and skipped info lines. [Kanwei] Add new testcases to test this behavior. Fixes #537. Fixes #535 2011-05-27 10:47:17 +02:00
Jeremy Goecks ccf07c72aa Enable filter tool to operate correctly on files with a variable number of columns (such as SAM files). Tool prepares and processes only columns up to and including the right-most column (i.e. column with the largest index) in the filtering condition, and subsequent columns are ignored. New functional test added for this functionality as well. 2010-11-04 16:30:34 -04:00
Greg Von Kuster a14492c491 Added from __future__ import division to the Filter tool and increased the version, and fixed the URL in the new bx_browser tool config. 2010-01-14 11:26:08 -05: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 b88df9bdc3 Bug fixes for compare, Group and filter tools. 2008-12-02 11:41:25 -05:00
Daniel Blankenberg b9e242e4eb Add a new metadata type of Metadata Files.
These are now used to store the list of chromosomes for species as well as the index for MAF files.

MAF tools have been enhanced to make use of index files when available.

TODO: When datasets are purged from disk, these files should also be purged.
2008-10-22 13:49:22 -04:00
Greg Von Kuster 7aace9ccaa Convert metadata unicode strings to ascii ( previous code doesn't seem to do anything, am I missing something? ). Add no_value metadata attribute to columns and column_types metadata. Fix for column_maker and filter tools. 2008-09-24 11:14:44 -04:00
Greg Von Kuster bfabec75a0 Fixes for column_maker and filtering tool to use new approach for handling metadata in the tool params - functional tests should now pass. 2008-07-23 17:12:01 -04:00
Greg Von Kuster bb4b6c63b1 Improved information in filtering tool. 2008-05-15 12:38:30 +00:00
Greg Von Kuster 160c9d9a4f Fix for the filter tool, also improved the way we determine column_types meta data. 2008-05-13 18:51:00 +00:00
Greg Von Kuster bb3cd06be1 Extensive fixes for filtering tool, now uses column_types metadata, no more MemoryErrors! 2008-05-09 14:57:19 +00:00
Nate Coraor 7560751dc8 Separate framework and tool environments.
Whether running locally or via PBS, $PATH should now be handled in your
user's environment.

This also fixes problems like PYTHONPATH on the new blast nodes being
wrong (because they are x86_64 and the frontends are i686).

Note that you can actually start Galaxy without having an eggs dir now.
2008-04-11 20:11:21 +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
Greg Von Kuster e54be223b2 Better way to skip invalid comment lines in filtering tool. Better numerical value checks in interval.py. 2007-12-18 14:52:04 +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
Greg Von Kuster 65aeb6ec40 Better behavior in filter tool if filtering condition includes improper syntax (like commas). 2007-07-13 13:08:36 +00:00
Greg Von Kuster 437399fc66 Added expression validation for column_maker, filter. 2007-06-01 14:31:13 +00:00
Greg Von Kuster c2d1d0189f Some corrections for tracking referrals. Eliminated the referer column from the event table as it is not needed. 2007-04-10 16:07:53 +00:00
Greg Von Kuster baacb7c67c Enhanced security measures for condition entered as free text - should make tool more useful and reduce job errors. 2007-04-05 18:24:47 +00:00
Greg Von Kuster f42b4c6742 Re-added the safety measures. 2007-03-27 13:56:16 +00:00
Greg Von Kuster 5cfc24d89e Cleaned up the behavior of the filter tool and eliminated restrictions on filtering on words in the data. Should eliminate most job errors. 2007-03-27 13:18:33 +00:00
Greg Von Kuster e34fff8ff8 Added a corner-case fix for auto-detect file formats. Updated info displayed to user on upload and filter tools and added more valid words to filter tool. 2007-03-23 17:46:06 +00:00
Greg Von Kuster 2b05ca975f Fixed a bug in sniff.py and added a new unit test case to cover it. Added the hpvar data source tool to tool_conf.xml.sample. Slightly enhanced the filter and compute tools. 2007-03-19 19:55:57 +00:00
Greg Von Kuster 7ab5369033 Corrected the way these tools read input datasets to keep them from entering infinite loops if the dataset is empty. 2007-02-27 16:32:05 +00:00
Greg Von Kuster 5a8135f56c Minor correction to the message for the location of the first invalid line in a dataset, if there is in fact one. 2007-02-21 21:44:22 +00:00
Greg Von Kuster 67e1bb8846 Enhanced the Filter tool to handle invalid data and to display more useful, informative messages to the user. 2007-02-21 18:41:58 +00:00
James Taylor f788a34fca Moving james-wsgi branch to new trunk. 2006-11-15 16:28:21 +00:00