texworld / betterbib

:green_book: Command-line tools for bibliographies.
816 stars 42 forks source link

Run update as pre-commit hook: libenchant #244

Closed akhmerov closed 2 years ago

akhmerov commented 2 years ago

I'm trying to configure betterbib update to work as a pre-commit hook, but right now it fails because of lacking libenchant. Is there no workaround?

nschloe commented 2 years ago

Install libenchant?

akhmerov commented 2 years ago

I'm not sure how to achieve this within pre-commit paradigm. I understand that it works locally due to relying on a globally installed library, but I don't think this would work e.g. in pre-commit CI.

akhmerov commented 2 years ago

There the two pathways are either specifying dependencies using conda or pip, and conda-forge version of libenchant seems to not work with pyenchant: I see OSError: /home/anton/miniconda3/envs/py39/lib/enchant-2: cannot read file data: Is a directory

nschloe commented 2 years ago

Perhaps pyenchant can be replaced with something more portable, e.g., pyspellchecker.

nschloe commented 2 years ago

This is blocked by https://github.com/barrust/pyspellchecker/issues/122.

nschloe commented 2 years ago

I've now removed pyenchant as a dependency.

akhmerov commented 2 years ago

Wow, excellent, thank you very much!