-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Add /tesseract to PYTHONPATH, similar to native execution #372
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #372 +/- ##
===========================================
+ Coverage 66.27% 76.35% +10.07%
===========================================
Files 29 29
Lines 3345 3345
Branches 525 525
===========================================
+ Hits 2217 2554 +337
+ Misses 936 558 -378
- Partials 192 233 +41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
apaleyes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks! do you want to take this all the way and add an example to showcase this change?
|
I wanted to write the same; full example on just this is probably overkill, but maybe mention it:
|
|
@xalelax why is a full example an overkill? in the simplest case it is literally 3 files, no more than 20 lines each |
|
I meant that it's such a small change that probably doing a whole example is a bit too much, not in the sense that it would take us a lot to write it, but that it would be eccessive detail for such a small feature. I'd just mention somewhere in the docs that the path of tesseract_api.py is in the PYTHONPATH (or something more simple and expressive than that), but I'd be fine with an example as well. |
|
I'm a bit confused by this PR, specifically this statement:
From my understanding (and testing), native execution via |
|
@dionhaefner you are correct; this would be the case only if one happens to run tesseract-runtime when cwd is the folder where tesseract_api.py lives, which might be common when developing stuff, but not universal even when scoped to just dev work. TBH I'm not a fan of the concept in general, and if not backed by some user story I'd just revert this, or achieve parity by adding to the @linusseelinger WDYT? (also, sorry for the late reply, I had missed this 🙏 ) |
Yes either this or add a sharp edge to the docs (with a snippet that does |
Description of changes
Add
/tesseracttoPYTHONPATHin Tesseract containers. This takes containerized execution oftesseract_api.pycloser to native execution regarding finding Python modules in the same directory etc.Testing done
Local testing