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

Remove warehouse option from the CLI, more tidying #1653

Merged
merged 10 commits into from
Jan 18, 2024

Conversation

Ekrekr
Copy link
Contributor

@Ekrekr Ekrekr commented Jan 18, 2024

No description provided.

@Ekrekr Ekrekr requested a review from BenBirt January 18, 2024 14:33
"The default database to use. For BigQuery, this is a Google Cloud Project ID."
describe: "The default database to use, equivalent to Google Cloud Project ID."
},
check: (argv: yargs.Arguments<any>) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you actually need this? i'm pretty sure yargs fails without all positional arguments specified.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I played around with this, I was surprised that it didn't fail by default either - maybe after a version bump it will

Copy link
Collaborator

Choose a reason for hiding this comment

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

It definitely does fail without positional arguments:

➜ dataform init    
Dataform encountered an error: Not enough non-option arguments: got 0, need at least 1
Dataform encountered an error: Missing required argument: warehouse

cli/index.ts Outdated
@@ -477,15 +473,13 @@ export function runCli() {
},
{
format: `run [${projectDirMustExistOption.name}]`,
description: "Run the dataform project's scripts on the configured data warehouse.",
description: "run the dataform project.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

whyso lowercase

cli/index.ts Outdated
format: `listtables <${ProjectConfigOptions.warehouse.name}>`,
description: "List tables on the configured data warehouse.",
positionalOptions: [ProjectConfigOptions.warehouse],
format: `listtables`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

up to you but: i think we should get rid of these CLI commands, i bet they are effectively never used

@Ekrekr Ekrekr merged commit f14c861 into main_v3 Jan 18, 2024
4 checks passed
@Ekrekr Ekrekr deleted the remove-cli-init-warehouse branch January 18, 2024 17:45
moker-spaghetti pushed a commit to moker-spaghetti/dataform that referenced this pull request May 26, 2024
* Remove warehouse option from the CLI, more tidying

* Fix default db location requirement

* Make default location and database positional for init

* Fix import order

* Remove some unused CLI commands, tidy

* Remove unused finally block
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

Successfully merging this pull request may close these issues.

None yet

2 participants