Skip to content

Commit

Permalink
workflows: add more save points during enchancing records
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Nov 15, 2024
1 parent cbc879a commit ee7c87f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
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
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

0 comments on commit ee7c87f

Please sign in to comment.