Skip to content

Commit

Permalink
[dagster-airlift] pypi (#23516)
Browse files Browse the repository at this point in the history
tooling to ad-hoc push dagster-airlift to pypi.

not sure if there's something more I need to do to avoid getting this
released as part of the main publish process.
  • Loading branch information
dpeng817 authored Aug 8, 2024
1 parent 2768be1 commit 130f8a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
17 changes: 17 additions & 0 deletions examples/experimental/dagster-airlift/build_and_publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# How to release:
# 1. increment the version number in pyproject.toml
# 2. ensure you have an API key from the elementl PyPI account (account is in the password manager)
# 3. run this script from this directory
# 4. once propted, use '__token__' for the username and the API key for the password

rm -rf dist/*
rm -rf dagster_airlift_prerelease/dagster_airlift_patched
cp -R dagster_airlift dagster_airlift_prerelease/dagster_airlift_patched
echo "Patching dagster_airlift"
python3 -m build
echo "Building dagster_airlift"
python3 -m twine upload --repository pypi dist/* --verbose

# cleanup
rm -rf dist/*
rm -rf dagster_airlift_prerelease/dagster_airlift_patched
23 changes: 4 additions & 19 deletions examples/experimental/dagster-airlift/setup.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
from pathlib import Path
from typing import Dict

from setuptools import find_packages, setup


def get_version() -> str:
version: Dict[str, str] = {}
with open(Path(__file__).parent / "dagster_airlift/version.py", encoding="utf8") as fp:
exec(fp.read(), version)

return version["__version__"]


ver = get_version()
# dont pin dev installs to avoid pip dep resolver issues
pin = "" if ver == "1!0+dev" else f"=={ver}"
setup(
name="dagster-airlift",
version=get_version(),
version="0.0.1",
author="Dagster Labs",
author_email="[email protected]",
license="Apache-2.0",
Expand All @@ -38,7 +23,7 @@ def get_version() -> str:
packages=find_packages(exclude=["dagster_airlift_tests*", "examples*"]),
extras_require={
"core": [
f"dagster{pin}",
"dagster",
"apache-airflow>=2.0.0,<2.8",
# Flask-session 0.6 is incompatible with certain airflow-provided test
# utilities.
Expand All @@ -47,8 +32,8 @@ def get_version() -> str:
"pendulum>=2.0.0,<3.0.0",
],
"mwaa": ["boto3"],
"dbt": [f"dagster-dbt{pin}"],
"test": ["pytest", f"dagster-dbt{pin}", "dbt-duckdb", "boto3"],
"dbt": ["dagster-dbt"],
"test": ["pytest", "dagster-dbt", "dbt-duckdb", "boto3"],
},
zip_safe=False,
)

0 comments on commit 130f8a7

Please sign in to comment.