Replace PyYAML with ruamel.yaml and use local koreo-core#31
Closed
ericlarssen wants to merge 1 commit intomainfrom
Closed
Replace PyYAML with ruamel.yaml and use local koreo-core#31ericlarssen wants to merge 1 commit intomainfrom
ericlarssen wants to merge 1 commit intomainfrom
Conversation
Contributor
ericlarssen
commented
Jun 11, 2025
- Replace PyYAML with ruamel.yaml for better YAML preservation
- Update IndexingLoader to work with ruamel.yaml architecture
- Switch to local koreo-core package instead of broken 0.1.11-13
- Update cel-python to 0.3.0 to match koreo-core requirements
- Fix imports and exports in indexing module
- Remove local CRD_ROOT to use koreo-core's CRD files
- Replace PyYAML with ruamel.yaml for better YAML preservation - Update IndexingLoader to work with ruamel.yaml architecture - Switch to local koreo-core package instead of broken 0.1.11-13 - Update cel-python to 0.3.0 to match koreo-core requirements - Fix imports and exports in indexing module - Remove local CRD_ROOT to use koreo-core's CRD files
bef15cd to
6d2d7f3
Compare
robertkluin
reviewed
Jun 11, 2025
| "pyyaml==6.0.2", | ||
| "koreo-core==0.1.11", | ||
| "ruamel.yaml>=0.18.6", | ||
| "koreo-core @ file:///${PROJECT_ROOT}/../core", |
Contributor
There was a problem hiding this comment.
Was this line an accidental commit?
Contributor
Author
There was a problem hiding this comment.
it requires the crds to be packaged, in core, so we will need to merge that first
robertkluin
reviewed
Jun 11, 2025
Comment on lines
399
to
408
| indent = (offset + 2) * " " | ||
| yaml = YAML() | ||
| yaml.preserve_quotes = True | ||
| yaml.width = 4096 | ||
| stream = io.StringIO() | ||
| yaml.dump(spec_inputs, stream) | ||
| formated_inputs = f"\n{"\n".join( | ||
| f"{indent}{line}" | ||
| for line in yaml.dump(spec_inputs).splitlines() | ||
| for line in stream.getvalue().splitlines() | ||
| )}\n\n" |
Contributor
There was a problem hiding this comment.
I think one of the benefits of ruamel is that it can handle this type of manipulation for you. Might be worth seeing if this can be better written to add the inputs to the inputs key.
robertkluin
reviewed
Jun 11, 2025
Comment on lines
532
to
541
| indent = (offset + 2) * " " | ||
| yaml = YAML() | ||
| yaml.preserve_quotes = True | ||
| yaml.width = 10000 | ||
| stream = io.StringIO() | ||
| yaml.dump(new_value, stream) | ||
| formated = f"\n{"\n".join( | ||
| f"{indent}{line}" | ||
| for line in yaml.dump(new_value, width=10000).splitlines() | ||
| for line in stream.getvalue().splitlines() | ||
| )}\n\n" |
Contributor
There was a problem hiding this comment.
This is doing the same stuff.
robertkluin
reviewed
Jun 11, 2025
Comment on lines
+18
to
+19
| # Use CRD_ROOT from koreo.schema instead of local path | ||
| # CRD_ROOT = pathlib.Path(__file__).parent.joinpath("crd") |
Contributor
There was a problem hiding this comment.
Is this no longer needed?
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.