-
Notifications
You must be signed in to change notification settings - Fork 75
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
Export plugin: table support #2755
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2755 +/- ##
==========================================
+ Coverage 88.63% 88.72% +0.09%
==========================================
Files 108 108
Lines 16210 16267 +57
==========================================
+ Hits 14367 14433 +66
+ Misses 1843 1834 -9 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed it and works well, just a few comments.
What do you think about having 'imviz_export' not be the default filename, but rather update it based on what is selected in the plugin?
I also agree that we need to figure out how to handle overwriting, and it should work the same way for all exportable things. In my export subset PR, I have it overwrite by default with no warning. This could be a follow up?
I thought about that - I think we could do something similar to data labels where the code provides a default, but once you override then it stays stuck. I'm just not sure if that's worth it depending on when we decide to use solara and raise a save file dialog every time anyways. I can create a ticket since this applies to the entire export plugin and we can decide whether to implement it or postpone 🐱
Ok, agreed, I'll create that ticket as well 🐱 (again - might not be worth it if we're replacing with the file dialog soon). |
I had updated it to this. Cubeviz does have it's own page for movies - we may want to refactor that around to all point to the same place (the rest point to Imviz docs) as we build out more feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like overwrite behavior is a separate effort. It seemed like this didn't save out the file the first time I clicked, but I couldn't replicated and the rest of my export attempts worked, so maybe I'm crazy 🤷. I think the file extension needs to be handled a little better but other than that this looks good.
if "." not in filename: | ||
filename += ".ecsv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to check that the filename ends with a supported format string rather than checking for a .
anywhere in the filename. Trying to save with a filename like "table.export" leads to a snackbar error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know how to access a list of supported extensions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'll investigate and can always hardcode a small list otherwise or probably should just have a format dropdown like we have for viewer exporting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the latest commit - there were quite a few, so I just hardcoded ecsv, csv, fits as format options and append the extension if it does not match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me, thanks!
Description
This pull request adds support for exporting plugin tables via the new export plugin.
Up for discussion:
{plugin_name}:{table_name}
wheretable_name
defaults totable
. This adds flexibility for multiple tables per-plugin, but does NOT support multiple plugin instances of the same plugin (i.e. creating an independent instance of model fitting after app initialization will not be registered here). We probably will want to follow the same convention for plugin plots, in that case we know that we have multiple plugin plots in at least the line profile plugin in Imviz.helper.plugin_tables
or should we keep that private for now?Screen.Recording.2024-03-13.at.4.17.10.PM.mov
TODO before ready for review:
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.