Skip to content

Commit 728a48b

Browse files
committed
Minor repository updates
* `.github/workflows/checks.yaml`: * Make `Checks` run for every branch and PR * Use glob in `hashFiles`, instead of hard-coded names * Use title-case naming for steps * Rename `.github/workflows/run-tests.yaml` to `.github/workflows/tests.yaml` and `Tests` as title * Add `-e file:.#egg=pylint-pytest` to `requirements/dev.in` * It seems that #33 / a410e15 does not pick up `pylint`; resulting it being purged from the venv - and the tests failing subsequently (see https://github.com/pylint-dev/pylint-pytest/actions/runs/7298965817/job/19891092695?pr=33#step:6:30) * Remove the stale `pyproject.toml` + `pip install --no-deps -e .` references from `Makefile` Signed-off-by: Stavros Ntentos <[email protected]>
1 parent 1ca1d86 commit 728a48b

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

.github/workflows/checks.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ name: Checks
33

44
on:
55
push:
6-
branches:
7-
- master
86
pull_request:
9-
branches:
10-
- master
117

128
env:
139
CACHE_VERSION: 1
@@ -43,9 +39,7 @@ jobs:
4339
id: generate-python-key
4440
run: >-
4541
echo "key=${{ env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{
46-
hashFiles('pyproject.toml', 'requirements_test.txt',
47-
'requirements_test_min.txt', 'requirements_test_pre_commit.txt') }}" >>
48-
$GITHUB_OUTPUT
42+
hashFiles('pyproject.toml', 'requirements/**.txt') }}" >> $GITHUB_OUTPUT
4943
- name: Restore Python virtual environment
5044
id: cache-venv
5145
uses: actions/[email protected]
@@ -66,7 +60,7 @@ jobs:
6660
path: ${{ env.PRE_COMMIT_CACHE }}
6761
key: >-
6862
${{ runner.os }}-${{ steps.generate-pre-commit-key.outputs.key }}
69-
- name: install dependencies
63+
- name: Install Dependencies
7064
if: steps.cache-venv.outputs.cache-hit != 'true'
7165
run: make install
7266

.github/workflows/run-tests.yaml renamed to .github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Testing
2+
name: Tests
33

44
on:
55
push:

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ requirements/dev.txt: .venv requirements/dev.in pyproject.toml
1616
--quiet --generate-hashes --max-rounds=20 --strip-extras \
1717
--resolver=backtracking \
1818
--output-file requirements/dev.txt \
19-
requirements/dev.in pyproject.toml
19+
requirements/dev.in
2020

2121
# upgrades the dependencies to their latest/matching version
2222
.PHONY: upgrade
@@ -26,14 +26,12 @@ upgrade: .venv
2626
--upgrade \
2727
--resolver=backtracking \
2828
--output-file requirements/dev.txt \
29-
requirements/dev.in pyproject.toml
29+
requirements/dev.in
3030

3131

3232
# creates the venv if not present then install the dependencies, the package and pre-commit
3333
.PHONY: install
3434
install: .venv
3535
pip-sync requirements/dev.txt
36-
# install pylint_pytest (deps are already handled by the line before)
37-
pip install --no-deps -e .
3836
# install pre-commit hooks
3937
pre-commit install

requirements/dev.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Install pylint-pytest and its dependencies.
2+
# tl;dr: Install pylint
3+
-e file:.#egg=pylint-pytest
4+
15
# to handle dependencies
26
pip-tools
37
wheel

requirements/dev.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
5-
# pip-compile --generate-hashes --max-rounds=20 --output-file=requirements/dev.txt --strip-extras pyproject.toml requirements/dev.in
5+
# pip-compile --generate-hashes --max-rounds=20 --output-file=requirements/dev.txt --strip-extras requirements/dev.in
66
#
7+
# WARNING: pip install will require the following package to be hashed.
8+
# Consider using a hashable URL like https://github.com/jazzband/pip-tools/archive/SOMECOMMIT.zip
9+
-e file:.#egg=pylint-pytest
10+
# via -r requirements/dev.in
711
astroid==3.0.1 \
812
--hash=sha256:7d5895c9825e18079c5aeac0572bc2e4c83205c95d416e0b4fee8bc361d2d9ca \
913
--hash=sha256:86b0bb7d7da0be1a7c4aedb7974e391b32d4ed89e33de6ed6902b4b15c97577e
@@ -135,7 +139,7 @@ pre-commit==3.5.0 \
135139
pylint==3.0.2 \
136140
--hash=sha256:0d4c286ef6d2f66c8bfb527a7f8a629009e42c99707dec821a03e1b51a4c1496 \
137141
--hash=sha256:60ed5f3a9ff8b61839ff0348b3624ceeb9e6c2a92c514d81c9cc273da3b6bcda
138-
# via pylint-pytest (pyproject.toml)
142+
# via pylint-pytest
139143
pyproject-hooks==1.0.0 \
140144
--hash=sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8 \
141145
--hash=sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5
@@ -145,7 +149,7 @@ pytest==7.4.3 \
145149
--hash=sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5
146150
# via
147151
# -r requirements/dev.in
148-
# pylint-pytest (pyproject.toml)
152+
# pylint-pytest
149153
# pytest-cov
150154
pytest-cov==4.1.0 \
151155
--hash=sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6 \

0 commit comments

Comments
 (0)