Skip to content

AP-859 pytesseract worker update - #5

Merged
jason-raitz merged 4 commits into
mainfrom
AP-859_worker_updates
Oct 2, 2026
Merged

jason-raitz merged 4 commits into
mainfrom
AP-859_worker_updates

Conversation

@jason-raitz

@jason-raitz jason-raitz commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor
  • adds pytesseract dependency
  • updates some volumes in docker-compose
  • updates tests
  • note: directly imports run_tesseract which is not explicitly exported by the pytesseract package

 - adds pytesseract dependency
 - updates some volumes in docker-compose
 - note: directly imports run_tesseract which is not explicitly exported
   by the pytesseract package
@jason-raitz jason-raitz self-assigned this Sep 29, 2026
@jason-raitz
jason-raitz marked this pull request as ready for review September 29, 2026 21:38

@anarchivist anarchivist left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

rw+c; the main thing to fix is mounting the app within the flower container.

Comment thread quiabo/tasks.py
Comment thread docker-compose.yml
Comment thread quiabo/tasks.py
}

try:
run_tesseract(**kwargs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I assume that we are avoiding run_and_get_output because it stores the result in memory instead of on disk. And I assume image_to_pdf_or_hocr doesn't allow us to customise the output path?

Just want to make sure that I'm understanding the rationale for using a private/undocumented API.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You are correct and it is possibly a little brittle because of it.

@anarchivist anarchivist Sep 30, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yep, that's correct - the return_bytes parameter that gets set basically means "should I return bytes or str?"

there was some discussion on the potential signature of run_tesseract as "possibly changing year to year" in an issue on the pytesseract repository, but a maintainer made that comment in 2018. the signature hasn't changed in 7 years.

@jason-raitz
jason-raitz merged commit 6e017d2 into main Oct 2, 2026
5 checks passed
@jason-raitz
jason-raitz deleted the AP-859_worker_updates branch October 2, 2026 18:21
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.

3 participants