gffutils
gffutils copied to clipboard
gffutils-cli incompatability with argh >= 0.30.0
Hi there,
A breaking change in argh
seems to have impacted gffutils-cli
:
https://argh.readthedocs.io/en/latest/changes.html#version-0-30-0-2023-10-21
mamba create -y -p gffutils_cli_env2 'argh>=0.30.0' 'gffutils'
conda run -p ./gffutils_cli_env2 gffutils-cli children symlinks/{gff_name}.db {transcript_id}
File "./gffutils_cli_env2/lib/python3.12/site-packages/argh/assembling.py", line 155, in infer_argspecs_from_function
raise ArgumentNameMappingError(
argh.assembling.ArgumentNameMappingError: Argument "limit" in function "children"
is not keyword-only but has a default value.
Please note that since Argh v.0.30 the default name mapping
policy has changed.
More information:
https://argh.readthedocs.io/en/latest/changes.html#version-0-30-0-2023-10-21
You need to upgrade your functions so that the arguments
that have default values become keyword-only:
f(x=1) -> f(*, x=1)
If you actually want an optional positional argument,
please set the name mapping policy explicitly to `BY_NAME_IF_KWONLY`.
If you choose to postpone the migration, you have two options:
a) set the policy explicitly to `BY_NAME_IF_HAS_DEFAULT`;
b) pin Argh version to 0.29 until you are ready to migrate.
Thank you for understanding!
Works just fine with:
mamba create -p gffutils_cli_env 'argh<0.30.0' 'gffutils'