-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Path Validation and Environment Loading to TreeNode Class #6064
base: master
Are you sure you want to change the base?
Conversation
This pull request introduces path validation and environment loading functionality to the TreeNode class. The changes ensure that the path provided during initialization is valid and that environment variables can be correctly loaded into the node's environment. Signed-off-by: qisijia <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6064 +/- ##
==========================================
+ Coverage 54.46% 54.47% +0.01%
==========================================
Files 202 202
Lines 21883 21928 +45
==========================================
+ Hits 11919 11946 +27
- Misses 9964 9982 +18 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @qisijia367, thank you very much for these changes, contributions are always welcome. Unfortunately, your patch changes TreeNode
behaviour because it doesn't count with corner case where the path is only the root path /
which is valid.
Can you please update your patch to respect the root path? Also, can you please add test which will tests the behaviour of TreeNodeEnvOnly
with path ending with /
?Thank you.
This pull request addresses issues related to invalid paths and the root path name in the `TreeNodeEnvOnly` class. Specifically, it ensures that `ValueError` is raised for all invalid paths and fixes the issue where the root path name was incorrectly set to an empty string, and relevant test cases have been added in selftests/unit/tree.py and tested successfully. Signed-off-by: qisijia <[email protected]>
Hi @richtja,Thank you for your suggestions, I have optimized the code again and added some test cases in selftests/unit/tree.py. Please check if they meet the requirements. |
Hi @qisijia367, the CI is failing after your changes, can you please look into that? Thank you. And If you need any help, just let me know. |
This pull request introduces path validation and environment loading functionality to the TreeNode class. The changes ensure that the path provided during initialization is valid and that environment variables can be correctly loaded into the node's environment.