Skip to content

Commit c28f32d

Browse files
Better organize lint and test dependencies (aio-libs#636)
* Better organize lint and test dependencies - Rename ci deps to test deps to only install test deps in test CI job. - Move build, pre-commit, twine and types-setuptools to lint deps - Move tox to dev dep since it's never used in CI - Move cython into its own file so that it can be used as a constraint - Fix CI jobs and Makefile to use the appropriate requirement files * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add news blurb * towncrier is not needed for in test deps * Remove version constraints from build and twine * Update CHANGES/636.contrib.rst * Update CHANGES/636.contrib.rst --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a611cc2 commit c28f32d

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

.github/workflows/ci-cd.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ jobs:
9292
- name: Install core libraries for build
9393
run: python -Im pip install build
9494
- name: Build sdists and pure-python wheel
95-
env:
96-
PIP_CONSTRAINT: requirements/ci.txt
9795
run: python -Im build --config-setting=pure-python=true
9896
- name: Determine actual created filenames
9997
id: dist-filenames-detection
@@ -240,7 +238,7 @@ jobs:
240238
- name: Install dependencies
241239
uses: py-actions/py-dependency-install@v4
242240
with:
243-
path: requirements/ci.txt
241+
path: requirements/test.txt
244242
- name: Determine pre-compiled compatible wheel
245243
env:
246244
# NOTE: When `pip` is forced to colorize output piped into `jq`,

.github/workflows/reusable-linters.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Install dependencies
6060
uses: py-actions/py-dependency-install@v4
6161
with:
62-
path: requirements/ci.txt
62+
path: requirements/lint.txt
6363
- name: Self-install
6464
run: |
6565
pip install . --config-settings=pure-python=true
@@ -86,7 +86,6 @@ jobs:
8686
make doc-spelling
8787
- name: Prepare twine checker
8888
run: |
89-
pip install -U build twine
9089
python -m build --config-setting=pure-python=true
9190
- name: Run twine checker
9291
run: |

CHANGES/636.contrib.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Organized dependencies into test and lint dependencies so that no
2+
unnecessary ones are installed during CI runs -- by :user:`lysnikolaou`.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SRC = frozenlist tests setup.py
66
all: test
77

88
.install-cython:
9-
pip install -r requirements/ci.txt
9+
pip install -r requirements/cython.txt
1010
touch .install-cython
1111

1212
frozenlist/%.c: frozenlist/%.pyx
@@ -15,7 +15,7 @@ frozenlist/%.c: frozenlist/%.pyx
1515
cythonize: .install-cython $(PYXS:.pyx=.c)
1616

1717
.install-deps: $(shell find requirements -type f)
18-
pip install -r requirements/ci.txt
18+
pip install -r requirements/lint.txt -r requirements/test.txt
1919
ifndef CI
2020
pre-commit install
2121
endif

requirements/ci.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

requirements/cython.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cython==3.0.6

requirements/dev.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
-e . --config-settings=pure-python=false
2-
-r ci.txt
2+
-r test.txt
3+
-r lint.txt
4+
tox==4.11.4

requirements/lint.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build
2+
pre-commit==3.5.0
3+
twine
4+
types-setuptools==75.8.0.20250210

requirements/test.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-r cython.txt
2+
coverage==7.6.1
3+
pytest==7.4.3
4+
pytest-cov==4.1.0

0 commit comments

Comments
 (0)