Draft
Conversation
- CommissioningDatabase class with SQLite backend - Context manager for safe connection handling - Schema with JSON columns for nested data structures - Indexes on cavity_name, cryomodule, status, and phase - Auto-commit on success, rollback on error
- save_record() for creating and updating records - get_record() for retrieval by database ID - Full serialization/deserialization of all data structures - JSON encoding for complex nested objects - Proper handling of Optional fields
- get_record_by_cavity() for resume capability - get_records_by_cryomodule() for batch queries - get_active_records() for finding interrupted sessions - delete_record() for cleanup - get_database_stats() for monitoring - All queries leverage indexes for performance
- Test suite for database initialization - Test save/retrieve operations - Test query methods (by cavity, cryomodule, active status) - Test delete and statistics - Test transaction handling (commit/rollback) - All tests use temporary databases for isolation
- Test serialization of all phase-specific data structures - Test phase status and checkpoint persistence - Test complete workflow end-to-end persistence - Test resume capability after interruption - Verify all data survives round-trip to database
- Add CommissioningDatabase to module exports - Update __all__ with all public classes - Organize exports by category (enums, data, database)
Add abstract base class for commissioning phases with: - PhaseBase ABC defining common interface for all phases - PhaseContext for passing execution context - PhaseStepResult for structured step results - PhaseResult enum for step outcomes (success/retry/failed/skip) - Retry logic with configurable max attempts (default 3) - Checkpoint creation for phase history tracking - Abort handling for graceful termination - Exception handling with automatic checkpoint creation The base class provides the execution framework that will be used by all concrete phase implementations (cold landing, SSA characterization, etc.). Key features: - Abstract methods enforce consistent interface - Built-in retry logic with customizable attempts - Automatic phase status tracking in CommissioningRecord - Checkpoint creation for audit trail - Graceful abort support via PhaseContext
…tions - Change PhaseStatus.COMPLETED to PhaseStatus.COMPLETE in tests - Update _execute_step_with_retry to mark phase as FAILED when: - A step returns PhaseResult.FAILED - A step exceeds max retries This ensures phase_status is correctly updated when steps fail, not just when exceptions are raised.
…tion - Add CommissioningPiezo class extending base Piezo with test-specific PVs - Implement PiezoPreRFPhase using existing PhaseBase architecture - Add comprehensive test suite (28/29 tests passing) - Integrate with CommissioningRecord for result persistence - Support dry-run mode for safe testing - Add proper checkpoint tracking and error handling New components: - commissioning_piezo.py: Hardware extension for commissioning - phases/piezo_pre_rf.py: Phase implementation - tests/phases/test_piezo_pre_rf.py: Full test coverage Phase executes EPICS pre-RF checkout script and validates both piezo channels pass, recording capacitance values for diagnostics. Part of RF commissioning application architecture.
- Call finalize_phase on abort, failure, and exception - Handle both int/string enum values in piezo tests - Improve test status validation and simulation
…commissioning-pre-rf
Add display panel for cavity piezo pre-RF testing with: - Live PV monitoring (status, capacitance, equipment state) - Database integration for test results and session management - Resume capability for interrupted tests - Database viewer for commissioning history
…phase workflow support BREAKING CHANGE: Major architectural refactoring of RF commissioning application - Reorganize codebase into models/, phases/, ui/, and controllers/ packages - Move CommissioningPiezo, data models, and database to models/ subdirectory - Move phase execution logic to dedicated phases/ package - Create UI components in ui/ subdirectory with builder pattern - Add session manager for multi-phase commissioning coordination - Implement phase ordering validation and sequential workflow enforcement - Add database browser dialog for loading previous commissioning records - Create multi-phase container display with tabbed interface - Add comprehensive workflow documentation (PHASE_WORKFLOW.md, COMPLETE_WORKFLOW_EXAMPLE.md) - Update all import paths to reflect new package structure - Extend CommissioningPhase enum with get_phase_order(), get_next_phase(), get_previous_phase() - Add can_start_phase() and advance_to_next_phase() methods to CommissioningRecord - Implement PhaseDisplayBase abstract class for consistent UI interface - Add progress callback support in PhaseContext for real-time UI updates - Enhance PiezoPreRFDisplay with separate PV (EPICS) and local result displays - Add 100+ new tests for phase ordering, advancement validation, and UI binding - Fix tuner service simulation failure mode handling (enum to int conversion) This refactoring separates concerns, improves testability, and enables support for the complete 7-phase commissioning workflow from PIEZO_PRE_RF through COMPLETE.
…commissioning-pre-rf
…ve legacy phase-run paths
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.
No description provided.