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

Forward CLI args to application #44

Open
davidbrochart opened this issue Oct 13, 2021 · 1 comment
Open

Forward CLI args to application #44

davidbrochart opened this issue Oct 13, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@davidbrochart
Copy link
Contributor

Problem

Currently, FPS "captures" CLI arguments and treats them only as configuration options. Anything else passed to the CLI fails, such as subcommands, or arguments and options that are not configuration-related.
For instance, in quetz run test_quetz --copy-conf ./dev_config.toml --dev --reload:

  • run is a subcommand.
  • test_quetz is a required argument.
  • --copy-conf is an option that has value ./dev_config.toml.
  • --dev and --reload are flags.

Proposed Solution

FPS should "forward" any subcommand, argument and options that are not configuration-related to the underlying application.

Additional context

This is needed if we want to use FPS in Quetz.

@davidbrochart davidbrochart added the enhancement New feature or request label Oct 13, 2021
@adriendelsalle
Copy link
Member

I would probably have a different approach here by "just" defining another CLI using typer.
Why not reusing the same approach as what's done in Quetz CLI?

https://github.com/mamba-org/quetz/blob/dbbe519a93ec304319654eabca22dbce791eb13d/quetz/cli.py#L548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants