Skip to content

Conversation

@dsillman2000
Copy link
Owner

Overview

This MR introduces a breaking change to the CLI interface, requiring an input file path instead of reading from stdin. This ensures reliable relative path resolution for YAML references.

Changes Made

1. CLI Interface Update

  • Breaking Change: CLI command renamed from yref-compile to yaml-reference-cli
  • Input Method: Now requires an input file argument instead of reading from stdin
  • Error Handling: Added validation for file existence

2. Code Changes

  • yaml_reference/cli.py: Updated compile_main() to accept file path argument
  • Added proper argument parsing with required input_file parameter
  • Implemented file existence checking before processing

3. Documentation Updates

  • README.md: Updated usage examples and help text
  • pyproject.toml: Updated entry point script name

Why This Change?

  • Reliability: Ensures consistent relative path resolution by having a filesystem handle
  • Clarity: Makes CLI usage more explicit and user-friendly
  • Determinism: Removes ambiguity in file path resolution

Migration Guide

Before:

cat root.yaml | yref-compile

After:

yaml-reference-cli root.yaml

Testing

  • All existing tests pass with updated CLI interface
  • Manual verification shows CLI correctly resolves references from file input
  • Testing against the yaml-reference-specs project is yielding total API compliance.

Impact

  • Breaking Change: Existing scripts using stdin piping will need to be updated
  • Positive: More reliable reference resolution for complex YAML structures

@dsillman2000 dsillman2000 changed the title Breaking: require input file for CLI as argument breaking: Require input file for CLI as argument Feb 8, 2026
@dsillman2000 dsillman2000 merged commit 93f8ef0 into main Feb 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant