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(cli): Create custom Command type to support custom Usage docs #97

Merged

Conversation

nicholasyager
Copy link
Collaborator

Resolves: #93

Description

This PR implements a custom Click Command type called TupleCompatibleCommand, which has a custom usage string implementation which places the [OPTION] metavar at the end of the usage string.

Original

dbt-meshify split [OPTIONS] PROJECT_NAME

Updated

dbt-meshify split PROJECT_NAME [OPTIONS]

This is important from a UX perspective, since --select and other type-typed options will eat all subsequent strings that are not themselves options. For example,

dbt-meshify split --select foo bar

will yield an error, since bar will be interpreted as part of the selector instead of as the project name.

Now, if users follow the example, we will have the following correct usage:

dbt-meshify split bar --select foo

@nicholasyager nicholasyager added the bug Something isn't working label Jul 11, 2023
@nicholasyager nicholasyager self-assigned this Jul 11, 2023
Copy link
Collaborator

@dave-connors-3 dave-connors-3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦞

dbt_meshify/cli.py Outdated Show resolved Hide resolved
@nicholasyager nicholasyager merged commit a32f8ba into dbt-labs:main Jul 17, 2023
1 check passed
@nicholasyager nicholasyager deleted the nicholasyager-improve_selector_docs branch July 17, 2023 14:57
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
Development

Successfully merging this pull request may close these issues.

update docs to reflect multiselect behavior of select
2 participants