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

Fixed ignore_existing flag not working as expected. #224

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

soldni
Copy link
Member

@soldni soldni commented Jan 1, 2025

Two fixes:

  • Bug in tagger did not respect ignore_existing flag---files already processed by taggers would get run again if taggers were launched a 2nd time
  • Several typing annotation fixes to stop mypy and isort failures.

@soldni soldni requested review from undfined and Whattabatt January 7, 2025 05:46
@@ -283,6 +298,27 @@ def process_single(
# total number of documents processed
total_docs_cnt = 0

if not kwargs.get("ignore_existing", False):
# we group taggers by their path (this is for cases when two taggers are going to same file)
# and then remove all taggers if any of the paths exists and ignore_existing is True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As written, isn't this block only entered if ignore_existing isn't True? Also I'd consider using 'skip' existing instead of 'ignore' because to me 'ignore' feels a bit ambiguous - are you ignoring that taggers exist for the document, then overwriting them, or are you ignoring the documents that have existing taggers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants