Commit Graph
20 Commits
Author SHA1 Message Date
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
John Chilton 8484f40f31 mypy for test/ 2020-12-25 17:38:51 -05:00
John Chilton 45019c3fbd Move galaxy testing utilities into more sane package structure.
Split test/base into lib/galaxy_test/base and lib/galaxy_test/driver. Dividing things on whether they import galaxy-app code or not - with the goal of a galaxy-test-base package that doesn't depend on galaxy-app and a galaxy-test-driver package that does.

I've been refactoring around this division for a long time. Certain tests (namely the integration tests) always need to bootstrap Galaxy - but the API tests and the Selenium tests should be installable and runnable without Galaxy in the Python environment. So future galaxy-test-api and galaxy-test-selenium packages should have only an optional dependency on galaxy-test-driver.

Properly sturcturing these namespaces is a precursor for real packages on PyPI, clean separation of the tool shed testing code, and cleans up all the flake8 noqa hacks in test/.
2019-11-12 09:03:06 -05:00
John Chilton 113d296fbf packages/ - build universal wheels (Python 2/3 compat) 2019-05-28 16:14:26 -04:00
Nicola Soranzo f4203ca051 Fix errors reported by flake8 3.6.0
Ignore W504.
2018-10-24 23:22:19 +01: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
John Chilton d5ed68560f Fix docstring linting.
The module we used added new issues D106 and D107 (lack of docstring in __init__ methods) which we fail extensively - so adding it to the ignore list.
2017-10-08 09:57:15 -04: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
John Chilton 2586df4563 Remove pydocstyle pins - there was an update to flake8-docstrings. 2017-05-01 12:02:12 -04:00
John Chilton 56721e7a0f Initial docstring linting.
- Apply one docstring lint to the global lint list (D302 - unicode docstrings should start with u""").
- Create an inclusion list with many more docstring checks (public modules need a docstring, white space and quoting issue, check imperative mood and capitializaton). Add a couple modules to this inclusion list.
- Add tox and Travis targets for this linting.

This gives a person who wants to work on improving Galaxy's in-code docstring documentation three ways to "raise the bar" for the project. One could:
- Add more modules to the inclusion list (.ci/flake8_docstrings_include_list.txt). Many more modules should contain docstrings - especially things in galaxy-lib and web controllers.
- Add more checks to the existing inclusion list checks - I'd say D101 and/or D103 first or any of the missing D2XX or D4XX options. D102 seems a bit too ambitious and I worry it'd be too much of a burden.
- Pick some DXXX check that is ignored globally and fix it for the whole project and then remove it from the exclude list in setup.cfg.
2016-10-04 15:17:09 -04:00
John Chilton d6b9348f37 Extend import order linting to all of galaxy-lib w/fixes.
Includes a bit linting of order for galaxy.util.
2016-09-07 12:44:54 -04:00
Nicola Soranzo de3c50a5ef Python3 support and import order fixes for lib/tool_shed/ 2016-08-04 13:41:36 +01:00
John Chilton c07bbe010e Add import order linting using tox and flake8-import-order.
Adds two tasks:

- Add a task that just lints everything the way Galaxy's default linting is (py27-lint-imports) and don't enforce it passes on Travis.
- Add a task that just lints a subset we expect to past, hopefully we can grow this subset over time.

Once the inverse of the subset we are testing is just the blacklist, we can eliminate bothtasks and just wrap this into Galaxy's default linting.

These tasks require an older flake8 until https://github.com/PyCQA/flake8-import-order/issues/79#issuecomment-235052270 is part of a released version of flake8.
2016-07-26 14:32:01 -04:00
Nate Coraor a074af5668 Ignore W503 as PEP 8 has reversed its position on this. 2016-07-07 13:01:55 -04:00
Nicola Soranzo 487ece0f40 Fix all E731 "errors". 2016-01-14 01:19:01 +00:00
Dannon Baker 33ac7e3910 Drop E731 from flake8 enforcement (though we should revisit this and see if we *do* want to follow this or not) 2016-01-12 15:27:52 -05:00
Bjoern Gruening f318379d67 add E402 to the exclude rules, until we can fix this 2015-07-12 21:32:14 +01:00
Martin Cech 870770ffe1 add more style exceptions
In order to allow https://github.com/galaxyproject/galaxy/pull/76 to proceed.
2015-04-08 14:37:52 -04:00
John Chilton f50c1462e0 Initial TravisCI configuration.
This does two things - runs the Python unit tests and lints a subset of the Python code. I wanted to also run the QUnit tests but they are not currently passing.
2015-03-24 22:26:24 -04:00