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

SFilter: fix for external and ignored items #501

Merged
merged 1 commit into from
Mar 3, 2025
Merged

Conversation

MichaelSt98
Copy link
Collaborator

Fix for #497.

Thanks @reuterbal!

Copy link

github-actions bot commented Mar 3, 2025

Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/501/index.html

@reuterbal reuterbal linked an issue Mar 3, 2025 that may be closed by this pull request
Copy link
Collaborator

@reuterbal reuterbal left a 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?

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):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# if node_cls in as_tuple(self.item_filter) and not (self.exclude_ignored and node.is_ignored):

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.65%. Comparing base (57e4204) to head (2510e71).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
loki/batch/tests/test_scheduler.py 95.45% 1 Missing ⚠️
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     
Flag Coverage Δ
lint_rules 96.39% <ø> (ø)
loki 95.64% <96.29%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@MichaelSt98 MichaelSt98 force-pushed the nams-sfilter-fix branch 2 times, most recently from 1909189 to 6b95017 Compare March 3, 2025 12:41
Copy link
Collaborator

@reuterbal reuterbal left a comment

Choose a reason for hiding this comment

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

Many thanks, GTG!

@reuterbal reuterbal merged commit 2f31d53 into main Mar 3, 2025
14 checks passed
@reuterbal reuterbal deleted the nams-sfilter-fix branch March 3, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discussion: external module item
2 participants