NatLibFi/Annif

Make stwfsapy an optional dependency

cbartz opened this issue · 0 comments

We would like to release the STWFSA backend into the community. To ensure that Annif is not fundamentally dependent on the compatibility of stwfsapy with Annif, we suggest making stwfsapy an optional dependency in Annif. This way, stwfsapy can still be used within Annif but cannot break the entire system in case of temporary incompatibilities, because it can be removed more easily than a core dependency.

This can be achieved by declaring stwfsapy as an optional dependency in pyproject.toml. The import statement inside annif/backend/init.py should be wrapped by a try...except block to handle any import errors.