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

Enabling available subcommands when cli isn't installed #2272

Merged
merged 2 commits into from
Feb 17, 2025

Conversation

anuunchin
Copy link
Contributor

Description

The Available Subcommands for dlt deploy, including github-action and airflow-composer, are displayed in help even when the dlt[cli] extra is not installed.

Related Issues

Additional Context

Basically, now the pipdeptree and cron_descriptor imports in deploy_command_helpers.py do not fail, and plugins.py directly checks if they can be available in order to decide whether the deploy_command_available resolves to True - instead of depending on a ModuleNotFound error that stems from these imports in deploy_command_helpers.py.

Copy link

netlify bot commented Feb 6, 2025

Deploy Preview for dlt-hub-docs ready!

Name Link
🔨 Latest commit 454ed7d
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/67ab3ba9dbe47900078d7710
😎 Deploy Preview https://deploy-preview-2272--dlt-hub-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@anuunchin anuunchin requested a review from rudolfix February 13, 2025 18:52
@anuunchin
Copy link
Contributor Author

anuunchin commented Feb 14, 2025

For context, the subcommands are visible with dlt deploy -h even when the cli extension is not installed. So the result is:

anuunchinbat@anuuns-Air dlt % dlt deploy -h
Usage: dlt deploy [-h] pipeline-script-path {github-action,airflow-composer} ...

The dlt deploy command prepares your pipeline for deployment and gives you step-by-step instructions on how to accomplish it. To enable this functionality, please
first execute pip install "dlt[cli]" which will add additional packages to the current environment.

Positional Arguments:
  pipeline-script-path  Path to a pipeline script

Options:
  -h, --help            show this help message and exit

Available Subcommands:
  {github-action,airflow-composer}
    github-action       Deploys the pipeline to Github Actions
    airflow-composer    Deploys the pipeline to Airflow

Previously it was:

anuunchinbat@anuuns-Air dlt % dlt deploy -h
Usage: dlt deploy [-h] pipeline-script-path

The dlt deploy command prepares your pipeline for deployment and gives you step-by-step instructions on how to accomplish it. To enable this functionality, please
first execute pip install "dlt[cli]" which will add additional packages to the current environment.

Positional Arguments:
  pipeline-script-path  Path to a pipeline script

Options:
  -h, --help            show this help message and exit

Copy link
Collaborator

@sh-rp sh-rp left a comment

Choose a reason for hiding this comment

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

lgtm!

@sh-rp sh-rp merged commit 4303934 into devel Feb 17, 2025
71 of 72 checks passed
@sh-rp sh-rp deleted the feat/2195-explicit-description-to-install-cli branch February 17, 2025 11:48
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.

2 participants