breaking: drastically reduce feature scope to only !reference and !reference-all tags with simple path/glob arguments. #3
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.
Merge Request Summary: Drastically Reduce Features and Improve Deterministic CLI Output
Overview
This MR significantly simplifies the
yaml-referencelibrary by removing complex features that added maintenance burden while keeping the core functionality intact. The changes focus on making the library more maintainable and easier to understand, with additional improvements to ensure deterministic output from the CLI tool.Key Changes
1. Removed Complex Features
&anchor) within YAML filesunresolve()functionality and related serialization features2. Simplified API
YAML->YAMLReferencefor clarityanchorandjmespathparameters removed fromReferenceandReferenceAllconstructors3. Code Reduction
yaml_reference/anchor.py(100 lines)jmespathdependency frompyproject.toml4. Updated Documentation
uvinstallation instructionsTechnical Details
Breaking Changes
from yaml_reference import YAMLtofrom yaml_reference import YAMLReferenceReferenceandReferenceAllno longer acceptanchororjmespathparametersNew CLI Deterministic Behavior
The CLI tool (
yref-compile) has been updated to use SafeLoader/SafeDumper for consistent, deterministic output:Implementation Details:
YAMLReference(typ="safe")for loading, which provides predictable parsing behaviorYAMLRuamel(typ="safe")instance is used for dumping with specific configurations:ignore_aliases = True: Ensures all anchor references are fully resolved in outputdefault_flow_style = False: Forces block formatting for all data structuresTechnical Benefits:
yaml-reference-specsprojectExample of deterministic behavior:
Maintained Core Functionality
!referencetag!reference-alltagyref-compile) with deterministic outputDependency Changes
jmespathdependencyruamel-yamlversion constraint relaxed from<0.19.0to<0.20.0Test Suite Updates
test_compile_cli.py) as CLI behavior is now covered by specification testsyaml-reference-specsproject via thespec-test.shintegrationMigration Path
Users relying on removed features should: