Skip to content

deps: add missing colorlog and PyYAML to requirements.txt#414

Open
AswaniSahoo wants to merge 1 commit into
kubeedge:mainfrom
AswaniSahoo:fix/add-missing-core-dependencies
Open

deps: add missing colorlog and PyYAML to requirements.txt#414
AswaniSahoo wants to merge 1 commit into
kubeedge:mainfrom
AswaniSahoo:fix/add-missing-core-dependencies

Conversation

@AswaniSahoo
Copy link
Copy Markdown

What this PR does

Adds two missing runtime dependencies to requirements.txt that are imported unconditionally in core/common/ modules.

Problem

Following the install guide, a user runs pip install -r requirements.txt and then pip install -e .. Since colorlog and PyYAML are not listed in requirements.txt, the installation completes without error but any subsequent ianvs command crashes:

  • core/common/log.py line 18: import colorlogModuleNotFoundError: No module named 'colorlog'
  • core/common/utils.py line 24: import yamlModuleNotFoundError: No module named 'yaml'

Changes

requirements.txt:

  • Add colorlog (required by core/common/log.py)
  • Add PyYAML (required by core/common/utils.py)
  • Sort all entries alphabetically for consistency

Before / After

-prettytable~=2.5.0 # BSD
-scikit-learn
-numpy
-pandas
-tqdm
-matplotlib
-onnx
+colorlog
+matplotlib
+numpy
+onnx
+pandas
+prettytable~=2.5.0 # BSD
+PyYAML
+scikit-learn
+tqdm

Fixes #413

@kubeedge-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AswaniSahoo
To complete the pull request process, please assign jaypume after the PR has been reviewed.
You can assign the PR to them by writing /assign @jaypume in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 4, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread requirements.txt Outdated
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>
@Chidroopakanaparthy
Copy link
Copy Markdown

Reproduction result:

Checked out pr-414. Same colorlog/PyYAML blocker fix as #421 but:

  • Alphabetically sorts all requirements.txt entries
  • No version pins (colorlog without >=4.7.2)
  • Removes inline # BSD comment from prettytable

Functionally fixes the same crash. Conflicts with #421, better to coordinate before merging.

Recommendation: Merge; coordinate with #421.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dependencies] Add missing colorlog and PyYAML to requirements.txt

3 participants