mozilla/iris

Make OCR support optional

Closed this issue · 5 comments

See #619.

Work items:

  • Adjust bootstrap to make Tesseract/Leptonica install optional (off by default).
  • Remove requirement for Tesseract install from moziris/scripts/main.py, line 167.
  • Add property that indicates presence of Tesseract on system.
  • Use above property in APIs when we detect a string is being used for a find operation, and raise an exception plus helpful warning message.
  • Adjust Docker file(s) to not install Tesseract by default.
  • Adjust Travis CI to not install Tesseract by default.

Here we go:

  • Bootstrap asks if you want to install OCR libraries. If you don't run bootstrap.sh and just run the OS-specific shell script, we will skip this install.
  • Iris does not prevent a run if Tesseract is not found.
  • There is a new static, constant property in Settings called OCR_ENABLED.
  • Each of the image find APIs in finder.py - used by all other APIs - now raises a FindError exception when a string is passed for a search and above property is False.
  • We should not have to adjust Docker or Travis for this change, as this feature is now off by default.

We should see a huge improvement in the bootstrap time - and therefore Travis CI build time, since we no longer have to install/compile all of these libraries. Could save us ~15 minutes on something that used to take us ~19 minutes. \o/

We will need to update the docs to explain that this feature is not on by default and why.

Fixed in 0.8.4

Need to update docs though.

Updated setup and FAQ documents.