Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] feat: add HCS Wizard #304

Closed
wants to merge 30 commits into from
Closed

Conversation

fdrgsp
Copy link
Collaborator

@fdrgsp fdrgsp commented Jun 24, 2024

A widget to automate the selection multiple positions form any type of plate.

NOTE: to see test and see the individual functionality of the wizard, you can run the examples in examples/hcs_temp. For a full wizard, run the hcs_wizard.py example.


Screen.Recording.2024-06-24.at.7.48.20.PM.mov

@tlambert03
Copy link
Member

A widget to soulmate

😂

@tlambert03 tlambert03 marked this pull request as draft June 24, 2024 23:53
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 89.95363% with 195 lines in your changes missing coverage. Please review.

Project coverage is 90.18%. Comparing base (e7b349a) to head (f027bd4).

Files Patch % Lines
src/pymmcore_widgets/hcs/_calibration_widget.py 90.13% 36 Missing ⚠️
src/pymmcore_widgets/hcs/_graphics_items.py 72.47% 30 Missing ⚠️
src/pymmcore_widgets/hcs/_plate_graphics_scene.py 64.19% 29 Missing ⚠️
src/pymmcore_widgets/hcs/_main_wizard_widget.py 87.61% 28 Missing ⚠️
src/pymmcore_widgets/hcs/_fov_widget.py 96.34% 20 Missing ⚠️
src/pymmcore_widgets/mda/_core_mda.py 73.52% 18 Missing ⚠️
src/pymmcore_widgets/hcs/_plate_widget.py 88.46% 15 Missing ⚠️
src/pymmcore_widgets/hcs/_plate_database_widget.py 95.71% 12 Missing ⚠️
src/pymmcore_widgets/hcs/_plate_model.py 89.65% 3 Missing ⚠️
src/pymmcore_widgets/_util.py 50.00% 2 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #304      +/-   ##
==========================================
- Coverage   90.24%   90.18%   -0.07%     
==========================================
  Files          76       87      +11     
  Lines        9585    11513    +1928     
==========================================
+ Hits         8650    10383    +1733     
- Misses        935     1130     +195     

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

Copy link
Member

@tlambert03 tlambert03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just so beautiful lovely. some preliminary thoughts

Comment on lines +217 to +222
if not plate_database_path:
if not USER_PLATE_DATABASE_PATH.exists():
USER_PLATE_DATABASE_PATH.parent.mkdir(parents=True, exist_ok=True)
save_database(
load_database(DEFAULT_PLATE_DB_PATH), USER_PLATE_DATABASE_PATH
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm somewhat conflicted about the pattern of copying the default database to the user database. perhaps consider saving only the user-provided wells to the user database, and preserving the pymmcore-provided database independently. A nice object that can help here is a ChainMap. Basically, it's a collection of dictionaries. when you look up a key, if it's not in the first dict, it goes to the second dict, etc... So, load_database could return a ChainMap with the default database at the end. That would make it so that new releases of pymmcore-plus could extend the database, while also allowing a user to override any of theme (since earlier mappings in a chain map take precendence)

@tlambert03
Copy link
Member

can we close this one? (don't delete the branch though)

@fdrgsp fdrgsp closed this Jul 9, 2024
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