Skip to content

Commit

Permalink
[dagster-airlift] Ensure cli requirements are installed
Browse files Browse the repository at this point in the history
  • Loading branch information
dpeng817 committed Oct 16, 2024
1 parent 5ec351d commit f221567
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def proxy() -> None:
"""Commands for working with the Dagster-Airlift proxied state. Requires the `dagster-airlift[in-airflow]` package."""
try:
import dagster_airlift.in_airflow # noqa
except:
except ImportError:
raise Exception(
"dagster-airlift[in-airflow] must be installed in the environment to use any `dagster-airlift proxy` commands."
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ def ensure_airflow_installed() -> None:
except ImportError:
raise Exception(
"Airflow is not installed. Please install Apache Airflow >= 2.0.0 before using this functionality."
"Airflow has very specific installation instructions, please refer to the official installation guide: "
"https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html"
)


Expand Down
9 changes: 7 additions & 2 deletions examples/experimental/dagster-airlift/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def get_version() -> str:
"connexion<3.0.0",
]

CLI_REQUIREMENTS = ["click", "structlog"]


setup(
name="dagster-airlift",
Expand All @@ -55,18 +57,20 @@ def get_version() -> str:
"Operating System :: OS Independent",
],
packages=find_packages(exclude=["dagster_airlift_tests*", "examples*"]),
requires=["click"],
requires=CLI_REQUIREMENTS,
extras_require={
"core": [
f"dagster{pin}",
*CLI_REQUIREMENTS,
],
# [in-airflow] doesn't directly have a dependency on airflow because Airflow cannot be installed via setup.py reliably. Instead, users need to install from a constraints
# file as recommended by the Airflow project.
"in-airflow": [],
"in-airflow": CLI_REQUIREMENTS,
# [tutorial] includes additional dependencies needed to run the tutorial. Namely, the dagster-webserver and the constrained airflow packages.
"tutorial": [
"dagster-webserver",
*AIRFLOW_REQUIREMENTS,
*CLI_REQUIREMENTS,
],
"mwaa": [
"boto3>=1.18.0"
Expand All @@ -80,6 +84,7 @@ def get_version() -> str:
"boto3",
"dagster-webserver",
*AIRFLOW_REQUIREMENTS,
*CLI_REQUIREMENTS,
],
},
entry_points={
Expand Down

0 comments on commit f221567

Please sign in to comment.