pkg_resources is deprecated. Using it breaks gandlf now: while extracting gandlf version, it builds a whole tree of dependencies and fails as torchio requires typer[all], while modern typer==0.12.0+ doesn't have all option anymore (compare to 0.11.1, "Installation" section). Though the issue itself is very minor, pkg_resources treat it as critical and fails.
The best solution is just to replace pkg_resources with more modern tools
Proposed Changes
replace pkg_resources with importlib.metadata to extract gandlf version
[x] Non-breaking change (does not break existing functionality): provide as many details as possible for any breaking change.
[x] Function/class source code documentation added/updated (ensure typing is used to provide type hints, including and not limited to using Optional if a variable has a pre-defined value).
[x] Code has been blacked for style consistency and linting.
[x] Tests added or modified to cover the changes; if coverage is reduced, please give explanation.
[x] If customized dependency installation is required (i.e., a separate pip install step is needed for PR to be functional), please ensure it is reflected in all the files that control the CI, namely: python-test.yml, and all docker files [1,2,3].
pkg_resources is deprecated. Using it breaks gandlf now: while extracting gandlf version, it builds a whole tree of dependencies and fails as
torchio
requirestyper[all]
, while modern typer==0.12.0+ doesn't haveall
option anymore (compare to 0.11.1, "Installation" section). Though the issue itself is very minor,pkg_resources
treat it as critical and fails. The best solution is just to replace pkg_resources with more modern toolsProposed Changes
pkg_resources
withimportlib.metadata
to extract gandlf versionChecklist
CONTRIBUTING
guide has been followed.typing
is used to provide type hints, including and not limited to usingOptional
if a variable has a pre-defined value).pip install
step is needed for PR to be functional), please ensure it is reflected in all the files that control the CI, namely: python-test.yml, and all docker files [1,2,3].