Skip to content

[MergeDups] Give indication when all identical-vernacular duplicates have been dealt with #3721

@imnasnainaec

Description

@imnasnainaec

When all sets of words with identical vernacular have been dealt with (or deferred) is a good time to:

  • Congratulate the user for getting through them all
  • Warn that finding potential duplicates with similar vernacular forms takes a long time (e.g., 2.5 minutes for an 18,000 entry project)
  • If there are deferred duplicates, say so and offer button to load those instead

Todo:

  • Backend/Services/MergeService.cs:
    • Add to GetPotentialDuplicates a new parameter bool identicalVernacular, right after int maxLists,. If true, use dupFinder.GetIdenticalVernWords; if false, use dupFinder.GetSimilarWords(collection, isUnavailableSet, ignoreProtected).
    • Update GetAndStorePotentialDuplicates to call GetPotentialDuplicates with identicalVernacular = false
  • Backend/Controllers/MergeController.cs:
    • Add method for new endpoint [HttpGet("findidenticaldups/{maxInList:int}/{maxLists:int}/{ignoreProtected:bool}", Name = "FindIdenticalPotentialDuplicates")]. Unlike the existing FindPotentialDuplicates, finding those with identical vernacular is fast, so instead of using a get-then-signal function, just call on _mergeService.GetPotentialDuplicates directly with identicalVernacular = true
  • Update interfaces, mocks, and tests
  • Run npm run fmt-backend
  • Run npm run backend, initiate the Python virtual environment (venv) specified in the README, then run python scripts/generate_openapi.py
  • src/backend/index.ts:
    • Add new function findIdenticalDuplicates (before findDuplicates) that uses mergeApi.findIdenticalPotentialDuplicates
  • src/goals/Redux/GoalActions.ts:
    • asyncAddGoal no longer needs a special GoalType.MergeDups
    • loadGoalData in the GoalType.MergeDups case should use the new findIdenticalDuplicates function
  • src/goals/MergeDuplicates/*
    • If loadGoalData loaded an empty list, then instead of the "nothing to merge" screen, an action should be dispatched to do the stuff dropped from asyncAddGoal
    • While loading (i.e. waiting for the signal), there should be a dialog pop up over the loading screen:
      • Congratulate user for having processed all sets of words with identical vernacular
      • If there are any deferred dups, let user know how many there are, and include a button at the bottom of the dialog to review deferred duplicate
      • Explain that The Combine is now finding potential duplicates with similar (non-identical) vernacular form.
      • If the project has more than 1000 frontier entries, warn that this can take several minutes
      • Have button at bottom to cancel (returns to Data Entry)
      • Have button at bottom to continue loading
      • Automatically close the dialog if the signal comes that the duplicate finding is done

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions