-
Notifications
You must be signed in to change notification settings - Fork 69
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
workflows: add manual_merge workflow #3005
Conversation
update['new_record'] = get_record_ref( | ||
head['control_number'], | ||
endpoint='record' | ||
) |
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 is not right, as it would generate a JSON reference like
{"$ref": "http://localhost:5000/api/record/4328"}
which isn't correct, because we don't redirect routes like /api/record/<int:control_number>
, just /record/<int:control_number>
.
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 other parts of the code assume that we're merging Literature records (most notably, we don't have configuration otherwise in inspire-json-merger
) it's ok to hardcode it here too.
from inspirehep.modules.workflows.models import WorkflowsRecordSources | ||
|
||
|
||
def get_head_source(head_uuid): |
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 function is in a dedicated tasks
module, but isn't a task... It should probably be moved to utils
.
|
||
|
||
def test_get_head_source_return_arxiv_when_one_arxive_source_present(app, simple_record): | ||
rec = record_insert_or_replace(simple_record) |
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 test doesn't clean after itself: it creates this record, but then it doesn't delete it.
json_update = fake_record('While this is the update', 2) | ||
|
||
head = record_insert_or_replace(json_head) | ||
update = record_insert_or_replace(json_update) |
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.
Same observation as https://github.com/inspirehep/inspire-next/pull/3005/files#r153618433.
Signed-off-by: Zacharias Zacharodimos <[email protected]>
Signed-off-by: Antonio Cesarano <[email protected]> Co-authored-by: Riccardo Candido <[email protected]>
Signed-off-by: Chris Aslanoglou <[email protected]>
Related Issue
Supersedes #2904.
Checklist:
RFC
and look for it).