-
Notifications
You must be signed in to change notification settings - Fork 3
Criteria in which either key or value are None #429
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #429 +/- ##
==========================================
- Coverage 83.48% 83.46% -0.02%
==========================================
Files 28 28
Lines 4008 4052 +44
==========================================
+ Hits 3346 3382 +36
- Misses 662 670 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tests/datadoc/test_dataset.py
Outdated
| assert set( | ||
| search( | ||
| ts, | ||
| criteria={"creator.name": ""}, |
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 think that the only None should be treated as a wildcard. The empty string should only match an empty string.
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 agree, corrected.
| def test_pipeline(): | ||
| """Test creating OTEAPI pipeline.""" | ||
| pytest.skip() | ||
| # pytest.skip() |
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.
Does this really works?
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.
Not really, there is an importorskip further down, and since otelib is not installed it never runs.
|
|
tripper/datadoc/dataset.py
Outdated
| criteria = criterias | ||
|
|
||
| if isinstance(criteria, list): | ||
| criteria.sort(key=lambda x: x[0]) |
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 will raise an error '<' not supported between instances of 'NoneType' and 'NoneType' for criteria with multiple empty (None) predicates. For example: [(None, 'TOX-252'), (None, 'TOX-254')]
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 think I corrected this.
|
Criteria with only the object specified returns no results. For example:
while
|
Strange, this seems to work in the tests. |
Description
closes #425
Type of change
Checklist for the reviewer
This checklist should be used as a help for the reviewer.