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

[FIX] lifecycle/configure.py's "defaults"/"arguments" function does not work for @click.argument types #119

Closed
chrisfandrade16 opened this issue Sep 10, 2024 · 0 comments · Fixed by #127
Assignees
Labels
BUG Something isn't working

Comments

@chrisfandrade16
Copy link
Contributor

chrisfandrade16 commented Sep 10, 2024

These functions work for @click.option types, which have a key and a value. But for @click.argument types, there is no key (e.g. in your CLI command, you don't say --my-argument=5, you would just write 5, because @click.argument types are positional. It appears this was not accounted for anywhere in workflow-core, but I remember this working before with chime-frb-api.

As a result, the func.main(args=arguments, standalone_mode=False) call in lifecycle/execute.py fails because, say if you have a @click.argument called ra and it's given a value of 100, the args here will include ra=100 but it should just be 100; it will produce an error saying ra=100 is not a valid float value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
1 participant