-
Couldn't load subscription status.
- Fork 6
Fix load_from_disk method to support folder with multiple file extensions
#463
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
Conversation
load_from_disk method to load folder with multiple file extensions
load_from_disk method to load folder with multiple file extensionsload_from_disk method to support folder with multiple file extensions
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## stable #463 +/- ##
==========================================
+ Coverage 75.62% 75.64% +0.01%
==========================================
Files 100 100
Lines 8767 8769 +2
Branches 1712 1714 +2
==========================================
+ Hits 6630 6633 +3
+ Misses 1663 1660 -3
- Partials 474 476 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
| @classmethod | ||
| def load_from_disk(cls, paths: list[Path]) -> list[Self]: | ||
| yaml_files: list[Self] = [] | ||
| file_extensions = {".yaml", ".yml", ".json"} # FIXME: .json is not a YAML file, should be removed |
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.
@LucasG0 do you know why we have .json here? too afraid about side effect of removing it from here
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.
Please can you add a changelog for the release note
Deploying infrahub-sdk-python with
|
| Latest commit: |
8031518
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://df436a59.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://bgi-fix-yaml-file-462.infrahub-sdk-python.pages.dev |
This pull request refines the
load_from_diskmethod ininfrahub_sdk/yaml.pyto make sure we can load folders that contain various file types.Relates to #462