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

Clarify some variable names and save by file stem as default #391

Merged
merged 7 commits into from
Aug 9, 2023

Conversation

paddyroddy
Copy link
Collaborator

Fixes #243

@deprecated-napari-hub-preview-bot
Copy link

deprecated-napari-hub-preview-bot bot commented Aug 9, 2023

Preview page for your plugin is ready here:
https://preview.napari-hub.org/quantumjot/btrack/391
Updated: 2023-08-09T16:31:20.170496

Copy link
Collaborator

@p-j-smith p-j-smith left a comment

Choose a reason for hiding this comment

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

I think the name changes are good and it makes sense to set the name based on the filename. It would be great if here:

config_name = configs.add_config(filename=load_path, overwrite=False)

you check if the config name already exists and if so either:

  • automatically change the config name (e.g. append a 1 or a)
  • ask the user if they want to overwrite the existing config or cancel

btrack/napari/main.py Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (a9609bc) 85.74% compared to head (b4f1be7) 85.74%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #391   +/-   ##
=======================================
  Coverage   85.74%   85.74%           
=======================================
  Files          31       31           
  Lines        2202     2203    +1     
  Branches      404      404           
=======================================
+ Hits         1888     1889    +1     
  Misses        232      232           
  Partials       82       82           
Files Changed Coverage Δ
btrack/napari/main.py 65.69% <100.00%> (+0.25%) ⬆️
btrack/napari/widgets/_general.py 100.00% <100.00%> (ø)

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

@paddyroddy
Copy link
Collaborator Author

paddyroddy commented Aug 9, 2023

I think the name changes are good and it makes sense to set the name based on the filename. It would be great if here:

config_name = configs.add_config(filename=load_path, overwrite=False)

you check if the config name already exists and if so either:

* automatically change the config name (e.g. append a `1` or `a`)

* ask the user if they want to overwrite the existing config or cancel

Have tried and failed to do the latter. My plan was that it would exit and tell the user that they need to adjust the filename. See my attempt #392, but I don't have time to continue this. Can you please unblock me?

@quantumjot quantumjot merged commit 7ef5d75 into main Aug 9, 2023
13 checks passed
@quantumjot quantumjot deleted the fix-issue-389 branch August 9, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When saving 'TrackerConfig', set '.name' based on filename if it is currently 'Default'
4 participants