Skip to content

Add FileContainer search_intersection method #169

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

veni-vidi-vici-dormivi
Copy link
Collaborator

@veni-vidi-vici-dormivi veni-vidi-vici-dormivi commented May 28, 2025

Here is a method that enables searching for intersecting values of a certain key along all values of another key. The specific use case here is: "Which scenarios and members are available for both variables tas and hfds" for example.

The usage would be to find all available scenarios and members for both variables and then search the resulting FileContainer for intersecting values along scenario_member. In this case search_key = variable and intersect_key = scenario_member. I chose this approach because I felt it relatively straight forward, more than implementing it in FileFinder.

I am not very happy with the names and my explanation in the docstring, but at least the example should make it quite clear.

Copy link

codecov bot commented May 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Flag Coverage Δ
unittests 99.71% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
filefisher/_filefinder.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant