write_derived: skip metadata regeneration unless csv/spec-list actually change#255
Open
andersone1 wants to merge 12 commits intomainfrom
Open
write_derived: skip metadata regeneration unless csv/spec-list actually change#255andersone1 wants to merge 12 commits intomainfrom
andersone1 wants to merge 12 commits intomainfrom
Conversation
…ly change
- Always write the output CSV and `spec-list.yml`.
- Determine `.needs_update` from old vs new MD5 of:
- `.file` (CSV)
- `<meta>/spec-list.yml`
`.needs_update` is TRUE in these cases:
1. CSV did not exist before this call.
2. `spec-list.yml` did not exist before this call.
3. CSV content changed.
4. `spec-list.yml` content changed.
When `.needs_update` is TRUE:
- regenerate XPT
- rerender define output
- run diff generation only if `base_df` exists and `.execute_diffs` is TRUE
- write `diffs.csv` only if generated diffs are non-empty (no delete/overwrite when empty)
- as a result, `diffs.csv` reflects the most recent run that produced at least one diff
When `.needs_update` is FALSE:
- skip XPT and define regeneration
- skip diff generation (even if `.prev_file` changes)
- keep any existing `diffs.csv` unchanged (no delete/overwrite)
tests:
- assert `diffs.csv` is not created when no diffs are found
- assert XPT is not rewritten when rerunning with unchanged CSV/spec-list
- assert existing `diffs.csv` is preserved (mtime unchanged) when no new diffs are generated
- assert diff generation is skipped when `.needs_update` is FALSE
…leanup - write human-readable latest-data-diff.txt (timestamp/user header + same diff rows) - keep skip-if-unchanged behavior intact - if metadata contains legacy diffs.csv, show clear cli warning and recreate folder - update docs and tests for new output + backward-compatibility migration
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.
Summary
Key Changes
based .needs_update).