Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Check duplicates when adding new annotation to DataStore#801

Merged
mylibrar merged 4 commits intoasyml:masterfrom
mylibrar:check_duplicates
May 24, 2022
Merged

Check duplicates when adding new annotation to DataStore#801
mylibrar merged 4 commits intoasyml:masterfrom
mylibrar:check_duplicates

Conversation

@mylibrar
Copy link
Collaborator

This PR fixes #774.

Description of changes

  • Provide an option called allow_duplicate to specify whether to add identical entries into DataPack. If it's set to False, then add_annnotation_raw should just return the existing entry if a duplicate is found.
  • Fix incorrect attribute types in setup according to updates from Initialize new entry attribute list with default values #796.

Test Conducted

test_add_annotation_raw is updated to test duplicate checking

@mylibrar mylibrar self-assigned this May 24, 2022
@mylibrar mylibrar added this to the 0.3 alpha milestone May 24, 2022
@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #801 (d0c3e8a) into master (961c5df) will decrease coverage by 0.00%.
The diff coverage is 80.95%.

@@            Coverage Diff             @@
##           master     #801      +/-   ##
==========================================
- Coverage   81.09%   81.08%   -0.01%     
==========================================
  Files         249      249              
  Lines       18748    18765      +17     
==========================================
+ Hits        15203    15216      +13     
- Misses       3545     3549       +4     
Impacted Files Coverage Δ
forte/data/data_store.py 89.89% <69.23%> (-1.08%) ⬇️
tests/forte/data/data_store_test.py 93.98% <100.00%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 961c5df...d0c3e8a. Read the comment docs.

@mylibrar mylibrar requested a review from hunterhector May 24, 2022 17:26
hunterhector
hunterhector previously approved these changes May 24, 2022
@mylibrar mylibrar merged commit a954abf into asyml:master May 24, 2022
@mylibrar mylibrar deleted the check_duplicates branch May 24, 2022 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check duplicates when adding entries to DataStore

2 participants