Skip to content

Commit ababee0

Browse files
Yicong-HuangYicong Huangclaude
authored
chore(amber): move test-only deps to dev-requirements.txt (apache#5692)
### What changes were proposed in this PR? Four test-only pins were sitting in the wrong file (`amber/requirements.txt`), which leaked them into the production Docker image and the LICENSE-binary snapshot. This PR moves them. | Pin | Move | | --- | --- | | `pytest==7.4.0` | `requirements.txt` → `dev-requirements.txt` | | `pytest-reraise==2.1.2` | `requirements.txt` → `dev-requirements.txt` | | `pytest-timeout==2.2.0` | `requirements.txt` → `dev-requirements.txt` | | `iniconfig==1.1.1` | `requirements.txt` → dropped entirely (pytest transitive, auto-installed) | Side effects: | File | Change | | --- | --- | | `amber/system-requirements-lock.txt` | drop the same 4 lines (header: *"This file must be updated whenever requirements.txt or operator-requirements.txt changes"*) | | `amber/LICENSE-binary-python` | drop the same 4 entries from the BSD 2-Clause / MIT blocks | ### Why this is safe | Consumer | Before | After | | --- | --- | --- | | CI `pyamber` / `amber-integration` stacks | install `requirements.txt` + `operator-requirements.txt` + `dev-requirements.txt` — get pytest twice | install all three — get pytest once (from dev-requirements) | | `bin/computing-unit-master.dockerfile` (prod) | installs `requirements.txt` + `operator-requirements.txt` — gets pytest, doesn't need it | installs same two — no longer pulls pytest | | `bin/computing-unit-worker.dockerfile` (prod) | same as master | same as master | | `PveManager.createNewPve` (per-user PVEs) | installs `requirements.txt` only — gets pytest, doesn't need it | installs same — no longer pulls pytest | | `check_binary_deps.py` (LICENSE drift gate) | requires LICENSE-binary entries because requirements.txt declares them | no longer requires them; entries removed in lockstep | The 1 non-test pytest import I found (`amber/src/main/scala/.../aiassistant/test_type_annotation_visitor.py`) is a pytest test that's accidentally placed under `src/main` by filename convention (`test_*`); it's not invoked by the production runtime. ### Any related issues, documentation, discussions? Closes apache#5691 ### How was this PR tested? - `git diff upstream/main --stat` — confirms only the four files above are touched, with the expected `+6/-12` shape - `grep -ciE "^(pytest|iniconfig| - pytest| - iniconfig)" amber/requirements.txt amber/system-requirements-lock.txt amber/LICENSE-binary-python` — all three return 0 after the change - Repo-wide `grep -rIE "^(from|import)[[:space:]]+pytest"` shows 48 usages in `amber/src/test/python` (CI installs dev-requirements.txt, so they keep working) and the 1 non-runtime file noted above ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7 [1M context]) --------- Co-authored-by: Yicong Huang <yiconghuang@cs.umass.edu> Co-authored-by: Claude <noreply@anthropic.com>
1 parent ad69ecd commit ababee0

4 files changed

Lines changed: 5 additions & 14 deletions

File tree

amber/LICENSE-binary-python

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,22 +262,17 @@ Python packages:
262262
- h2==4.3.0
263263
- hpack==4.1.0
264264
- hyperframe==6.1.0
265-
- iniconfig==1.1.1
266265
- jmespath==1.1.0
267266
- loguru==0.7.0
268267
- markdown-it-py==4.2.0
269268
- mdurl==0.1.2
270269
- mmh3==5.2.1
271270
- pampy==0.3.0
272271
- plotly==5.24.1
273-
- pluggy==1.6.0
274272
- pydantic==2.13.4
275273
- pydantic-core==2.46.4
276274
- pyparsing==3.3.2
277275
- pyroaring==1.1.0
278-
- pytest==7.4.0
279-
- pytest-reraise==2.1.2
280-
- pytest-timeout==2.2.0
281276
- pytz==2026.2
282277
- pyyaml==6.0.3
283278
- readerwriterlock==1.0.9

amber/dev-requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
# pip-licenses output and never need to be tracked in LICENSE-binary
2121
# / NOTICE-binary. Not installed by packaging.
2222

23+
# pytest test runner and plugins.
24+
pytest==7.4.0
25+
pytest-reraise==2.1.2
26+
pytest-timeout==2.2.0
27+
2328
# Coverage instrumentation for pytest; emits coverage.xml consumed by
2429
# Codecov's Phase 1 upload.
2530
pytest-cov==5.0.0

amber/requirements.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,14 @@ setuptools==80.10.2
1919
numpy==2.1.0
2020
pandas==2.2.3
2121
ruff==0.14.7
22-
iniconfig==1.1.1
2322
loguru==0.7.0
2423
pyarrow==21.0.0
25-
pytest==7.4.0
2624
python-dateutil==2.8.2
27-
pytest-timeout==2.2.0
2825
protobuf==7.34.1
2926
betterproto==2.0.0b7
3027
pampy==0.3.0
3128
overrides==7.4.0
3229
typing_extensions==4.14.1
33-
pytest-reraise==2.1.2
3430
Deprecated==1.2.14
3531
fs==2.4.16
3632
bidict==0.22.0

amber/system-requirements-lock.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ h2==4.3.0
4646
hpack==4.1.0
4747
hyperframe==6.1.0
4848
idna==3.15
49-
iniconfig==1.1.1
5049
jmespath==1.1.0
5150
loguru==0.7.0
5251
markdown-it-py==4.2.0
@@ -59,7 +58,6 @@ packaging==26.2
5958
pampy==0.3.0
6059
pandas==2.2.3
6160
pg8000==1.31.5
62-
pluggy==1.6.0
6361
praw==7.6.1
6462
prawcore==2.4.0
6563
propcache==0.5.2
@@ -73,9 +71,6 @@ pyiceberg==0.11.1
7371
pympler==1.1
7472
pyparsing==3.3.2
7573
pyroaring==1.1.0
76-
pytest==7.4.0
77-
pytest-reraise==2.1.2
78-
pytest-timeout==2.2.0
7974
python-dateutil==2.8.2
8075
pytz==2026.2
8176
readerwriterlock==1.0.9

0 commit comments

Comments
 (0)