23
23
poetry install --no-interaction --no-root --only format
24
24
- name : Format with black
25
25
run : |
26
- poetry run black --check -l 100 -t py38 -S ranzen/
27
- poetry run black --check -l 100 -t py38 -S tests/
26
+ poetry run black --check -l 100 -t py310 -S ranzen/
27
+ poetry run black --check -l 100 -t py310 -S tests/
28
28
29
29
lint_with_ruff :
30
30
runs-on : ubuntu-latest
@@ -42,33 +42,45 @@ jobs:
42
42
poetry install --no-interaction --no-root --only lint
43
43
- name : Lint with ruff
44
44
run : |
45
- poetry run ruff check --format=github ranzen
45
+ poetry run ruff check --output- format=github ranzen
46
46
- name : Lint tests with ruff
47
47
run : |
48
- poetry run ruff check --format=github tests
48
+ poetry run ruff check --output- format=github tests
49
49
50
50
check_docstrings :
51
51
52
52
runs-on : ubuntu-latest
53
53
54
54
steps :
55
- - uses : actions/checkout@v3
56
- - name : Set up Python 3.11
57
- uses : actions/setup-python@v4
58
- with :
59
- python-version : " 3.11"
60
- - name : Install poetry
61
- run : pipx install poetry
62
- - name : Install dependencies
63
- run : |
64
- poetry env use 3.11
65
- poetry install --no-interaction --no-root --only docs
66
- - name : Check docstrings with darglint
67
- run : |
68
- poetry run darglint --docstring-style sphinx -v 2 -z long ranzen
69
- - name : Build with sphinx
70
- run : |
71
- poetry run sphinx-build -W -b html ./docs ./docs/_build
55
+ # ----------------------------------------------
56
+ # ---- check-out repo and set-up python ----
57
+ # ----------------------------------------------
58
+ - name : Check out repository
59
+ uses : actions/checkout@v3
60
+ # ----------------------------------------------
61
+ # ----- install & configure poetry -----
62
+ # ----------------------------------------------
63
+ - name : Install poetry
64
+ run : pipx install poetry
65
+ - name : Set up Python 3.10
66
+ uses : actions/setup-python@v4
67
+ with :
68
+ python-version : " 3.10"
69
+ cache : ' poetry'
70
+
71
+ # ----------------------------------------------
72
+ # install dependencies if cache does not exist
73
+ # ----------------------------------------------
74
+ - name : Install dependencies
75
+ run : |
76
+ poetry env use 3.10
77
+ poetry install --no-interaction --no-root -E all --with torchcpu --without format --without lint --with docs
78
+ - name : Check docstrings with pydoclint
79
+ run : |
80
+ poetry run pydoclint ranzen
81
+ - name : Build with sphinx
82
+ run : |
83
+ poetry run sphinx-build -W -b html ./docs ./docs/_build
72
84
73
85
run_tests_and_type_checking :
74
86
needs : [format_with_black, lint_with_ruff, check_docstrings]
@@ -85,19 +97,19 @@ jobs:
85
97
# ----------------------------------------------
86
98
- name : Install poetry
87
99
run : pipx install poetry
88
- - name : Set up Python 3.8
100
+ - name : Set up Python 3.10
89
101
uses : actions/setup-python@v4
90
102
with :
91
- python-version : 3.8
103
+ python-version : " 3.10 "
92
104
cache : ' poetry'
93
105
94
106
# ----------------------------------------------
95
107
# install dependencies if cache does not exist
96
108
# ----------------------------------------------
97
109
- name : Install dependencies
98
110
run : |
99
- poetry env use 3.8
100
- poetry install --no-interaction --no-root -E all --with torchcpu --without format --without lint --without docs
111
+ poetry env use 3.10
112
+ poetry install --no-interaction --no-root -E all --with torchcpu --without format --without lint
101
113
102
114
# ----------------------------------------------
103
115
# ----- Run type checking -----
0 commit comments