10000 🧹⚙️ Update GHA (#1415) · pykeen/pykeen@42e005c · GitHub
[go: up one dir, main page]

Skip to content

Commit 42e005c

Browse files
authored
🧹⚙️ Update GHA (#1415)
- [x] check documentation in default job - [x] only run `mypy` & `flake8` on different Python versions - [x] temporarily add a `torch<2.4` version constraint to fix issues on Windows, cf. pytorch/pytorch#132400
1 parent 19d5bc8 commit 42e005c

File tree

5 files changed

+40
-16
lines changed

5 files changed

+40
-16
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ ignore =
2121
# bugbear seems to emit false positives, cf. https://github.com/PyCQA/flake8-bugbear/issues/278
2222
B024
2323
B028
24+
# pydoclint: good point, but tbd in a separate commit
25+
DOC301
2426
exclude =
2527
.tox,
2628
.git,

.github/workflows/common.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
# no need to check documentation wit multiple python versions
17+
# no need to check documentation with multiple python versions
1818
python-version: [ "3.11" ]
1919
steps:
2020
- uses: actions/checkout@v4
@@ -29,9 +29,6 @@ jobs:
2929

3030
- name: Install dependencies
3131
run: pip install tox
32-
33-
- name: Check RST conformity with doc8
34-
run: tox -e doc8
3532

3633
# - name: Check RST format
3734
# run: tox -e doclint

.github/workflows/lint.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,44 @@ jobs:
2727
- name: Install dependencies
2828
run: pip install tox
2929

30-
- name: Check package metadata with Pyroma
31-
run: tox -e pyroma
32-
33-
- name: Check docstring coverage
34-
run: tox -e docstr-coverage
35-
3630
- name: Check static typing with MyPy
3731
run: tox -e mypy
3832

39-
- name: Check manifest
40-
run: tox -e manifest
41-
4233
- name: Check code quality with flake8
4334
run: tox -e flake8
35+
36+
lint-single-version:
37+
name: Lint Single Version
38+
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
python-version: [ "3.11" ]
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Set up Python ${{ matrix.python-version }}
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: ${{ matrix.python-version }}
49+
# cache dependencies, cf. https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
50+
cache: 'pip'
51+
cache-dependency-path: './setup.cfg'
52+
53+
- name: Install dependencies
54+
run: pip install tox
55+
56+
- name: Check package metadata with Pyroma
57+
run: tox -e pyroma
58+
59+
- name: Check docstring coverage
60+
run: tox -e docstr-coverage
61+
62+
- name: Check manifest
63+
run: tox -e manifest
64+
65+
- name: Check RST conformity with doc8
66+
run: tox -e doc8
67+
4468

4569
concurrency:
4670
group: ${{ github.workflow }}-${{ github.ref }}

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ install_requires =
5858
click
5959
click_default_group
6060
scikit-learn
61-
torch>=2.0
61+
torch>=2.0,<2.4
6262
tqdm
6363
requests
6464
optuna>=2.0.0

tox.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,18 @@ description = Run documentation linters.
108108
skip_install = true
109109
deps =
110110
black
111-
darglint
112111
flake8<5.0.0
113112
# flake8-bandit
114113
flake8-black
115114
flake8-bugbear
116115
flake8-colors
116+
# for support of "# docstr-coverage: inherited"
117+
# note: pydocstyle is deprecated in favour of ruff
117118
flake8-docstrings<1.6
118119
flake8-isort==5.0.0
119120
flake8-print
120121
pep8-naming
121-
pydocstyle
122+
pydoclint[flake8]
122123
commands =
123124
flake8 src/pykeen/ tests/
124125
description = Run the flake8 tool with several plugins (bandit, docstrings, import order, pep8 naming).

0 commit comments

Comments
 (0)
0