Skip to content

Commit a38d82c

Browse files
Removing requirements-*.txt files in favor of dep groups
Signed-off-by: Grant Herman <grantlouisherman041@gmail.com>
1 parent 1ffaabe commit a38d82c

10 files changed

Lines changed: 24 additions & 37 deletions

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ jobs:
100100
sudo apt-get install -qy clang-format npm libdebuginfod-dev libunwind-dev liblz4-dev pkg-config
101101
- name: Install Python dependencies
102102
run: |
103-
python3 -m pip install -r requirements-extra.txt
103+
python3 -m pip install --upgrade pip
104+
python3 -m pip install --group extra
104105
- name: Install Package
105106
run: |
106107
python3 -m pip install -e .
@@ -130,7 +131,7 @@ jobs:
130131
- name: Install Python dependencies and package
131132
run: |
132133
python3 -m pip install --upgrade pip
133-
python3 -m pip install -r requirements-test.txt
134+
python3 -m pip install --group test
134135
python3 -m pip install -e .
135136
env:
136137
MEMRAY_MINIMIZE_INLINING: 1

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ jobs:
2828
sudo apt-get install --no-install-recommends -qy libdebuginfod-dev libunwind-dev liblz4-dev pkg-config
2929
- name: Install Python dependencies
3030
run: |
31-
python3 -m pip install -r requirements-extra.txt
31+
python3 -m pip install --upgrade pip
32+
python3 -m pip install --group extra
3233
- name: Install Package
3334
run: |
3435
python3 -m pip install -e .

.github/workflows/test_uv_python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Install Python dependencies
4747
run: |
4848
uv pip install --upgrade pip cython pkgconfig
49-
uv pip install -r requirements-test.txt
49+
uv pip install --group test
5050
5151
- name: Build package
5252
run: |

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ easier to validate it.
6868
Before commiting anything, install the prek (pre-commit) hooks:
6969

7070
```shell
71-
python3 -m pip install -r requirements-extra.txt
71+
python3 -m pip install --upgrade pip
72+
python3 -m pip install --group extra
7273
prek install
7374
```
7475

Dockerfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,15 @@ ENV PATH="${VIRTUAL_ENV}/bin:/usr/lib/ccache:${PATH}" \
3939
PYTHON="${VIRTUAL_ENV}/bin/python" \
4040
MEMRAY_MINIMIZE_INLINING="1"
4141

42-
COPY requirements-test.txt requirements-extra.txt requirements-docs.txt /tmp/
43-
44-
RUN $PYTHON -m pip install -U \
45-
-r /tmp/requirements-extra.txt \
46-
-r /tmp/requirements-test.txt \
47-
-r /tmp/requirements-docs.txt \
48-
cython \
49-
pkgconfig \
50-
setuptools \
51-
wheel
42+
COPY pyproject.toml /tmp/pyproject.toml
43+
44+
RUN $PYTHON -m pip install --upgrade pip \
45+
&& $PYTHON -m pip install \
46+
--group /tmp/pyproject.toml:extra \
47+
cython \
48+
pkgconfig \
49+
setuptools \
50+
wheel
5251

5352
RUN npm install -g prettier
5453

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ cd memray
106106
python3 -m venv ../memray-env/ # just an example, put this wherever you want
107107
source ../memray-env/bin/activate
108108
python3 -m pip install --upgrade pip
109-
python3 -m pip install -e . -r requirements-test.txt -r requirements-extra.txt
109+
python3 -m pip install --group extra
110+
python3 -m pip install -e .
110111
```
111112

112113
This will install Memray in the virtual environment in development mode (the `-e` of the last `pip install` command).

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ requires = [
99

1010
build-backend = 'setuptools.build_meta'
1111

12+
[dependency-groups]
13+
test=['Cython', 'coverage[toml]', "greenlet; python_version < '3.14'", 'pytest', 'pytest-cov', 'ipython', 'setuptools', 'pkgconfig', 'pytest-textual-snapshot', 'textual >= 0.43, != 0.65.2, != 0.66', 'packaging']
14+
docs=['IPython', 'sphinx','sphinx-autobuild', 'sphinx-argparse', 'furo']
15+
extra=['mypy', 'bump2version','towncrier', 'pre-commit', {include-group = "docs"}]
16+
1217
[tool.ruff]
1318
line-length = 95
1419
select = ["C4", "E", "F", "I001", "PERF", "W"]

requirements-docs.txt

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

requirements-extra.txt

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

requirements-test.txt

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

0 commit comments

Comments
 (0)