When renaming files, log relative file path (not just name) to stdout#359
Open
davidharting wants to merge 16 commits intomainfrom
Open
When renaming files, log relative file path (not just name) to stdout#359davidharting wants to merge 16 commits intomainfrom
davidharting wants to merge 16 commits intomainfrom
Conversation
- Add current_file_path to PythonContent (mirrors SQLContent) - Add optional refactored_file_path to PythonRuleRefactorResult (mirrors SQLRuleRefactorResult) - Add required refactored_file_path to PythonRefactorResult, update apply_changeset and update_python_file to handle renames (mirrors SQLRefactorResult) - Update _py() test helper to accept a path arg with default - Initialize refactored_file_path=python_file in process_python_files() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mirrors rename_sql_file_names_with_spaces: replaces spaces with underscores in Python model filenames and logs a ResourceNamesWithSpacesDeprecation entry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mirrors the SQL pattern: behavior_change_rules run first (rename), followed by safe_change_rules (config-to-meta, config.get-to-meta_get). Rule selection respects --behavior-change / --all flags. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Input: 'model with spaces.py', expected output: 'model_with_spaces.py'. Adds the ResourceNamesWithSpacesDeprecation log entry to expected stdout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
'model with spaces.py' → 'python model with spaces.py' (and expected 'python_model_with_spaces.py') to avoid ambiguity with the existing SQL fixture of the same base name. Also adds both models to schema.yml so the YAML changeset renames them too. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ut-relative-file-path
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously compare_json_logs only checked actual ⊆ expected, so extra entries in the expected file would not cause a test failure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Description
Follow up to #358. Update logs for ResourceNamesWithSpacesDeprecation to file paths (relative to dbt project) instead of just file names.
Note
The commit history looks funny in GitHub because this was originally stacked on top of #358. But the diff looks right. I will squash and merge anyhow.
Type of change
Checklist
uv run ruff check . --config pyproject.tomluv run ruff format --config pyproject.toml