Skip to content

feat: SQLite database layer for PV config profiles and settings + db/consumer fixes#65

Open
Osayi-ANL wants to merge 26 commits intomainfrom
dev
Open

feat: SQLite database layer for PV config profiles and settings + db/consumer fixes#65
Osayi-ANL wants to merge 26 commits intomainfrom
dev

Conversation

@Osayi-ANL
Copy link
Copy Markdown
Collaborator

Summary

  • New SQLite/SQLAlchemy database layer: ProfileManager, SettingsManager,
    DatabaseInterface facade, and seeded settings hierarchy (PATHS, CONSUMERS)
  • HPC consumers now read config via settings.TOML_FILE instead of raw paths
  • Fixed init_database() to create tables on existing DBs
  • Fixed seed script to use settings.PROJECT_ROOT instead of relative "dashpva.db"
  • Fixed detached ORM objects after session close
  • Processor file inputs now populated as dropdowns from DB CONSUMERS > hpc
  • Sim server: static records refresh + frame collection update fix

Test you should run

  • Fresh DB: delete dashpva.db, relaunch — confirm seeded correctly
  • Existing DB: relaunch — confirm no missing-table errors
  • HPC consumer with/without active profile — confirm config loads or errors clearly
  • Processor dropdowns populate from DB

Generated with Claude Code

Osayi-ANL and others added 23 commits March 13, 2026 14:48
…er in stats table

- All numeric stat/position columns (3-12) now use Qt.AlignRight|Qt.AlignVCenter
  so magnitudes (e.g. 100 vs 1,000) line up for easy visual comparison
- Name cell foreground is set from roi.pen.color() so a red ROI shows its
  name in red, green in green, etc., consistent with the ROI border color
- Paint-brush button added to the Actions column; opens QColorDialog and
  updates both the ROI border pen and the name cell color immediately
- Applied in both ensure_stats_row_for_roi (initial insert) and
  update_stats_table_for_roi (subsequent refreshes)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
add: color swatch and labeling to roi labels and boxes to allow for color selection
change: file saving format to nexus
add: force conversion
add: feature note for new roi plot block
add: documentation for single image and stack
add: database for pv configuration
add: settings configuration placeholder
change: rsm_converter to use settings.py
change: pva_setup to workflow.py/.ui
add: SQLite database for PV config profiles (CRUD, TOML import/export, selected/default flags),
add: settings.py config placeholder consumed by workflow and HPC consumers
change: rsm_converter to use settings.py
remove: unused toml import for RSM Converter
…ML file

remove: direct toml.load() from HpcRsmProcessor.configure() now calls
settings.reload() which auto-selects the active DB profile via ConfigSource.
remove: dead parse_metadata_channels / parse_roi_channels from workflow.
fix: top level keys in pv configs are editible
remove: toml configuration within scan view
change: pvareader to use settings.py configuration instead of direct toml
add: File output path to Info
remove: database exist print
add: gaurd to prevent init_database to be called after every settings.reload
add: full SettingsManager API in DatabaseInterface
add: idempotent seed_defaults call on every DatabaseInterface init
change: setting lookup matches on name+parent only (removes type from key to prevent duplicates)

Seed script
add: seed_settings_defaults_sql seeds full default structure on every init
add: BEAMLINE_NAME, PATHS (LOG/CONFIGS/OUTPUTS/SCAN/SLICES/CONSUMERS/hpc), APP_DATA/workflow tree

Workflow settings view + UI
add: settings tree view with three-column editor (Setting / Value / Type)
add: two-step add dialog for top-level keys and child keys with type selection
add: JSON editor with Simple tree tab and Raw JSON tab, bidirectional sync
add: named config save/load for meta associator, collector, and analysis consumer tabs
add: last-used config auto-save/load for all three workflow consumer tabs
add: refresh DB button to reload settings tree and repopulate consumer fields
add: edit section dialog for renaming settings nodes
fix: delete in settings view now immediately persists to DB
fix: QFont import moved to QtGui to prevent silent slot exception in JSON editor
remove: Add section from context menu (now subsumed into Add child key type options)

Consumers removed
remove: consumer scripts moved out of repository tree
…MERS > hpc in DB

fix: path resolution uses CONSUMERS.BASE + hpc.BASE + subdir relative to project root
add: hpc.BASE seeded under CONSUMERS > hpc in default settings structure
fix: EPICS_DB_INCLUDE_PATH to have a fallback to the env
fix: frame collection update on sim server
fix: consumer path resolution from consumers/hpc -> consumers
@Osayi-ANL Osayi-ANL requested a review from pecomyint March 25, 2026 22:55
fix: saving motor position saving
add: output override for where you want to save
remove: dead saving methods in the handler
remove: conversion files
add: Nexus saving format to the writer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant