-
Notifications
You must be signed in to change notification settings - Fork 78
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
Make hocr-tools a proper module #42
Comments
We could also write modular code and provide a way to build self contained command files. |
I agree that the advantages of a shared library, resources are larger and we can also require that people are running a setup script (maybe add more options there). Personally, I always run the Would it still be possible to go the PyPI way with that?
Yes, we could maybe build them also for every release as a separate zip (resp. check if we can automate that). Alternatively, it could also be an option for the setup script to build independent python commands. |
Yes, all this can be handled by
Not sure if I understand. The commands cannot be truly self-contained, they still have external dependencies, e.g. Creating special versions of the scripts at build time, e.g. "baking in" the invisible font is possible but very finicky. But we can use setuptools to create egg distributions, Windows installers and such. And of course users should still be able to just |
The README currently states:
I would like to revisit this issue 😄
The advantages of striving to make the programs self-contained is that there is no need to install the whole project to run an individual script, provided the requirements were installed by some other means (e.g. apt-get). For simple scripts like
hocr-check
this is really neat.The disadvantages of self-contained commands are IMHO:
assoc
,get_text
etc.). These are small functions but it's considerable boilerplate and keeping them consistent is a hassle. This also makes it hard to spot that e.g.get_text
has not been needed for a while.hocrlib
module could help reduce boilerplate, though a consistent use of one ofargparse
could also remedy this situation.In summary, I would argue for an approach with a shared library, resources in the file system and require users to properly (
setup.py
) install the tools.What do you think?
In particular, is anyone relying on the scripts being self-contained?
The text was updated successfully, but these errors were encountered: