Monitor DAQ directory and integrate with Google Sheets#6
Open
jannis-maiwald wants to merge 62 commits into
Open
Monitor DAQ directory and integrate with Google Sheets#6jannis-maiwald wants to merge 62 commits into
jannis-maiwald wants to merge 62 commits into
Conversation
Monitors a DAQ directory (and subfolders) to detect acquisition runs by: - Printing the acquisition START time when the first .root file appears in a run folder (based on settings.xml mtime) - Printing the acquisition END time when a .txt file appears in that run folder (based on its ctime or mtime) - On startup, scans existing run folders so you still see START and STOP for runs in progress or completed before the script began.
- Watcher now uses the settings.xml and *.txt directly, ignoring the .root files. - plus some refactoring
Added heartbeat spinner
Google Sheets integration utilities for updating Radiation - Nuclear particle master Google Sheets using gspread. Handles loading existing run names, appending new runs, updating start/end times, and maintaining row numbers. Configuration (spreadsheet ID, sheet name) is loaded from an external JSON config file (e.g., sheet_config.json), while credentials.json remains a separate service account key file.
Monitors a DAQ directory (and subfolders) to detect acquisition runs by: - Printing the acquisition START time when a new settings.xml appears - Printing the acquisition END time when a dedicated .txt file appears - On startup, scans existing run folders and syncs them into Google Sheets - After initial sync, listens for new START/STOP events and updates the sheet
- Remove all hard-coded column indices in google_sheet_utils. - Load header names from the sheet’s first row using config file keys, build a header→column map, and fetch the entire sheet once.
- Validate run_name and datetime inputs - Implement retry helper for Sheets API writes - Improve readability, formatting & add type hints
- aggregate all exact‐match files into one “✅ Exact matches” line - list all files with differences in a single “⚠️ Differences detected in” line - show up to N detailed diffs per differing file
…les in Google Sheets
…hod to handle blank fields refactor(watch_acq_times): Remove deprecated file and update event handling to use new utility functions
…and improved logging for better readability and maintainability
delete: Remove copilot instructions document
…function for better readability and maintainability
…mic updates and improve handling of multiple fields
…or better clarity and maintainability
…to report missing parameters in both current and reference files
…dability and maintainability
…oogle Sheets columns and rows
…s for parameter extraction
… functions for clarity
… and logging for better traceability
…tree): update ignore tag handling to support multiple tags
…, process_run_folder, and update_run_row methods
… adding refresh parameter to find_run_row, append_run, and update_run_row methods
…improve XML parsing efficiency
… reverse mapping from values to line numbers
…and clarify expected naming conventions refactor(GoogleSheet): improve error handling for config and credentials loading
…ly data Each channel is added as a separate row under the active run
mklilley
reviewed
Aug 8, 2025
Comment on lines
+1
to
+4
| --- | ||
| description: 'Python coding conventions and guidelines' | ||
| applyTo: '**/*.py' | ||
| --- |
Member
There was a problem hiding this comment.
I think this file is best kept for individual co-pilot preferences rather than put as repo standard. For example, I don't like to use typing annotations as i find it makes the code harder to read. I wouldn't want my copilot to start doing that.
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.
Implement a script to monitor DAQ acquisition runs, log start and end times, and sync data with Google Sheets. Added error handling, input validation, and documentation throughout the codebase.