Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gffutils-cli incompatability with argh >= 0.30.0 #224

Open
photocyte opened this issue Nov 6, 2023 · 0 comments
Open

gffutils-cli incompatability with argh >= 0.30.0 #224

photocyte opened this issue Nov 6, 2023 · 0 comments

Comments

@photocyte
Copy link

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant