Skip to content

feat: use ConfigGroupsEditor in GroupPresetTableWidget.#545

Merged
fdrgsp merged 7 commits intopymmcore-plus:mainfrom
tlambert03:group-preset-table-button
Apr 1, 2026
Merged

feat: use ConfigGroupsEditor in GroupPresetTableWidget.#545
fdrgsp merged 7 commits intopymmcore-plus:mainfrom
tlambert03:group-preset-table-button

Conversation

@tlambert03
Copy link
Copy Markdown
Member

this is what @fdrgsp did in the christina branch

adds the new ConfigGroupsEditor as a button to the GroupPresetTableWidget...
and adds an apply button that applies it to core ,and warns if you close without saving

image image image

closes #539
closes #540

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 97.18310% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.47%. Comparing base (bc5ce84) to head (6c36323).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
..._group_preset_widget/_group_preset_table_widget.py 92.72% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #545      +/-   ##
==========================================
+ Coverage   86.89%   87.47%   +0.58%     
==========================================
  Files         115      115              
  Lines       14112    14071      -41     
==========================================
+ Hits        12262    12308      +46     
+ Misses       1850     1763      -87     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tlambert03 tlambert03 changed the title Feat: use ConfigGroupsEditor in GroupPresetTableWidget. feat: use ConfigGroupsEditor in GroupPresetTableWidget. Mar 30, 2026
@tlambert03
Copy link
Copy Markdown
Member Author

@fdrgsp, can you pull this one and try it out and merge when ready?

@fdrgsp
Copy link
Copy Markdown
Collaborator

fdrgsp commented Apr 1, 2026

@tlambert03 love it!!!

Just a small thing, what if we update the example to print the changes when apply is clicked?

import sys

from pymmcore_plus import CMMCorePlus
from qtpy.QtWidgets import QApplication

from pymmcore_widgets import ConfigGroupsEditor

app = QApplication([])
core = CMMCorePlus()
core.loadSystemConfiguration("tests/test_config.cfg")


with_cfg = sys.argv[1].lower() in ("1", "true") if len(sys.argv) > 1 else False
cfg = ConfigGroupsEditor.create_from_core(core, load_configs=with_cfg)

# connect to apply signal to print the changes
def _on_apply_clicked(changed, deleted, channel_group):
    print("\n\nApply clicked:")
    print(f"Changed: {[cg.name for cg in changed]}")
    print(f"Deleted: {deleted}")
    print(f"Channel group: {channel_group}")
cfg.applyRequested.connect(_on_apply_clicked)

cfg.resize(900, 550)
cfg.show()

app.exec()

This way if we run uv run examples/config_groups_editor.py true we see a summary of the chnages:

Apply clicked:
Changed: ['Camera']
Deleted: ['LightPath']
Channel group: None

@tlambert03
Copy link
Copy Markdown
Member Author

that would be great! wanna make that change to my branch and merge when ready?

@fdrgsp fdrgsp merged commit 927f28d into pymmcore-plus:main Apr 1, 2026
45 of 46 checks passed
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.

2 participants