-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Add line info widget to widgets subpackage #1264
Conversation
4a25a9a
to
e2615e9
Compare
Codecov Report
@@ Coverage Diff @@
## master #1264 +/- ##
==========================================
+ Coverage 80.54% 81.75% +1.20%
==========================================
Files 41 44 +3
Lines 3423 3699 +276
==========================================
+ Hits 2757 3024 +267
- Misses 666 675 +9
Continue to review full report at Codecov.
|
8480974
to
9013ca9
Compare
Noticed there are some Pandas |
@epassaro Yes that file is very old, I'm actually using only very few methods of I would like to know opinions of reviewers what do they think, should we do this change right here in this PR or get this merged first and then do the changes (to avoid unexpected surprises 😀 )? |
This is a pretty minor comment that likely doesn't affect many people, but I've updated my notebooks to have a dark background. This makes it difficult to read some of the text, as it's black on a dark background. This is shown in the attached image. Maybe adding a white background or changing the colour to something like red would fix this? |
Some tests are failing. Looks like it's related to the integrated spectrum. Some other recent PRs aren't failing, so could need rebasing? |
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.
Some comments left for minor changes. Mostly about adding comments, etc. The comment I left about dark backgrounds shouldn't hold this PR back from being merged.
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 comments above from myself and others - if these are addressed then I am happy to merge
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.
This is a great PR @jaladh-singhal! We have finished our review of it and have asked for minor changes. Please look them over - if anything is taking too long to figure out we can make it an issue to fix for later. This PR is nearly ready to be merged!
640c435
to
b54358b
Compare
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.
Looks ready to merge to me!
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.
Also looks good to me
* Added line info code from notebook to a module * Added filter by absorption frequency in LastLineInteraction * Updated data methods and added more widgets * Placed common function create_table_widget in util.py * Added table sumary label widget * Added line info event listeners and display * Cleanup of irrelevant to-dos in base.py * Renamed base.py to shell_info which is more relevant * Also renamed test_base to test_shell_info * Added docstrings to class methods * Added docstrings to handler functons and some improvements * Make sure that erg/s are always together in plot labels * Import re for regex methods to work * Make line info width fixed to prevent jumping output * Fixed divide by zero warning in nu to lambda conversion * Renamed functions & variables to make concepts clearer * Added plotly and ipywidgets to environment file * Add exception handling for invalid species * Added test for data handling methods of line_info module * Added tests for line info widget events * Added test for change in group mode dropdown * Renamed last_interaction_in_nu to input_nu in analysis.py * Updated unit conversion to erg/s/A * Added missing docstring for test_get_species_interactions * Bring hidden scatter point in mid to remove extra space
This PR aims to put line info widget which was being prepared in a notebook (#1187) as a module within the widgets subpackage so that it can be generated easily by constructing the widget object.
The main changes made are:
Edited
analysis.py
to make it work with line inf widget:from_model
did not takepacket_filter_mode
as argument but it is required for initializing LastLineInteraction (as__init__()
takes it), so added itpacket_in_nu
and renamedpacket_nu
topacket_out_nu
since it only concerned withoutput_nu
Added
line_info.py
module with the class to create line info widgetRenamed
base.py
which contained only shell info widget code toshell_info.py
and similarly done this renaming in tests and__init__.py
Added
util.py
as a helper functions module to current widgets modulescreate_table_widget
was common in bothline_info.py
andshell_info.py
, so removed it fromshell_info.py
and moved it thereTableSummaryLabel
class for creating summary label targetting a table widget (required for handling creation/updation of Total Packets label in last line counts table)Added
test_line_info.py
for testing line info module. Note, there's no test file for util.py because it doesn't have any back-end logic but only front-end logic (of creating widgets) and since line_info module uses it so it's already covered.To-Dos