@@ -26,6 +26,14 @@ CWL_TARGETS := test/functional/tools/cwl_tools/v1.0/conformance_tests.yaml \
26
26
lib/galaxy_test/api/cwl/test_cwl_conformance_v1_1.py \
27
27
lib/galaxy_test/api/cwl/test_cwl_conformance_v1_2.py
28
28
NO_YARN_MSG ="Could not find yarn, which is required to build the Galaxy client.\nIt should be shipped with Galaxy's virtualenv, but to install yarn manually please visit \033[0;34mhttps://yarnpkg.com/en/docs/install\033[0m for instructions, and package information for all platforms.\n"
29
+ SPACE := $() $()
30
+ NEVER_PYUPGRADE_PATHS := .venv/ .tox/ lib/galaxy/schema/bco/ \
31
+ lib/galaxy/schema/drs/ lib/tool_shed_client/schema/trs \
32
+ scripts/check_python.py tools/ test/functional/tools/cwl_tools/
33
+ PY37_PYUPGRADE_PATHS := lib/galaxy/exceptions/ lib/galaxy/job_metrics/ \
34
+ lib/galaxy/objectstore/ lib/galaxy/tool_util/ lib/galaxy/util/ \
35
+ test/unit/job_metrics/ test/unit/objectstore/ test/unit/tool_util/ \
36
+ test/unit/util/
29
37
30
38
all : help
31
39
@echo " This makefile is used for building Galaxy's JS client, documentation, and drive the release process. A sensible all target is not implemented."
@@ -54,10 +62,10 @@ format: ## Format Python code base
54
62
remove-unused-imports : # # Remove unused imports in Python code base
55
63
$(IN_VENV ) autoflake --in-place --remove-all-unused-imports --recursive --verbose lib/ test/
56
64
57
- pyupgrade : # # Convert older code patterns to Python3 .7/3.8 idiomatic ones
58
- ack --type=python -f | grep -v ' ^lib/galaxy/schema/bco/ \|^lib/galaxy/schema/drs/\|^lib/tool_shed_client/schema/trs\|^tools/\|^.venv/\|^.tox/\|^lib/galaxy/exceptions/\|^lib/galaxy/job_metrics/\|^lib/galaxy/objectstore/\|^lib/galaxy/tool_util/\|^lib/galaxy/util/\|^test/functional/tools/cwl_tools/ ' | xargs pyupgrade --py38 -plus
59
- ack --type=python -f | grep -v ' ^lib/galaxy/schema/bco/ \|^lib/galaxy/schema/drs/\|^lib/tool_shed_client/schema/trs\|^tools/\|^.venv/\|^.tox/\|^lib/galaxy/exceptions/\|^lib/galaxy/job_metrics/\|^lib/galaxy/objectstore/\|^lib/galaxy/tool_util/\|^lib/galaxy/util/\|^test/functional/tools/cwl_tools/ ' | xargs auto-walrus
60
- ack --type=python -f lib/galaxy/exceptions/ lib/galaxy/job_metrics/ lib/galaxy/objectstore/ lib/galaxy/tool_util/ lib/galaxy/util/ | xargs pyupgrade --py37-plus
65
+ pyupgrade : # # Convert older code patterns to Python 3 .7/3.9 idiomatic ones
66
+ ack --type=python -f | grep -v ' ^$(subst $(SPACE), \|^,$(NEVER_PYUPGRADE_PATHS) $(PY37_PYUPGRADE_PATHS)) ' | xargs pyupgrade --py39 -plus
67
+ ack --type=python -f | grep -v ' ^$(subst $(SPACE), \|^,$(NEVER_PYUPGRADE_PATHS) $(PY37_PYUPGRADE_PATHS)) ' | xargs auto-walrus
68
+ ack --type=python -f $( PY37_PYUPGRADE_PATHS ) | xargs pyupgrade --py37-plus
61
69
62
70
docs-slides-ready :
63
71
test -f plantuml.jar || wget http://jaist.dl.sourceforge.net/project/plantuml/plantuml.jar
0 commit comments