-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix/issue 26 : YAML Parsing for Large Config Files #28
Conversation
dcc5acb
to
3ab4e4d
Compare
Coverage Report
Files without new missing coverage
8 files skipped due to complete coverage. Coverage success: total of 98.12% is above 98.12% 🎉 |
Thank you @LucasDedieu ! I think there is a unwanted side effect to your PR, which was not tested already: def test_escaped_string():
config = Config.from_yaml_str("""
section:
num: 1
escaped_num: "1"
escaped_broken_ref: "${test.a"
escaped_ref: "${test.a}"
""").resolve(registry=registry)
assert config["section"]["num"] == 1
assert config["section"]["escaped_num"] == "1"
assert config["section"]["escaped_broken_ref"] == "${test.a"
assert config["section"]["escaped_ref"] == "${test.a}" We want users to be able to "escape" references (or anything else), if what is they really want is to write a string containing ${...}. Could you add this test and verify that your changes pass it ? |
66b034b
to
c8543b9
Compare
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.
Perfect !
Fix YAML Parsing for Large Config Files
Description
Support for YAML config files exceeding 4096 characters:
Previously, the library failed to handle YAML files larger than 4096 characters due to limitations in how values were parsed in
ConfitYamlLoader
. This has been resolved by modifying theconstruct_object
method to usex.value
, ensuring robust parsing regardless of file size.Key Changes:
ConfitYamlLoader
to usex.value
for parsing scalar nodes.test_very_long_yaml_config
andtest_escaped_string
unit tests.Checklist