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
Jkmarx/solr user files bug #2950
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2950 +/- ##
===========================================
- Coverage 60.37% 59.19% -1.18%
===========================================
Files 433 434 +1
Lines 27924 27144 -780
Branches 1274 1274
===========================================
- Hits 16860 16069 -791
- Misses 11064 11075 +11
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.
As far as I follow it, looks fine. I can't remember why all the get
s are necessary... Not really dicts under the hood?
refinery/data_set_manager/tests.py
Outdated
insert_facet_field_filter, is_field_in_hidden_list, | ||
objectify_facet_field_counts, update_annotated_nodes, | ||
is_field_in_hidden_list, update_annotated_nodes, | ||
create_facet_field_counts, |
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 can't remember if we decided whether to worry about alphabetical order or not.
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.
Yes to worry. Thanks
refinery/data_set_manager/tests.py
Outdated
)) | ||
|
||
def test_generate_solr_params_for_assay_with_params(self): | ||
self.assertItemsEqual(query.keys(), ['json', 'params']) |
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 looks like you sort keys below: worth doing it here, too?
refinery/data_set_manager/tests.py
Outdated
|
||
def test_generate_solr_params_no_params_returns_json_filter(self): | ||
query = generate_solr_params_for_assay(QueryDict({}), self.valid_uuid) | ||
self.assertListEqual(query.get('json').get('filter'), |
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.
Would regular query['json']['filter']
not work here and elsewhere?
refinery/data_set_manager/utils.py
Outdated
if not facet_field: | ||
facet_field = ','.join([char_str, factor_str]) | ||
else: | ||
facet_field = ','.join([facet_field, char_str, factor_str]) |
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.
Maybe build up a list and join it once at the end instead?
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 was doing other things here before. I'll just revert to the previous code now.
refinery/data_set_manager/utils.py
Outdated
}) | ||
{'name': field_obj.get('val'), | ||
'count': field_obj.get('count')} | ||
) |
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.
List comprehension clearer?
Resolves #2623
Resolves #2931
Resolves #2729 (Remove insert_facet_field method. No longer needed.)