-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
BUG: Fix line analysis results logic #934
Conversation
Codecov Report
@@ Coverage Diff @@
## main #934 +/- ##
==========================================
+ Coverage 69.37% 69.38% +0.01%
==========================================
Files 69 69
Lines 4888 4887 -1
==========================================
Hits 3391 3391
+ Misses 1497 1496 -1
Continue to review full report at Codecov.
|
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.
Seems straightforward enough and works fine on my end!
@@ -139,7 +139,5 @@ def _run_functions(self, *args, **kwargs): | |||
temp_result = FUNCTIONS[function](self._spectrum1d) | |||
|
|||
temp_results.append({'function': function, 'result': str(temp_result)}) | |||
self.result_available = True | |||
|
|||
self.results = [] |
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've seen this elsewhere with a comment that its to trick the traitlets into forcing an update... is it ok to remove here? Can we remove it everywhere?
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.
It still updates fine locally for me with this patch, but I cannot guarantee globally.
If you think this patch is invalid, then feel free to close without 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.
It works fine for me locally, too. Looking at the surrounding code more it looks like it will always be overwriting the default empty list anyways, so I see no reason why it would need to be set to empty a first. I'm more just wondering if we can cleanup other plugins by removing similar logic, but that's clearly out of scope for this PR.
I don't notice any changes in the UX, which is good. Should we be worried about the codecov warning? |
Re: codecov -- Adding test for this plugin is out of scope of this PR. 😉 |
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.
Scope strikes again. OK, then I'll approve.
Thanks for the reviews! |
@duytnguyendtn , I don't think I need a JIRA ticket for such trivial fix, do I? |
Description
This pull request is to avoid setting "results" in every iteration, but only set it once at the end. Does not change any user facing functionality.
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.CHANGES.rst
?