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

workflows: add more save points during enchancing records #4356

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions inspirehep/modules/workflows/workflows/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,24 +193,31 @@
extract_authors_from_pdf,
),
normalize_journal_titles,
save_workflow,
refextract,
save_workflow,
count_reference_coreness,
extract_journal_info,
save_workflow,
populate_journal_coverage,
save_workflow,
classify_paper(
only_core_tags=False,
spires=True,
with_author_keywords=True,
),
save_workflow,
filter_core_keywords,
guess_categories,
save_workflow,
IF(
is_experimental_paper,
guess_experiments,
),
guess_keywords,
guess_coreness,
normalize_collaborations,
save_workflow
]


Expand Down
2 changes: 1 addition & 1 deletion tests/integration/workflows/test_article_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def test_run_next_wf_is_not_starting_core_selection_wfs(

wf = workflow_object_class.get(workflow.id)
mark("auto-approved", True)(workflow, None)
wf.callback_pos = [34, 1, 13]
wf.callback_pos = [41, 1, 13]
wf.continue_workflow()
check_wf_state(wf.id, ObjectStatus.COMPLETED)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/workflows/test_arxiv_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def test_match_in_holdingpen_previously_rejected_wf_stop(

assert obj2.extra_data["already-in-holding-pen"] is False
assert obj2.extra_data["previously_rejected"] is True
assert obj2.extra_data["previously_rejected_matches"] == [obj_id]
assert obj_id in obj2.extra_data["previously_rejected_matches"]


def test_article_workflow_stops_when_record_is_not_valid(workflow_app):
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/workflows/test_workflow_core_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def test_core_selection_wf_starts_after_article_wf_when_no_core(
== 0
)

workflow_object.callback_pos = [34, 1, 13]
workflow_object.callback_pos = [41, 1, 13]
# Run task for creating core_selection wf
workflow_object.extra_data["auto-approved"] = True
workflow_object.save()
Expand Down Expand Up @@ -306,7 +306,7 @@ def test_core_selection_wf_is_not_created_when_wf_is_record_update(
== 0
)

workflow_object.callback_pos = [34, 1, 13]
workflow_object.callback_pos = [41, 1, 13]
# Run task for creating core_selection wf
workflow_object.extra_data["auto-approved"] = True
workflow_object.extra_data["is-update"] = True
Expand Down Expand Up @@ -465,7 +465,7 @@ def test_core_selection_wf_works_when_there_is_record_redirection_on_hep(
== 0
)

workflow_object.callback_pos = [34, 1, 13]
workflow_object.callback_pos = [41, 1, 13]
# Run task for creating core_selection wf
workflow_object.extra_data["auto-approved"] = True
workflow_object.save()
Expand Down Expand Up @@ -610,7 +610,7 @@ def test_core_selection_wf_still_runs_when_there_is_core_on_hep_already(
== 0
)

workflow_object.callback_pos = [34, 1, 13]
workflow_object.callback_pos = [41, 1, 13]
# Run task for creating core_selection wf
workflow_object.extra_data["auto-approved"] = True
workflow_object.save()
Expand Down Expand Up @@ -725,7 +725,7 @@ def test_core_selection_wf_skipped_if_record_was_manually_approved(
)
start("article", object_id=workflow_object.id)

workflow_object.callback_pos = [34, 1, 13]
workflow_object.callback_pos = [41, 1, 13]
# Run task for creating core_selection wf
workflow_object.extra_data["auto-approved"] = False
workflow_object.save()
Expand Down
Loading