File tree 6 files changed +34
-46
lines changed
6 files changed +34
-46
lines changed Original file line number Diff line number Diff line change 36
36
37
37
- uses : actions/setup-java@v3
38
38
with :
39
- java-version : ' 8 '
39
+ java-version : ' 11 '
40
40
distribution : ' zulu'
41
41
cache : ' maven'
42
42
@@ -56,22 +56,10 @@ jobs:
56
56
- uses : actions/setup-python@v3
57
57
58
58
- name : Lint code
59
- uses : psf/black@stable
60
-
61
- - name : Flake code
62
- run : |
63
- python -m pip install flake8 Flake8-pyproject flake8-typing-imports
64
- python -m flake8 src tests
65
-
66
- - name : Check import ordering
67
- uses : isort/isort-action@master
68
- with :
69
- configuration : --check-only
70
-
71
- - name : Validate pyproject.toml
72
59
run : |
73
- python -m pip install validate-pyproject[all]
74
- python -m validate_pyproject pyproject.toml
60
+ python -m pip install ruff
61
+ ruff check
62
+ ruff format --check
75
63
76
64
conda-dev-test :
77
65
name : Conda Setup & Code Coverage
Original file line number Diff line number Diff line change 20
20
lint : check
21
21
bin/lint.sh
22
22
23
+ fmt : check
24
+ bin/fmt.sh
25
+
23
26
test : check
24
27
bin/test.sh
25
28
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ dir=$( dirname " $0 " )
4
+ cd " $dir /.."
5
+
6
+ exitCode=0
7
+ ruff check --fix
8
+ code=$? ; test $code -eq 0 || exitCode=$code
9
+ ruff format
10
+ code=$? ; test $code -eq 0 || exitCode=$code
11
+ exit $exitCode
Original file line number Diff line number Diff line change @@ -4,12 +4,8 @@ dir=$(dirname "$0")
4
4
cd " $dir /.."
5
5
6
6
exitCode=0
7
- black src tests
7
+ ruff check
8
8
code=$? ; test $code -eq 0 || exitCode=$code
9
- isort src tests
10
- code=$? ; test $code -eq 0 || exitCode=$code
11
- python -m flake8 src tests
12
- code=$? ; test $code -eq 0 || exitCode=$code
13
- validate-pyproject pyproject.toml
9
+ ruff format --check
14
10
code=$? ; test $code -eq 0 || exitCode=$code
15
11
exit $exitCode
Original file line number Diff line number Diff line change @@ -28,19 +28,13 @@ dependencies:
28
28
- pandas
29
29
# Developer tools
30
30
- assertpy
31
- - autopep8
32
- - black
33
- - build
34
- - flake8
35
- - isort
36
31
- pytest
37
32
- pytest-cov
33
+ - ruff
38
34
- toml
39
35
# Project from source
40
36
- pip
41
37
- pip :
42
38
- git+https://github.com/ninia/jep.git@cfca63f8b3398daa6d2685428660dc4b2bfab67d
43
- - flake8-pyproject
44
- - flake8-typing-imports
45
- - validate-pyproject[all]
39
+ - build
46
40
- -e .
Original file line number Diff line number Diff line change @@ -40,20 +40,14 @@ dependencies = [
40
40
# NB: Keep this in sync with dev-environment.yml!
41
41
dev = [
42
42
" assertpy" ,
43
- " autopep8" ,
44
- " black" ,
45
43
" build" ,
46
- " flake8" ,
47
- " flake8-pyproject" ,
48
- " flake8-typing-imports" ,
49
- " isort" ,
50
44
" jep" ,
51
45
" pytest" ,
52
46
" pytest-cov" ,
53
47
" numpy" ,
54
48
" pandas" ,
55
- " toml " ,
56
- " validate-pyproject[all] " ,
49
+ " ruff " ,
50
+ " toml "
57
51
]
58
52
59
53
[project .urls ]
@@ -72,13 +66,15 @@ where = ["src"]
72
66
namespaces = false
73
67
74
68
# Thanks to Flake8-pyproject, we can configure flake8 here!
75
- [tool .flake8 ]
76
- exclude = [" bin" , " build" , " dist" ]
69
+ [tool .ruff ]
70
+ line-length = 88
71
+ src = [" src" , " tests" ]
72
+ include = [" pyproject.toml" , " src/**/*.py" , " tests/**/*.py" ]
73
+ extend-exclude = [" bin" , " build" , " dist" ]
74
+
75
+ [tool .ruff .lint ]
77
76
extend-ignore = [" E203" ]
78
- # See https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
79
- max-line-length = 88
80
- min_python_version = " 3.8"
81
- per-file-ignores = " __init__.py:F401"
82
77
83
- [tool .isort ]
84
- profile = " black"
78
+ [tool .ruff .lint .per-file-ignores ]
79
+ # Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`.
80
+ "__init__.py" = [" E402" , " F401" ]
You can’t perform that action at this time.
0 commit comments