Store hash of time series files when using TDR to detect input changes#894
Open
Store hash of time series files when using TDR to detect input changes#894
Conversation
- Create tdr_hash_utils.jl with functions to compute and compare file hashes - Modify time_domain_reduced_files_exist to check if input files changed - Update cluster_inputs to save hash file after TDR - Use SHA256 for file hashing and YAML for storage Co-authored-by: gschivley <10373332+gschivley@users.noreply.github.com>
- Create test_tdr_hash_verification.jl with unit tests - Test hash computation, storage, loading, and change detection - Add test to main test suite Co-authored-by: gschivley <10373332+gschivley@users.noreply.github.com>
- Update TDR_input.md with section on input file hash verification - Add note to Tutorial 3 about automatic validation - Create manual_test_tdr_hash.jl for manual testing demonstrations Co-authored-by: gschivley <10373332+gschivley@users.noreply.github.com>
Add YAML and Dates imports that are used but were not declared Co-authored-by: gschivley <10373332+gschivley@users.noreply.github.com>
Check for 'file_hashes' key existence before accessing to prevent KeyError Co-authored-by: gschivley <10373332+gschivley@users.noreply.github.com>
- Add compute_tdr_input_hashes_multistage function - Use multistage-specific functions for multi-stage TDR - Fixes incorrect path handling in multi-stage scenarios Co-authored-by: gschivley <10373332+gschivley@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add hash storage for time series files in TDR
Store hash of time series files when using TDR to detect input changes
Jan 9, 2026
gschivley
reviewed
Jan 9, 2026
| if !isfile(filepath) | ||
| return nothing | ||
| end | ||
| open(filepath, "r") do file |
Collaborator
There was a problem hiding this comment.
@copilot the open(filepath, "r") do file is good for plain text files (csv/yaml). In the future we might use parquet or gzip files rather than plain csv. Can you modify this to work well with binary files like parquet or gzipped CSVs?
Author
There was a problem hiding this comment.
Updated to use binary mode (read(filepath)) instead of text mode, which now handles both text files (CSV, YAML) and binary files (Parquet, gzipped CSVs). This approach works with any file format. See commit ef48460.
- Use binary read mode instead of text mode to support both text and binary files - Update documentation with examples for parquet and gzipped files - Simplify implementation using read() directly Co-authored-by: gschivley <10373332+gschivley@users.noreply.github.com>
Collaborator
|
@copilot A few issues from the checks:
|
- Add SHA package to Project.toml dependencies - Update CHANGELOG.md with TDR hash verification feature in keepachangelog format Co-authored-by: gschivley <10373332+gschivley@users.noreply.github.com>
Author
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.
Implementation Plan for TDR Hash Verification
time_domain_reduced_files_existto check hashescluster_inputsto save hashes after TDRAll tasks complete! Implementation ready for final review.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.