qurator-spk / sbb_binarization

Document Image Binarization
Apache License 2.0
67 stars 14 forks source link

packaging inconsistency #50

Closed bertsky closed 1 year ago

bertsky commented 1 year ago

If I run sbb_binarize --version, I get:

Traceback (most recent call last):
  File "/bin/sbb_binarize", line 8, in <module>
    sys.exit(main())
  File "/lib/python3.6/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/lib/python3.6/site-packages/click/core.py", line 1052, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/lib/python3.6/site-packages/click/core.py", line 914, in make_context
    self.parse_args(ctx, args)
  File "/lib/python3.6/site-packages/click/core.py", line 1370, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/lib/python3.6/site-packages/click/core.py", line 2347, in handle_parse_result
    value = self.process_value(ctx, value)
  File "/lib/python3.6/site-packages/click/core.py", line 2309, in process_value
    value = self.callback(ctx, self, value)
  File "/lib/python3.6/site-packages/click/decorators.py", line 383, in callback
    ) from None
RuntimeError: 'sbb_binarize' is not installed. Try passing 'package_name' instead.

Looks like the name=sbb_binarization kwarg is not consistent with the top-level module sbb_binarize IINM.

Maybe you want to restructure your package using qurator as namespace package on that occasion?

cneud commented 1 year ago

Maybe you want to restructure your package using qurator as namespace package on that occasion?

Yes, that should be the way, we will try to do so asap.

bertsky commented 1 year ago

fixed by #59 (strange the autolinking did not work)

cneud commented 1 year ago

strange the autolinking did not work

Yes I noticed the same for other issues closed by #59, but deliberately kept this open since I think it may make sense to refactor sbb_binarize to sbb_binarization. But I will now track that in a new issue on our internal GitLab.

bertsky commented 1 year ago

but deliberately kept this open since I think it may make sense to refactor sbb_binarize to sbb_binarization.

oh, sry about that.

You might even want to move to the qurator namespace...