Skip to content

Add y/n option to missing libraries #89

@krowvin

Description

@krowvin

CLI Script

cwms-cli

Feature Proposal

If a user does not have a required library, you will see this due to the @requires decorator.

cwms-cli blob list 
Error: Missing module(s):
- `cwms` (install: `cwms-python`) — CWMS REST API Python client [docs](https://github.com/HydrologicEngineeringCenter/cwms-python)

Install missing packages:
    pip install cwms-python

Should the CLI prompt the user y/n to auto install the library?

I.e. something like

Would you like to install missing packages?
    pip install cwms-python

> [Y]es/[N]o: N

Bonus, we can use sys.executable to install it so that it will also respect the current python env.

Thinking we can build this into the @requires decorator

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions