update_dependencies.py : Add flask,pytz,python-dotenv modules.#255
Merged
Merged
Conversation
Signed-off-by: Sidartha-CT <neelapu.sidartha@candelatech.com>
Collaborator
|
@Sidartha-CT Looks good to me, I'll merge. Can you please add a follow-up PR which implements linting for the real application tests? I'd be curious to hear if any other directories are not presently linted but do not have time to do so as of now |
a-gavin
approved these changes
May 7, 2026
Contributor
Author
|
@a-gavin, quick question on the linting scope, should it cover all scripts that reside under
I made the following change in diff --git a/py-scripts/tools/lf_help_check.py b/py-scripts/tools/lf_help_check.py
index 61af1369..12cacf5b 100755
--- a/py-scripts/tools/lf_help_check.py
+++ b/py-scripts/tools/lf_help_check.py
@@ -12,7 +12,7 @@ import logging
import os
import subprocess
from time import sleep, time
-
+import pathlib
THIS_SCRIPT_NAME = os.path.basename(__file__)
@@ -303,7 +303,10 @@ if __name__ == "__main__":
exit(2)
# Gather all Python scripts in all sub-directories
- all_scripts = glob.glob("./*.py") + glob.glob("./**/*.py")
+ all_scripts = [
+ str(p) for p in pathlib.Path(".").rglob("*.py")
+ if "venv" not in p.parts and "site-packages" not in p.parts
+]
# Gather and report help check scripts
help_check_scripts = [file for file in all_scripts if desired_script(file)]With this update, the linting/help check now also covers scripts under Current output: Haha, there are quite a few scripts getting flagged now 😅. We'll need to fix them accordingly 🫡 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @smileyrekiere ,
These modules are required for the upcoming PR (
lf_multi_traffic.py— new file). In this file, classes are externally imported from thepy-scripts/real_application_tests/directory, and those scripts depend on modules such asflask,pytz, andpython-dotenv.When I pushed the commits for
lf_multi_traffic.pyin our forked scripts repo for the purpose of PR, the CI HELPER linter (part of the GitHub Actions workflow) failed. Therefore, these modules need to be added toupdate_dependencies.pyto ensure the GitHub Action (HELPER CHECK) passes successfully.Previously, these dependencies were not flagged when pushing
real_application_testsbecause the CI linter (lf_help_check.py) only runs for scripts strictly present underpy-scripts/. As a result, scripts insidepy-scripts/real_application_testswere not being checked.It would also be good to include the dependencies required by the real application tests in the same
update_dependencies.pyfile for consistency and to avoid similar issues in the future.Please let me know if there are any concerns.
++ @a-gavin @goyalsaurabh06