Skip to content

Commit 432ab85

Browse files
SK-3118: Restore python-dotenv dependency (fixes broken 1.0.0 import) (#280)
* SK-3118: Restore python-dotenv dependency for flowvault
1 parent cf1e840 commit 432ab85

3 files changed

Lines changed: 53 additions & 0 deletions

File tree

‎.github/workflows/pr-flowvault.yml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,33 @@ jobs:
8282
flags: flowvault
8383
name: codecov-skyflow-python-flowvault
8484
verbose: true
85+
86+
smoke:
87+
name: Clean-install smoke test
88+
runs-on: ubuntu-latest
89+
steps:
90+
- uses: actions/checkout@v4
91+
- uses: actions/setup-python@v2
92+
with:
93+
python-version: '3.9'
94+
95+
# Build the wheel (it bundles the sibling common/ tree via setup.py's
96+
# custom build_py), then install ONLY that wheel into a fresh virtualenv
97+
# and import it. The venv contains just the wheel's declared runtime
98+
# dependencies, so a dependency missing from setup.py fails the import
99+
# here -- the unit-test job installs dev deps and would mask it.
100+
- name: Build the flowvault wheel
101+
run: |
102+
python -m pip install --upgrade pip setuptools wheel
103+
cd flowvault
104+
python setup.py bdist_wheel
105+
106+
- name: Install the wheel in a clean venv and import
107+
run: |
108+
python -m venv /tmp/smoke
109+
/tmp/smoke/bin/pip install --upgrade pip
110+
/tmp/smoke/bin/pip install flowvault/dist/*.whl
111+
# Import from outside the repo so the source tree (flowvault/skyflow,
112+
# ./common) is not on sys.path -- this exercises the installed wheel.
113+
cd /tmp
114+
/tmp/smoke/bin/python -c "import skyflow, common; from skyflow import Skyflow, Env, LogLevel; from skyflow.vault.data import InsertRequest, GetRequest, UpdateRequest, DeleteRequest, DetokenizeRequest, InsertOptions, GetOptions, UpdateOptions, DeleteOptions, DetokenizeOptions; from skyflow.vault.controller import VaultController; print('clean-install import OK')"

‎.github/workflows/shared-build-and-deploy.yml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,28 @@ jobs:
123123
cd "$MODULE"
124124
python setup.py sdist bdist_wheel
125125
126+
# Gate: install each freshly built artifact into its own clean virtualenv
127+
# (only the package's DECLARED runtime deps present) and import it from
128+
# outside the repo. This runs before either publish step and even on a
129+
# dry run, so a missing runtime dependency in setup.py or a
130+
# non-self-contained sdist fails here rather than shipping a broken
131+
# release (both packages import as `skyflow` and bundle `common`).
132+
- name: Smoke test the built package (clean install + import)
133+
run: |
134+
set -e
135+
WHEEL=$(ls "$MODULE"/dist/*.whl)
136+
SDIST=$(ls "$MODULE"/dist/*.tar.gz)
137+
138+
python -m venv /tmp/smoke-wheel
139+
/tmp/smoke-wheel/bin/pip install --upgrade pip
140+
/tmp/smoke-wheel/bin/pip install "$WHEEL"
141+
(cd /tmp && /tmp/smoke-wheel/bin/python -c "import skyflow, common; from skyflow import Skyflow, Env, LogLevel; print('wheel clean-install import OK')")
142+
143+
python -m venv /tmp/smoke-sdist
144+
/tmp/smoke-sdist/bin/pip install --upgrade pip setuptools wheel
145+
/tmp/smoke-sdist/bin/pip install "$SDIST"
146+
(cd /tmp && /tmp/smoke-sdist/bin/python -c "import skyflow, common; from skyflow import Skyflow, Env, LogLevel; print('sdist clean-install import OK')")
147+
126148
- name: Publish to PyPI
127149
if: ${{ (inputs.tag == 'beta' || inputs.tag == 'public') && inputs.dry-run != true }}
128150
env:

‎flowvault/setup.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def run(self):
8989
'PyJWT >= 2.12, < 3',
9090
'cryptography >= 44.0.2',
9191
'httpx >= 0.21.2',
92+
'python-dotenv >= 1.1.0, < 2',
9293
# NOTE: 'requests' intentionally omitted -- only used today by v2's Connection
9394
# controller, which isn't part of v3's scope this round.
9495
],

0 commit comments

Comments
 (0)