Fix Number fields store as text#1251
Conversation
|
@chrisarridge The links check is failing because of the Standard. The failing test is the aggregates test. It’s the same issue as the geolocation one. I’ve made some changes in the aggregates file. The test is passing locally for me, but it’s still failing in GitHub. |
The aggregates test fails for me locally as well. Interestingly, if I drop both the commits that change |
|
@chrisarridge the process is:
|
Coverage Report for CI Build 26572609936Coverage decreased (-0.03%) to 72.329%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions13 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
|
@chrisarridge I have added the file to live. Here, the tests are passing, but locally are not. |
| self.assertEqual(r.status_code, 200) | ||
| total_hits = r.context["results"]["hits"]["total"]["value"] | ||
| self.assertGreater(total_hits, 0, | ||
| "Range query should return results for income between 10,000 and 500,000") |
There was a problem hiding this comment.
Could we add something here that checks the latestIncome fields to make sure they match the range? For example,
for hit in r.context["results"]["hits"]["hits"]:
recipientOrgInfos = hit["_source"].get("additional_data",{}).get("recipientOrgInfos",[])
for recipientOrg in recipientOrgInfos:
if "latestIncome" in recipientOrg:
self.assertLessEqual(int(recipientOrg["latestIncome"]), 500000)
self.assertGreaterEqual(int(recipientOrg["latestIncome"]), 10000)
There was a problem hiding this comment.
In principle such a check could also be added to the income greater than, and the durations extending similarly.
chrisarridge
left a comment
There was a problem hiding this comment.
Looks good. I have a suggestion for expanding the numeric search test. Please could you squash the two dataload modification commits, and the three test data update commits to just leave two commits in the PR? I think this might be cleaner and easier to follow in the repo history.
|
Please can you spin up a dev GrantNav so we can test this? Changes to search functionality have historically had a lot of unintended side-effects and I wouldn't want to put this live without functional testing. |
Yes @mariongalley we can do this. |
d8d2e56 to
013145f
Compare
013145f to
0cb4f8a
Compare
|
Thanks @chrisarridge . I have made the changes. |
Relates to #1225