deps: add missing colorlog and PyYAML to requirements.txt#414
deps: add missing colorlog and PyYAML to requirements.txt#414AswaniSahoo wants to merge 1 commit intokubeedge:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: AswaniSahoo The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request updates the requirements.txt file by adding colorlog and PyYAML dependencies and reordering the list alphabetically. Feedback was provided regarding an inline comment on the prettytable requirement, which may cause installation failures because the project's custom requirement parser in setup.py does not handle inline comments correctly.
| tqdm | ||
| matplotlib | ||
| onnx No newline at end of file | ||
| prettytable~=2.5.0 # BSD |
There was a problem hiding this comment.
The inline comment # BSD on this line will cause the setup.py script to fail during installation (e.g., when running pip install -e .). The _read_requirements function in setup.py (lines 75-78) does not strip inline comments before passing the requirement strings to setuptools, which leads to a RequirementParseError. It is recommended to remove the inline comment to ensure compatibility with the project's custom requirement parser.
prettytable~=2.5.0
Both packages are imported unconditionally in core/common/ but were absent from requirements.txt, causing ModuleNotFoundError on fresh installs. Also sorts entries alphabetically for consistency. Signed-off-by: AswaniSahoo <aswanisahoo1012@gmail.com>
6f6dd7b to
fe96cf6
Compare
What this PR does
Adds two missing runtime dependencies to
requirements.txtthat are imported unconditionally incore/common/modules.Problem
Following the install guide, a user runs
pip install -r requirements.txtand thenpip install -e .. SincecolorlogandPyYAMLare not listed inrequirements.txt, the installation completes without error but any subsequentianvscommand crashes:core/common/log.pyline 18:import colorlog→ModuleNotFoundError: No module named 'colorlog'core/common/utils.pyline 24:import yaml→ModuleNotFoundError: No module named 'yaml'Changes
requirements.txt:colorlog(required bycore/common/log.py)PyYAML(required bycore/common/utils.py)Before / After
Fixes #413