From fcff5fdb328dd9050ef0b6ecea2b15ab6319cc7d Mon Sep 17 00:00:00 2001 From: Maxime Armstrong <46797220+maximearmstrong@users.noreply.github.com> Date: Wed, 6 Mar 2024 15:22:39 -0500 Subject: [PATCH] Add version in dagster-openai (#20304) ## Summary & Motivation This PR adds version.py in dagster-openai, whitelisting the integration for the release and publication to PyPi. ## How I Tested These Changes BK --- .../libraries/dagster-openai/dagster_openai/__init__.py | 5 ++--- .../libraries/dagster-openai/dagster_openai/version.py | 1 + python_modules/libraries/dagster-openai/setup.py | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 python_modules/libraries/dagster-openai/dagster_openai/version.py diff --git a/python_modules/libraries/dagster-openai/dagster_openai/__init__.py b/python_modules/libraries/dagster-openai/dagster_openai/__init__.py index 551edf064a841..33135855dc8df 100644 --- a/python_modules/libraries/dagster-openai/dagster_openai/__init__.py +++ b/python_modules/libraries/dagster-openai/dagster_openai/__init__.py @@ -4,7 +4,6 @@ OpenAIResource as OpenAIResource, with_usage_metadata as with_usage_metadata, ) +from .version import __version__ -# TODO: replace version by `__version__` when we add back a version.py file and publish library to pypi. -# Import with `from .version import __version__` -DagsterLibraryRegistry.register("dagster-openai", "1!0+dev") +DagsterLibraryRegistry.register("dagster-openai", __version__) diff --git a/python_modules/libraries/dagster-openai/dagster_openai/version.py b/python_modules/libraries/dagster-openai/dagster_openai/version.py new file mode 100644 index 0000000000000..fe3fd8a8248b6 --- /dev/null +++ b/python_modules/libraries/dagster-openai/dagster_openai/version.py @@ -0,0 +1 @@ +__version__ = "1!0+dev" diff --git a/python_modules/libraries/dagster-openai/setup.py b/python_modules/libraries/dagster-openai/setup.py index 95a9f28fbb299..b16772210eced 100644 --- a/python_modules/libraries/dagster-openai/setup.py +++ b/python_modules/libraries/dagster-openai/setup.py @@ -11,8 +11,7 @@ def get_version(): return version["__version__"] -# TODO: replace by `ver = get_version()` when we add back a version.py file and publish library to pypi. -ver = "1!0+dev" +ver = get_version() # dont pin dev installs to avoid pip dep resolver issues pin = "" if ver == "1!0+dev" else f"=={ver}" setup(