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

fuzzy matching: change request payload #4315

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion inspirehep/modules/workflows/tasks/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,22 @@ def fuzzy_match(obj, eng):
``False`` otherwise.

"""
fuzzy_matching_data_keys = [
'abstracts',
'authors',
'titles',
'report_numbers',
'arxiv_eprints'
]
fuzzy_match_data = {key: val for key, val in obj.data.iteritems() if key in fuzzy_matching_data_keys}
matching_response = requests.get(
"{inspirehep_url}/matcher/fuzzy-match".format(
inspirehep_url=current_app.config["INSPIREHEP_URL"]
),
headers=_get_headers_for_hep_root_table_request(),
data=json.dumps(
{
"data": obj.data,
"data": fuzzy_match_data,
}
),
)
Expand Down
Loading