[python] refactor yaml file parser#8701
Merged
caishunfeng merged 4 commits intoMar 7, 2022
Merged
Conversation
* Change yaml parser package to ruamel.yaml * Refactor configuration.py module * And file.py to write file locally * Add more tests on it close: apache#8593
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #8701 +/- ##
============================================
+ Coverage 45.29% 45.30% +0.01%
- Complexity 4073 4075 +2
============================================
Files 700 700
Lines 27050 27050
Branches 2894 2894
============================================
+ Hits 12251 12255 +4
+ Misses 13645 13643 -2
+ Partials 1154 1152 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
PTAL @devosend @jieguangzhou Thanks |
devosend
reviewed
Mar 5, 2022
| path = Path(to_path) | ||
| if create and not path.parent.exists(): | ||
| path.parent.mkdir(parents=True) | ||
| if not path.exists(): |
Contributor
There was a problem hiding this comment.
When create param is False and the parent path does not exist, it will raise an error.
Member
Author
There was a problem hiding this comment.
Good catch, I would try to fix it
* Fix error logic * And tests to avoid regression
|
Kudos, SonarCloud Quality Gate passed! |
Contributor
|
LGTM |
Member
Author
|
@caishunfeng @songjianet PTAL thanks |
caishunfeng
approved these changes
Mar 7, 2022
Member
Author
|
Thanks for reviewing |
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.








close: #8593