-
Notifications
You must be signed in to change notification settings - Fork 15
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
SFilter: fix for external and ignored items #501
Conversation
Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/501/index.html |
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.
Thanks. The underlying issue was that SFilter skips
- external items, if
include_external == False
- ignored items, if
exclude_ignored == True
But it did not consider the case that an external item might be marked as ignored and should therefore be skipped.
Would you mind adding the reproducer from #497 as a test for this situation?
loki/batch/sfilter.py
Outdated
node_cls = node.origin_cls | ||
else: | ||
node_cls = type(node) | ||
# if node_cls in as_tuple(self.item_filter) and not (self.exclude_ignored and node.is_ignored): |
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.
# if node_cls in as_tuple(self.item_filter) and not (self.exclude_ignored and node.is_ignored): |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #501 +/- ##
==========================================
- Coverage 95.65% 95.65% -0.01%
==========================================
Files 224 224
Lines 40783 40805 +22
==========================================
+ Hits 39013 39034 +21
- Misses 1770 1771 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
1909189
to
6b95017
Compare
6b95017
to
2510e71
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.
Many thanks, GTG!
Fix for #497.
Thanks @reuterbal!