Install missing CI test dependencies#5587
Conversation
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
iamdinhthuan
left a comment
There was a problem hiding this comment.
Reviewed PR #5587 at head 68707e5aba98c9291803412816077768b8865fba.
The patch adds the test-only dependencies that were missing from the blocking pytest tests/ collection environment. That closes the earlier collection barrier: in the current CI log, tests/test_agent_economy_sdk.py, tests/test_faucet_service_wallet_validation.py, tests/test_hardware_visualizer.py, and tests/test_pse_analyze_results.py are collected and their affected tests pass instead of failing with ModuleNotFoundError for aiohttp, flask_cors, or matplotlib.
Local validation in a PR worktree:
python3 -m pip install -r tests/requirements.txt
python3 -B -m pytest -q tests/test_agent_economy_sdk.py tests/test_faucet_service_wallet_validation.py tests/test_hardware_visualizer.py tests/test_pse_analyze_results.py --tb=short
# 14 passed
python3 -B -m py_compile agent_economy_sdk.py faucet_service/faucet_service.py src/visualizations/visualizer.py benchmarks/pse/analyze_results.py
python3 tools/bcos_spdx_check.py --base-ref origin/main
# BCOS SPDX check: OK
git diff --check origin/main...HEAD -- tests/requirements.txt
I also checked the live test job after this PR: it now runs past the prior optional-dependency collection failures. The remaining broad-suite failures are the existing downstream failures in areas such as issue-2310 path portability, Beacon imports, CPU architecture detection, setup miner hashes, and wallet review holds, not the dependency imports this PR changes.
No blocker from me on this focused CI dependency fix.
ZacharyZhang-NY
left a comment
There was a problem hiding this comment.
Approved PR #5587 at head 68707e5.
This is a focused CI dependency fix for the pytest tests/ collection environment. The added entries in tests/requirements.txt match the modules imported by the affected test files: aiohttp for agent_economy_sdk, flask-cors and PyYAML for faucet service imports, and matplotlib/seaborn/numpy for hardware and PSE visualization coverage.
Validation run:
python3 -m pip install -r tests/requirements.txt-> requirements already satisfied in this environmentpython3 -B -m pytest -q tests/test_agent_economy_sdk.py tests/test_faucet_service_wallet_validation.py tests/test_hardware_visualizer.py tests/test_pse_analyze_results.py --tb=short-> 14 passedpython3 -B -m py_compile agent_economy_sdk.py faucet_service/faucet_service.py src/visualizations/visualizer.py benchmarks/pse/analyze_results.py-> passedgit diff --check origin/main...HEAD -- tests/requirements.txt-> passedpython3 tools/bcos_spdx_check.py --base-ref origin/main-> BCOS SPDX check: OK
I found no blocker in this scoped test-dependency fix.
jaxint
left a comment
There was a problem hiding this comment.
LGTM! Great work on this PR. 🚀
|
CI triage follow-up: this PR does resolve the original collection blocker. In the current The remaining red status is from later repo-wide failures that look unrelated to this dependency PR, including:
So #5587 appears to unblock the missing dependency layer, but the broad suite still has separate base-line failures. |
TJCurnutte
left a comment
There was a problem hiding this comment.
Verified the CI dependency addition.
What I checked at head 68707e5aba98c9291803412816077768b8865fba:
- The diff is scoped to
tests/requirements.txtand adds the missing test dependencies, includingaiohttp>=3.9.0,flask-cors>=6.0.2,PyYAML>=6.0.3,matplotlib>=3.7,seaborn>=0.12, andnumpy>=1.24. git diff --check origin/main...HEAD -- tests/requirements.txtpassed.- In a fresh Python 3.11.14 venv with the CI-style root requirements plus
tests/requirements.txtinstalled,python -B -m py_compile agent_economy_sdk.py faucet_service/faucet_service.py src/visualizations/visualizer.py benchmarks/pse/analyze_results.pypassed. - The dependency-sensitive focused tests passed:
python -B -m pytest -q -o addopts='' --noconftest tests/test_agent_economy_sdk.py tests/test_faucet_service_wallet_validation.py tests/test_hardware_visualizer.py tests/test_pse_analyze_results.py --tb=shortreturned14 passed in 17.44s. python tools/bcos_spdx_check.py --base-ref origin/mainreturnedBCOS SPDX check: OK.
This closes the missing-import/collection gap for those CI test surfaces without changing runtime code. Looks good to merge.
kekehanshujun
left a comment
There was a problem hiding this comment.
I reviewed the dependency-only change. The added test requirements match modules imported by the affected tests (aiohttp, flask-cors, PyYAML, and the plotting stack) and are constrained to tests/requirements.txt, so this should unblock CI without changing runtime application dependencies.
I do not see a blocker in this patch.
PR Review — PR #5587Title: Install missing CI test dependencies Author: minyanyi What I reviewed
Observations
LGTM. Simple, necessary dependency fix. No concerns. Bounty: #2782 |
|
Closing as stale branch — would cause destructive deletions if merged. Your branch was filed roughly 155 commits behind current main. Since then, many overlapping fixes from other contributors have landed via parallel PRs. GitHub's Bounty credit acknowledgedIf your fix addressed a real bug, the canonical version has very likely already shipped via a parallel contributor's PR over the past two weeks. Specific cases covered by today's audit:
If you want fresh reviewRebase against current main and verify your diff shows roughly the size of the changes you originally made: If the deletion count is significantly higher than what you added, the branch is still picking up stale assumptions — recreate from a fresh main. Thanks for the contribution work this week. |
Summary
pytest tests/collection phaseagent_economy_sdk, faucet service CORS/YAML imports, and hardware/PSE visualization testsWhy
The blocking CI test job installs
tests/requirements.txt, but several collected test modules import packages that were missing from that file. That causes unrelated PRs to fail during collection withModuleNotFoundErrorforaiohttp,flask_cors, andmatplotlibbefore their focused tests can run.Validation
python -m pip install -r tests\requirements.txtpython -m pytest tests\test_agent_economy_sdk.py tests\test_faucet_service_wallet_validation.py tests\test_hardware_visualizer.py tests\test_pse_analyze_results.py -q-> 14 passedpython -m py_compile agent_economy_sdk.py faucet_service\faucet_service.py src\visualizations\visualizer.py benchmarks\pse\analyze_results.pygit diff --check