From 0af72e56b20ea20da139c3b101dedf9e30a7d66a Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 31 Jan 2022 15:55:10 +0100 Subject: [PATCH 01/21] Update version to 22.05.dev0 --- Makefile | 2 +- lib/galaxy/version.py | 2 +- packages/app/galaxy/project_galaxy_app.py | 2 +- packages/auth/galaxy/project_galaxy_auth.py | 2 +- packages/containers/galaxy/project_galaxy_containers.py | 2 +- packages/data/galaxy/project_galaxy_data.py | 2 +- packages/files/galaxy/project_galaxy_files.py | 2 +- packages/job_execution/galaxy/project_galaxy_job_execution.py | 2 +- packages/job_metrics/galaxy/project_galaxy_job_metrics.py | 2 +- packages/meta/galaxy/project_galaxy_meta.py | 2 +- packages/objectstore/galaxy/project_galaxy_objectstore.py | 2 +- packages/selenium/galaxy/project_galaxy_selenium.py | 2 +- packages/test_api/galaxy/project_galaxy_test_api.py | 2 +- packages/test_base/galaxy/project_galaxy_test_base.py | 2 +- packages/test_driver/galaxy/project_galaxy_test_driver.py | 2 +- packages/test_selenium/galaxy/project_galaxy_test_selenium.py | 2 +- packages/tool_util/galaxy/project_galaxy_tool_util.py | 2 +- packages/util/galaxy/project_galaxy_util.py | 2 +- packages/web_framework/galaxy/project_galaxy_web_framework.py | 2 +- packages/web_stack/galaxy/project_galaxy_web_stack.py | 2 +- packages/webapps/galaxy/project_galaxy_webapps.py | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 93e632030d2..679a56cb5a1 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ VENV?=.venv # Source virtualenv to execute command (flake8, sphinx, twine, etc...) IN_VENV=if [ -f "$(VENV)/bin/activate" ]; then . "$(VENV)/bin/activate"; fi; -RELEASE_CURR:=22.01 +RELEASE_CURR:=22.05 RELEASE_UPSTREAM:=upstream TARGET_BRANCH=$(RELEASE_UPSTREAM)/dev CONFIG_MANAGE=$(IN_VENV) python lib/galaxy/config/config_manage.py diff --git a/lib/galaxy/version.py b/lib/galaxy/version.py index b8aeb0faa15..79769b43d65 100644 --- a/lib/galaxy/version.py +++ b/lib/galaxy/version.py @@ -1,3 +1,3 @@ -VERSION_MAJOR = "22.01" +VERSION_MAJOR = "22.05" VERSION_MINOR = "dev0" VERSION = VERSION_MAJOR + (f".{VERSION_MINOR}" if VERSION_MINOR else '') diff --git a/packages/app/galaxy/project_galaxy_app.py b/packages/app/galaxy/project_galaxy_app.py index 0f4e92e4a70..ba96ebd1069 100644 --- a/packages/app/galaxy/project_galaxy_app.py +++ b/packages/app/galaxy/project_galaxy_app.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-app" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/auth/galaxy/project_galaxy_auth.py b/packages/auth/galaxy/project_galaxy_auth.py index 721cc233e76..63acedc18a2 100644 --- a/packages/auth/galaxy/project_galaxy_auth.py +++ b/packages/auth/galaxy/project_galaxy_auth.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-auth" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/containers/galaxy/project_galaxy_containers.py b/packages/containers/galaxy/project_galaxy_containers.py index 9ef9dbc3e52..ef17dab59c4 100644 --- a/packages/containers/galaxy/project_galaxy_containers.py +++ b/packages/containers/galaxy/project_galaxy_containers.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-containers" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/data/galaxy/project_galaxy_data.py b/packages/data/galaxy/project_galaxy_data.py index 97f5003b044..04511fff74a 100644 --- a/packages/data/galaxy/project_galaxy_data.py +++ b/packages/data/galaxy/project_galaxy_data.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-data" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/files/galaxy/project_galaxy_files.py b/packages/files/galaxy/project_galaxy_files.py index b60e0f13295..6f23ffc97a4 100644 --- a/packages/files/galaxy/project_galaxy_files.py +++ b/packages/files/galaxy/project_galaxy_files.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-files" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/job_execution/galaxy/project_galaxy_job_execution.py b/packages/job_execution/galaxy/project_galaxy_job_execution.py index cd5a0d743fe..876af88bb96 100644 --- a/packages/job_execution/galaxy/project_galaxy_job_execution.py +++ b/packages/job_execution/galaxy/project_galaxy_job_execution.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-job-execution" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/job_metrics/galaxy/project_galaxy_job_metrics.py b/packages/job_metrics/galaxy/project_galaxy_job_metrics.py index a0019c4c0d8..fac857f4b31 100644 --- a/packages/job_metrics/galaxy/project_galaxy_job_metrics.py +++ b/packages/job_metrics/galaxy/project_galaxy_job_metrics.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-job-metrics" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/meta/galaxy/project_galaxy_meta.py b/packages/meta/galaxy/project_galaxy_meta.py index acf06f4cca8..ad5b8c70161 100644 --- a/packages/meta/galaxy/project_galaxy_meta.py +++ b/packages/meta/galaxy/project_galaxy_meta.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/objectstore/galaxy/project_galaxy_objectstore.py b/packages/objectstore/galaxy/project_galaxy_objectstore.py index 28c1ad69b2c..01c59388dbd 100644 --- a/packages/objectstore/galaxy/project_galaxy_objectstore.py +++ b/packages/objectstore/galaxy/project_galaxy_objectstore.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-objectstore" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/selenium/galaxy/project_galaxy_selenium.py b/packages/selenium/galaxy/project_galaxy_selenium.py index c848ea40bfb..8b850e4b346 100644 --- a/packages/selenium/galaxy/project_galaxy_selenium.py +++ b/packages/selenium/galaxy/project_galaxy_selenium.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-selenium" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/test_api/galaxy/project_galaxy_test_api.py b/packages/test_api/galaxy/project_galaxy_test_api.py index e4ce8d65553..49ec4de5872 100644 --- a/packages/test_api/galaxy/project_galaxy_test_api.py +++ b/packages/test_api/galaxy/project_galaxy_test_api.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-test-api" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/test_base/galaxy/project_galaxy_test_base.py b/packages/test_base/galaxy/project_galaxy_test_base.py index ce8393d482a..6ae155ad9e2 100644 --- a/packages/test_base/galaxy/project_galaxy_test_base.py +++ b/packages/test_base/galaxy/project_galaxy_test_base.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-test-base" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/test_driver/galaxy/project_galaxy_test_driver.py b/packages/test_driver/galaxy/project_galaxy_test_driver.py index af8547be390..749feb08998 100644 --- a/packages/test_driver/galaxy/project_galaxy_test_driver.py +++ b/packages/test_driver/galaxy/project_galaxy_test_driver.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-test-driver" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/test_selenium/galaxy/project_galaxy_test_selenium.py b/packages/test_selenium/galaxy/project_galaxy_test_selenium.py index 31711bcd5b0..f9cd081e9a9 100644 --- a/packages/test_selenium/galaxy/project_galaxy_test_selenium.py +++ b/packages/test_selenium/galaxy/project_galaxy_test_selenium.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-test-selenium" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/tool_util/galaxy/project_galaxy_tool_util.py b/packages/tool_util/galaxy/project_galaxy_tool_util.py index eef5254d469..bb6ef15384e 100644 --- a/packages/tool_util/galaxy/project_galaxy_tool_util.py +++ b/packages/tool_util/galaxy/project_galaxy_tool_util.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-tool-util" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/util/galaxy/project_galaxy_util.py b/packages/util/galaxy/project_galaxy_util.py index 9689175c5e1..1da41efe45e 100644 --- a/packages/util/galaxy/project_galaxy_util.py +++ b/packages/util/galaxy/project_galaxy_util.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-util" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/web_framework/galaxy/project_galaxy_web_framework.py b/packages/web_framework/galaxy/project_galaxy_web_framework.py index b43ad31c51a..579f8a96ee3 100644 --- a/packages/web_framework/galaxy/project_galaxy_web_framework.py +++ b/packages/web_framework/galaxy/project_galaxy_web_framework.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-web-framework" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/web_stack/galaxy/project_galaxy_web_stack.py b/packages/web_stack/galaxy/project_galaxy_web_stack.py index 052f88ad9f3..97af8d53985 100644 --- a/packages/web_stack/galaxy/project_galaxy_web_stack.py +++ b/packages/web_stack/galaxy/project_galaxy_web_stack.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-web-stack" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" diff --git a/packages/webapps/galaxy/project_galaxy_webapps.py b/packages/webapps/galaxy/project_galaxy_webapps.py index 21dd8a43eae..7c669f1eac9 100644 --- a/packages/webapps/galaxy/project_galaxy_webapps.py +++ b/packages/webapps/galaxy/project_galaxy_webapps.py @@ -1,4 +1,4 @@ -__version__ = "22.1.0.dev0" +__version__ = "22.5.0.dev0" PROJECT_NAME = "galaxy-webapps" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" From 275ad1217f9e023f3a563544309a68717da1b959 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 19 Jan 2021 10:27:58 -0500 Subject: [PATCH 02/21] Introduce pyproject.toml for black settings --- pyproject.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f0cc84f1e01..be52ef801f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,3 +120,14 @@ testfixtures = "*" tuspy = "*" twill = "*" watchdog = "*" + +[tool.black] +line-length = 120 +target-version = ['py37'] +include = '\.pyi?$' +extend-exclude = ''' +/( + | packages + | tools +)/ +''' From d21474fc8410840ef16b0f3a02db476083179c15 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 09:32:20 -0500 Subject: [PATCH 03/21] Add black to dev-dependencies --- lib/galaxy/dependencies/dev-requirements.txt | 20 ++++++++++---------- pyproject.toml | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/galaxy/dependencies/dev-requirements.txt b/lib/galaxy/dependencies/dev-requirements.txt index 1513ba45325..9e02e9b9843 100644 --- a/lib/galaxy/dependencies/dev-requirements.txt +++ b/lib/galaxy/dependencies/dev-requirements.txt @@ -20,7 +20,7 @@ bdbag==1.6.3; (python_version >= "2.7" and python_full_version < "3.0.0") or (py beaker==1.11.0 billiard==3.6.4.0; python_version >= "3.7" bioblend==0.16.0; python_version >= "3.6" -black==22.1.0; python_full_version >= "3.6.2" and python_version >= "3.6" +black==22.1.0; python_full_version >= "3.6.2" bleach==4.1.0; python_version >= "3.6" boltons==21.0.0 boto==2.49.0 @@ -36,13 +36,13 @@ circus==0.17.1 click-didyoumean==0.3.0; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.7" click-plugins==1.1.1; python_version >= "3.7" click-repl==0.2.0; python_version >= "3.7" -click==8.0.3; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.7" +click==8.0.3; python_version >= "3.7" and python_full_version >= "3.6.2" and python_full_version < "4.0.0" cloudauthz==0.6.0 cloudbridge==3.0.0 colorama==0.4.4; sys_platform == "win32" and python_version >= "3.7" and python_full_version >= "3.6.2" and platform_system == "Windows" and python_full_version < "4.0.0" and (python_version >= "2.7" and python_full_version < "3.0.0" and platform_system == "Windows" or python_full_version >= "3.5.0" and platform_system == "Windows") and (python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.7" and python_full_version >= "3.5.0") and (python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6") or sys_platform == "win32" and python_version >= "3.6" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6") and python_full_version >= "3.5.0") coloredlogs==15.0.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4" or python_version >= "3.6" and python_version < "4" and python_full_version >= "3.5.0" commonmark==0.9.1; python_full_version >= "3.6.2" and python_full_version < "4.0.0" -coverage==6.3; python_version >= "3.7" +coverage==6.3.1; python_version >= "3.7" cryptography==36.0.1; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4" or python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.7" cwltest==2.2.20210901154959; python_version >= "3.6" and python_version < "4" cwltool==3.1.20211107152837; python_version >= "3.6" and python_version < "4" @@ -70,12 +70,12 @@ gunicorn==20.1.0; python_version >= "3.5" gxformat2==0.15.0 h11==0.12.0; python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.1" h5py==3.6.0; python_version >= "3.7" -httpcore==0.14.5; python_version >= "3.6" +httpcore==0.14.6; python_version >= "3.6" httpx==0.22.0; python_version >= "3.6" humanfriendly==10.0; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4" or python_version >= "3.6" and python_version < "4" and python_full_version >= "3.5.0" idna==3.3 imagesize==1.3.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" -importlib-metadata==4.10.1; python_version == "3.7" and (python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.6.0" and python_version < "3.8" and python_version >= "3.7") and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6") +importlib-metadata==4.10.1; python_version == "3.7" and (python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.6.0" and python_version < "3.8" and python_version >= "3.7") and python_full_version >= "3.6.2" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6") importlib-resources==5.4.0; python_version >= "3.6" iniconfig==1.1.1; python_version >= "3.7" isa-rwval==0.10.10 @@ -112,7 +112,7 @@ paste==3.5.0 pastedeploy==2.1.1 pathspec==0.9.0; python_full_version >= "3.6.2" and python_version >= "3.6" pbr==5.8.0; python_version >= "2.6" -platformdirs==2.4.1; python_full_version >= "3.6.2" and python_version >= "3.7" +platformdirs==2.4.1; python_version >= "3.7" and python_full_version >= "3.6.2" pluggy==1.0.0; python_version >= "3.7" port-for==0.6.1; python_version >= "3.7" prettytable==3.0.0; python_version >= "3.7" @@ -127,7 +127,7 @@ pycryptodome==3.14.0; (python_version >= "2.7" and python_full_version < "3.0.0" pydantic==1.9.0; python_full_version >= "3.6.1" pydot==1.4.2; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4" or python_version >= "3.6" and python_version < "4" and python_full_version >= "3.4.0" pyeventsystem==0.1.0 -pyfaidx==0.6.3.1 +pyfaidx==0.6.4 pygithub==1.55; python_version >= "3.6" pygments==2.11.2; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.6" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6") pyjwt==2.3.0; python_version >= "3.6" @@ -151,7 +151,7 @@ pytest-pythonpath==0.7.3 pytest-shard==0.1.2; python_version >= "3.6" pytest==6.2.5; python_version >= "3.6" python-dateutil==2.8.2; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4" or python_version >= "3.6" and python_version < "4" and python_full_version >= "3.3.0" -python-irodsclient==1.1.0 +python-irodsclient==1.1.1 python-jose==3.3.0 python-multipart==0.0.5 python3-openid==3.2.0; python_version >= "3.0" @@ -206,7 +206,7 @@ testfixtures==6.18.3 tifffile==2021.11.2; python_version >= "3.7" tinydb==4.6.1; python_version >= "3.6" and python_version < "4.0" toml==0.10.2; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.7" -tomli==2.0.0; python_full_version >= "3.6.2" and python_version >= "3.7" +tomli==2.0.0; python_version >= "3.7" and python_full_version >= "3.6.2" tornado==6.1; python_version >= "3.5" tqdm==4.62.3; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" trio-websocket==0.9.2; python_version >= "3.7" and python_version < "4.0" @@ -230,5 +230,5 @@ whoosh==2.7.4 wrapt==1.13.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" wsproto==1.0.0; python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.1" yacman==0.8.4 -zipp==3.7.0; python_version == "3.7" and (python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.6.0" and python_version < "3.8" and python_version >= "3.7") +zipp==3.7.0; python_version == "3.7" and (python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.6.0" and python_version < "3.8" and python_version >= "3.7") and python_full_version >= "3.6.2" zipstream-new==1.1.8 diff --git a/pyproject.toml b/pyproject.toml index be52ef801f5..25767756218 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,6 +91,7 @@ zipstream-new = "*" [tool.poetry.dev-dependencies] cwltest = "2.2.20210901154959" +black = "^22.1.0" darker = "*" fluent-logger = "*" httpx = "*" From 3987b11805689e29cc1a87484f3301246530fe4b Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 09:41:58 -0500 Subject: [PATCH 04/21] Add black check action to python linting --- .github/workflows/lint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9dfd554cf3c..2e8b61d85b1 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -43,3 +43,4 @@ jobs: run: tox -e lint_docstring_include_list - name: Run mypy checks run: tox -e mypy + - uses: psf/black@stable From 412b6dc78df5f24c68e831a56ff586e3454d2166 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 11:40:36 -0500 Subject: [PATCH 05/21] Update shared pyfaidx to match (regenerated from poetry, this is the only change that should be required) --- lib/galaxy/dependencies/pinned-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/dependencies/pinned-requirements.txt b/lib/galaxy/dependencies/pinned-requirements.txt index 1aaed9f9450..c5fd30801a5 100644 --- a/lib/galaxy/dependencies/pinned-requirements.txt +++ b/lib/galaxy/dependencies/pinned-requirements.txt @@ -103,7 +103,7 @@ pycryptodome==3.14.0; (python_version >= "2.7" and python_full_version < "3.0.0" pydantic==1.9.0; python_full_version >= "3.6.1" pydot==1.4.2; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4" or python_version >= "3.6" and python_version < "4" and python_full_version >= "3.4.0" pyeventsystem==0.1.0 -pyfaidx==0.6.3.1 +pyfaidx==0.6.4 pygments==2.11.2; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.5" pyjwt==2.3.0; python_version >= "3.6" pykwalify==1.8.0 From 78e262922978f57e974d6b6833d7fc0057b7a4da Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 11:47:31 -0500 Subject: [PATCH 06/21] E203 handling -- see discussion in See https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 41a9a481e9e..e4a4adbd984 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,9 +7,10 @@ universal = 1 # E128 continuation line under-indented for visual indent # E402 module level import not at top of file # TODO, we would like to improve this. # E501 is line length +# E203 is whitespace before ':'; we follow black's formatting here. See https://github.com/psf/black/issues/315 # W503 is line breaks before binary operators, which has been reversed in PEP 8. # D** are docstring linting - which we mostly ignore except D302. (Hopefully we will solve more over time). -ignore = B008,E128,E501,E402,W503,D100,D101,D102,D103,D104,D105,D106,D107,D200,D201,D202,D204,D205,D206,D207,D208,D209,D210,D211,D300,D301,D400,D401,D402,D403,D412,D413 +ignore = B008,E128,E203,E501,E402,W503,D100,D101,D102,D103,D104,D105,D106,D107,D200,D201,D202,D204,D205,D206,D207,D208,D209,D210,D211,D300,D301,D400,D401,D402,D403,D412,D413 exclude = lib/galaxy/util/jstree.py # For flake8-import-order # https://github.com/PyCQA/flake8-import-order/blob/master/tests/test_cases/complete_smarkets.py From 0b63c1f50491fd60cfa97fa5495ba019ce281400 Mon Sep 17 00:00:00 2001 From: Dannon Date: Wed, 2 Feb 2022 15:23:45 -0500 Subject: [PATCH 07/21] Apply suggestions from code review Co-authored-by: Nicola Soranzo --- pyproject.toml | 5 +++-- setup.cfg | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 25767756218..b7437904ee5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,8 +90,8 @@ Whoosh = "*" zipstream-new = "*" [tool.poetry.dev-dependencies] -cwltest = "2.2.20210901154959" black = "^22.1.0" +cwltest = "2.2.20210901154959" darker = "*" fluent-logger = "*" httpx = "*" @@ -127,8 +127,9 @@ line-length = 120 target-version = ['py37'] include = '\.pyi?$' extend-exclude = ''' -/( +^/( | packages | tools )/ ''' +force-exclude = 'lib/galaxy/util/jstree.py' diff --git a/setup.cfg b/setup.cfg index e4a4adbd984..017ae8f9915 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,12 +5,12 @@ universal = 1 # These are exceptions allowed by Galaxy style guidelines: # B008 Do not perform function calls in argument defaults (for FastAPI Depends and Body) # E128 continuation line under-indented for visual indent +# E203 is whitespace before ':'; we follow black's formatting here. See https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated # E402 module level import not at top of file # TODO, we would like to improve this. # E501 is line length -# E203 is whitespace before ':'; we follow black's formatting here. See https://github.com/psf/black/issues/315 # W503 is line breaks before binary operators, which has been reversed in PEP 8. # D** are docstring linting - which we mostly ignore except D302. (Hopefully we will solve more over time). -ignore = B008,E128,E203,E501,E402,W503,D100,D101,D102,D103,D104,D105,D106,D107,D200,D201,D202,D204,D205,D206,D207,D208,D209,D210,D211,D300,D301,D400,D401,D402,D403,D412,D413 +ignore = B008,E128,E203,E402,E501,W503,D100,D101,D102,D103,D104,D105,D106,D107,D200,D201,D202,D204,D205,D206,D207,D208,D209,D210,D211,D300,D301,D400,D401,D402,D403,D412,D413 exclude = lib/galaxy/util/jstree.py # For flake8-import-order # https://github.com/PyCQA/flake8-import-order/blob/master/tests/test_cases/complete_smarkets.py From ae59ab561b5ccbbe8cadfd9a133bf4bc814c1029 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 15:25:22 -0500 Subject: [PATCH 08/21] Reorder pyproject.toml --- pyproject.toml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b7437904ee5..0a19ddcc294 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,15 @@ +[tool.black] +line-length = 120 +target-version = ['py37'] +include = '\.pyi?$' +extend-exclude = ''' +^/( + | packages + | tools +)/ +''' +force-exclude = 'lib/galaxy/util/jstree.py' + [tool.poetry] name = "galaxy" version = "22.01.dev0" @@ -121,15 +133,3 @@ testfixtures = "*" tuspy = "*" twill = "*" watchdog = "*" - -[tool.black] -line-length = 120 -target-version = ['py37'] -include = '\.pyi?$' -extend-exclude = ''' -^/( - | packages - | tools -)/ -''' -force-exclude = 'lib/galaxy/util/jstree.py' From 94a512b5586ddd296c5d0a2e2f589f4fca517a49 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 30 Jan 2022 13:24:12 +0100 Subject: [PATCH 09/21] Drop python3.6 compat import --- test/unit/webapps/test_request_scoped_sqlalchemy_sessions.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/unit/webapps/test_request_scoped_sqlalchemy_sessions.py b/test/unit/webapps/test_request_scoped_sqlalchemy_sessions.py index 6c619059a74..c4ea6e26fea 100644 --- a/test/unit/webapps/test_request_scoped_sqlalchemy_sessions.py +++ b/test/unit/webapps/test_request_scoped_sqlalchemy_sessions.py @@ -9,7 +9,6 @@ import pytest from fastapi import FastAPI from fastapi.param_functions import Depends from httpx import AsyncClient -pytest.importorskip("starlette_context") from starlette_context import context as request_context from galaxy.app_unittest_utils.galaxy_mock import MockApp From f6f9d119a30f08aabdd552506cf387364682947a Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 30 Jan 2022 13:13:27 +0100 Subject: [PATCH 10/21] Move conditional import to end of section This is necessary so that isort doesn't add extra lines between statements and import order linting doesn't fail. --- lib/galaxy/util/__init__.py | 22 ++++++++++------------ lib/galaxy/util/path/__init__.py | 10 +++++----- lib/galaxy/util/yaml_util.py | 2 +- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/lib/galaxy/util/__init__.py b/lib/galaxy/util/__init__.py index c45285715b1..a259fbb4f52 100644 --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -38,24 +38,27 @@ from urllib.parse import ( ) import requests +from boltons.iterutils import ( + default_enter, + remap, +) +from requests.adapters import HTTPAdapter +from requests.packages.urllib3.util.retry import Retry try: import grp except ImportError: # For Pulsar on Windows (which does not use the function that uses grp) grp = None # type: ignore[assignment] -from boltons.iterutils import ( - default_enter, - remap, -) +try: + import uwsgi +except ImportError: + uwsgi = None LXML_AVAILABLE = True try: from lxml import etree except ImportError: LXML_AVAILABLE = False import xml.etree.ElementTree as etree # type: ignore[assignment,no-redef] -from requests.adapters import HTTPAdapter -from requests.packages.urllib3.util.retry import Retry - try: import docutils.core as docutils_core import docutils.writers.html4css1 as docutils_html4css1 @@ -63,11 +66,6 @@ except ImportError: docutils_core = None # type: ignore[assignment] docutils_html4css1 = None # type: ignore[assignment] -try: - import uwsgi -except ImportError: - uwsgi = None - from .custom_logging import get_logger from .inflection import Inflector from .path import safe_contains, safe_makedirs, safe_relpath # noqa: F401 diff --git a/lib/galaxy/util/path/__init__.py b/lib/galaxy/util/path/__init__.py index 5d8b4bffbaa..d77854448df 100644 --- a/lib/galaxy/util/path/__init__.py +++ b/lib/galaxy/util/path/__init__.py @@ -6,10 +6,6 @@ import imp import logging import shlex from functools import partial -try: - from grp import getgrgid -except ImportError: - getgrgid = None # type: ignore[assignment] from itertools import starmap from operator import getitem from os import ( @@ -33,12 +29,16 @@ from os.path import ( sep as separator, ) from pathlib import Path +try: + from grp import getgrgid +except ImportError: + getgrgid = None # type: ignore[assignment] + try: from pwd import getpwuid except ImportError: getpwuid = None # type: ignore[assignment] - import galaxy.util WALK_MAX_DIRS = 10000 diff --git a/lib/galaxy/util/yaml_util.py b/lib/galaxy/util/yaml_util.py index 3427a70fd16..60b02f736b4 100644 --- a/lib/galaxy/util/yaml_util.py +++ b/lib/galaxy/util/yaml_util.py @@ -3,11 +3,11 @@ import os from collections import OrderedDict import yaml +from yaml.constructor import ConstructorError try: from yaml import CSafeLoader as SafeLoader except ImportError: from yaml import SafeLoader # type: ignore[misc] -from yaml.constructor import ConstructorError log = logging.getLogger(__name__) From 73bd2597bdd62ad3fea182216f0b5d23f5426163 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 30 Jan 2022 11:46:51 +0100 Subject: [PATCH 11/21] Configure isort to produce the right import order style --- pyproject.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0a19ddcc294..6788afd0fee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -133,3 +133,14 @@ testfixtures = "*" tuspy = "*" twill = "*" watchdog = "*" + +[tool.isort] +force_alphabetical_sort_within_sections = true +multi_line_output = 3 +force_grid_wrap = 2 +include_trailing_comma = true +src_paths = ['lib'] +known_first_party = ['galaxy_test'] +no_lines_before = ['LOCALFOLDER'] +reverse_relative = true +skip_gitignore = true From 0484e3061cc63b292b7c269275d0cf9f55bb5933 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 30 Jan 2022 13:45:34 +0100 Subject: [PATCH 12/21] Increase line length so long import statements aren't split --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 6788afd0fee..f172449c4a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -144,3 +144,4 @@ known_first_party = ['galaxy_test'] no_lines_before = ['LOCALFOLDER'] reverse_relative = true skip_gitignore = true +line_length = 200 From 54bde2cc2a846bf83be7193d5e65221e63bafa7e Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 30 Jan 2022 17:18:52 +0100 Subject: [PATCH 13/21] Move config to .isort.cfg --- .isort.cfg | 11 +++++++++++ pyproject.toml | 12 ------------ 2 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 .isort.cfg diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 00000000000..2197e0fc2f6 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,11 @@ +[settings] +force_alphabetical_sort_within_sections=true +multi_line_output=3 +force_grid_wrap=2 +include_trailing_comma=true +src_paths=lib +known_first_party=galaxy_test +no_lines_before=LOCALFOLDER +reverse_relative=true +skip_gitignore=true +line_length=200 diff --git a/pyproject.toml b/pyproject.toml index f172449c4a4..0a19ddcc294 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -133,15 +133,3 @@ testfixtures = "*" tuspy = "*" twill = "*" watchdog = "*" - -[tool.isort] -force_alphabetical_sort_within_sections = true -multi_line_output = 3 -force_grid_wrap = 2 -include_trailing_comma = true -src_paths = ['lib'] -known_first_party = ['galaxy_test'] -no_lines_before = ['LOCALFOLDER'] -reverse_relative = true -skip_gitignore = true -line_length = 200 From 480b62f372117eece3c4c87bf555bd02be095a23 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 22:00:15 -0500 Subject: [PATCH 14/21] Add isort devdependency --- lib/galaxy/dependencies/dev-requirements.txt | 9 +++++---- lib/galaxy/dependencies/pinned-requirements.txt | 3 ++- pyproject.toml | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/dependencies/dev-requirements.txt b/lib/galaxy/dependencies/dev-requirements.txt index 9e02e9b9843..80742143f6f 100644 --- a/lib/galaxy/dependencies/dev-requirements.txt +++ b/lib/galaxy/dependencies/dev-requirements.txt @@ -30,7 +30,7 @@ cached-property==1.5.2; python_version < "3.8" and python_version >= "3.7" celery==5.2.3; python_version >= "3.7" certifi==2021.10.8; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4" or python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.7" cffi==1.15.0 -charset-normalizer==2.0.11; python_full_version >= "3.6.0" and python_version >= "3.6" and python_version < "4" +charset-normalizer==2.0.11; python_full_version >= "3.6.0" and python_version >= "3.7" and python_version < "4" cheetah3==3.2.6.post1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0") circus==0.17.1 click-didyoumean==0.3.0; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.7" @@ -80,6 +80,7 @@ importlib-resources==5.4.0; python_version >= "3.6" iniconfig==1.1.1; python_version >= "3.7" isa-rwval==0.10.10 isodate==0.6.1; python_version >= "3.7" and python_version < "4" +isort==5.10.1; python_full_version >= "3.6.1" and python_version < "4.0" jinja2==3.0.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" jsonschema==4.4.0; python_version >= "3.7" junit-xml==1.9; python_version >= "3.6" and python_version < "4" @@ -91,7 +92,7 @@ mako==1.1.6; (python_version >= "2.7" and python_full_version < "3.0.0") or (pyt markdown-it-reporter==0.0.2 markdown==3.3.6; python_version >= "3.6" markupsafe==2.0.1; python_version >= "3.6" -mercurial==6.0.1 +mercurial==6.0.2 mirakuru==2.4.1; python_version >= "3.7" mistune==0.8.4; python_version >= "3.7" and python_version < "4" mrcfile==1.3.0 @@ -166,7 +167,7 @@ repoze.lru==0.7 requests-oauthlib==1.3.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" requests-toolbelt==0.9.1; python_version >= "3.6" requests==2.27.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0") -responses==0.17.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0") +responses==0.18.0; python_version >= "3.7" rfc3986==1.5.0; python_version >= "3.6" rich==11.1.0; python_full_version >= "3.6.2" and python_full_version < "4.0.0" routes==2.5.1 @@ -177,7 +178,7 @@ schema-salad==8.2.20220103095339; python_version >= "3.7" and python_version < " selenium==4.1.0; python_version >= "3.7" and python_version < "4.0" setuptools-scm==5.0.2; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version < "4" shellescape==3.8.1; python_version >= "3.6" and python_version < "4" -six==1.16.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4" or python_full_version >= "3.5.0" and python_version >= "3.7" and python_version < "4" +six==1.16.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4" or python_full_version >= "3.3.0" and python_version >= "3.7" and python_version < "4" sniffio==1.2.0; python_version >= "3.7" and python_full_version >= "3.6.2" and python_version < "4.0" snowballstemmer==2.2.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" social-auth-core==4.0.3 diff --git a/lib/galaxy/dependencies/pinned-requirements.txt b/lib/galaxy/dependencies/pinned-requirements.txt index c5fd30801a5..4a98d727db5 100644 --- a/lib/galaxy/dependencies/pinned-requirements.txt +++ b/lib/galaxy/dependencies/pinned-requirements.txt @@ -67,6 +67,7 @@ importlib-metadata==4.10.1; python_version == "3.7" and (python_version >= "3.7" importlib-resources==5.4.0; python_version >= "3.6" isa-rwval==0.10.10 isodate==0.6.1; python_version >= "3.7" and python_version < "4" +isort==5.10.1; python_full_version >= "3.6.1" and python_version < "4.0" jsonschema==4.4.0; python_version >= "3.7" kombu==5.2.3; python_version >= "3.7" lagom==1.7.0; python_version >= "3.6" and python_version < "4.0" @@ -75,7 +76,7 @@ lxml==4.7.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (pyt mako==1.1.6; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0") markdown==3.3.6; python_version >= "3.6" markupsafe==2.0.1; python_version >= "3.6" -mercurial==6.0.1 +mercurial==6.0.2 mistune==0.8.4; python_version >= "3.7" and python_version < "4" mrcfile==1.3.0 msgpack==1.0.3; python_version >= "3.7" and python_version < "4" diff --git a/pyproject.toml b/pyproject.toml index 0a19ddcc294..f15c7bf6c54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,6 +100,7 @@ uvloop = "*" WebOb = "*" Whoosh = "*" zipstream-new = "*" +isort = "^5.10.1" [tool.poetry.dev-dependencies] black = "^22.1.0" From 3dc305433cb2cb40251bbf21a14c08ada983594c Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 22:03:21 -0500 Subject: [PATCH 15/21] Isort config update from Nicola at https://github.com/galaxyproject/galaxy/pull/13270\#discussion_r798123586 --- .isort.cfg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.isort.cfg b/.isort.cfg index 2197e0fc2f6..99c5810d05d 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,11 +1,11 @@ [settings] +extend_skip=doc/source/conf.py,lib/galaxy/util/jstree.py force_alphabetical_sort_within_sections=true -multi_line_output=3 -force_grid_wrap=2 -include_trailing_comma=true -src_paths=lib -known_first_party=galaxy_test +force_grid_wrap=2 # Override value from profile=black, but black is still happy +line_length=120 # Same as for black no_lines_before=LOCALFOLDER +profile=black reverse_relative=true skip_gitignore=true -line_length=200 +skip_glob=database/* # Make isort run faster +src_paths=lib From 2ee2adae5d6e7c67a8ec5c1851dfc16adf0c49da Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 22:14:20 -0500 Subject: [PATCH 16/21] Fix comments in .isort.cfg -- looks like you can't have inline comments here? --- .isort.cfg | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.isort.cfg b/.isort.cfg index 99c5810d05d..b3778fdf7c4 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,11 +1,14 @@ [settings] extend_skip=doc/source/conf.py,lib/galaxy/util/jstree.py force_alphabetical_sort_within_sections=true -force_grid_wrap=2 # Override value from profile=black, but black is still happy -line_length=120 # Same as for black +# Override force_grid_wrap value from profile=black, but black is still happy +force_grid_wrap=2 +# Same line length as for black +line_length=120 no_lines_before=LOCALFOLDER profile=black reverse_relative=true skip_gitignore=true -skip_glob=database/* # Make isort run faster +# Make isort run faster by skipping database +skip_glob=database/* src_paths=lib From bf0ad06e22ff514646beed8fd53a77108d154ec2 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 3 Feb 2022 07:00:28 -0500 Subject: [PATCH 17/21] Move isort back into devDependencies. --- lib/galaxy/dependencies/pinned-requirements.txt | 1 - pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/galaxy/dependencies/pinned-requirements.txt b/lib/galaxy/dependencies/pinned-requirements.txt index 4a98d727db5..808cc037714 100644 --- a/lib/galaxy/dependencies/pinned-requirements.txt +++ b/lib/galaxy/dependencies/pinned-requirements.txt @@ -67,7 +67,6 @@ importlib-metadata==4.10.1; python_version == "3.7" and (python_version >= "3.7" importlib-resources==5.4.0; python_version >= "3.6" isa-rwval==0.10.10 isodate==0.6.1; python_version >= "3.7" and python_version < "4" -isort==5.10.1; python_full_version >= "3.6.1" and python_version < "4.0" jsonschema==4.4.0; python_version >= "3.7" kombu==5.2.3; python_version >= "3.7" lagom==1.7.0; python_version >= "3.6" and python_version < "4.0" diff --git a/pyproject.toml b/pyproject.toml index f15c7bf6c54..fe6c0bd55d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,7 +100,6 @@ uvloop = "*" WebOb = "*" Whoosh = "*" zipstream-new = "*" -isort = "^5.10.1" [tool.poetry.dev-dependencies] black = "^22.1.0" @@ -108,6 +107,7 @@ cwltest = "2.2.20210901154959" darker = "*" fluent-logger = "*" httpx = "*" +isort = "^5.10.1" lxml = "!=4.2.2" markdown-it-reporter = "*" NoseHTML = "*" From ff08c9c75e9e5cbbf6bd2df2ea23471487139a5e Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 22:22:35 -0500 Subject: [PATCH 18/21] Drop flake8-import-order (this will all be automagically reordered by isort, so there's no need to lint the order) --- lib/galaxy/dependencies/lint-requirements.txt | 1 - lib/galaxy/dependencies/pinned-lint-requirements.txt | 1 - setup.cfg | 4 ---- 3 files changed, 6 deletions(-) diff --git a/lib/galaxy/dependencies/lint-requirements.txt b/lib/galaxy/dependencies/lint-requirements.txt index 4360f8e7166..b629fbe1728 100644 --- a/lib/galaxy/dependencies/lint-requirements.txt +++ b/lib/galaxy/dependencies/lint-requirements.txt @@ -1,6 +1,5 @@ flake8 flake8-bugbear -flake8-import-order mypy==0.910 types-bleach types-boto diff --git a/lib/galaxy/dependencies/pinned-lint-requirements.txt b/lib/galaxy/dependencies/pinned-lint-requirements.txt index f6212039a2f..f0ee2ef900f 100644 --- a/lib/galaxy/dependencies/pinned-lint-requirements.txt +++ b/lib/galaxy/dependencies/pinned-lint-requirements.txt @@ -1,7 +1,6 @@ attrs==21.4.0 flake8==4.0.1 flake8-bugbear==22.1.11 -flake8-import-order==0.18.1 importlib-metadata==4.2.0 mccabe==0.6.1 mypy==0.910 diff --git a/setup.cfg b/setup.cfg index 017ae8f9915..1ae7ccabadc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,10 +12,6 @@ universal = 1 # D** are docstring linting - which we mostly ignore except D302. (Hopefully we will solve more over time). ignore = B008,E128,E203,E402,E501,W503,D100,D101,D102,D103,D104,D105,D106,D107,D200,D201,D202,D204,D205,D206,D207,D208,D209,D210,D211,D300,D301,D400,D401,D402,D403,D412,D413 exclude = lib/galaxy/util/jstree.py -# For flake8-import-order -# https://github.com/PyCQA/flake8-import-order/blob/master/tests/test_cases/complete_smarkets.py -import-order-style = smarkets -application-import-names = galaxy,galaxy_test,tool_shed [mypy] show_error_codes = True From fb454041b1d13e08589e14c6b5ba28a9e78075a8 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 22:35:36 -0500 Subject: [PATCH 19/21] Ignore E203 even for stricter linting subset --- .ci/flake8_wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/flake8_wrapper.sh b/.ci/flake8_wrapper.sh index b6fb1a2e0f6..522a7b2abb2 100755 --- a/.ci/flake8_wrapper.sh +++ b/.ci/flake8_wrapper.sh @@ -5,4 +5,4 @@ set -e flake8 --exclude $(paste -sd, .ci/flake8_ignorelist.txt) . # Apply stricter rules for the directories shared with Pulsar -flake8 --ignore=D --max-line-length=150 lib/galaxy/jobs/runners/util/ +flake8 --ignore=E203,D --max-line-length=150 lib/galaxy/jobs/runners/util/ From c6d250516e269127a7e5e34aefe94734ded31f2a Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 2 Feb 2022 22:38:49 -0500 Subject: [PATCH 20/21] Add simple make target for formatting everything (non-diff) --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 679a56cb5a1..22ac7eba74a 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,10 @@ setup-venv: diff-format: $(IN_VENV) darker -r $(TARGET_BRANCH) +format: + $(IN_VENV) black . + $(IN_VENV) isort . + list-dependency-updates: setup-venv $(IN_VENV) pip list --outdated --format=columns From ff2f3600f4315eb0165103e7c37285a46f5e5ccf Mon Sep 17 00:00:00 2001 From: Dannon Date: Thu, 3 Feb 2022 06:56:42 -0500 Subject: [PATCH 21/21] Update Makefile Co-authored-by: Nicola Soranzo --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 22ac7eba74a..1c8d1e0a6d1 100644 --- a/Makefile +++ b/Makefile @@ -42,8 +42,8 @@ diff-format: $(IN_VENV) darker -r $(TARGET_BRANCH) format: - $(IN_VENV) black . $(IN_VENV) isort . + $(IN_VENV) black . list-dependency-updates: setup-venv $(IN_VENV) pip list --outdated --format=columns