forked from flyteorg/flytekit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use uv in CI and to build images (flyteorg#2403)
* Use uv in CI and to build images Signed-off-by: Eduardo Apolinario <[email protected]> * Source venv and remove extraneous -y Signed-off-by: Eduardo Apolinario <[email protected]> * Use format that uv understands Signed-off-by: Eduardo Apolinario <[email protected]> * Fix lint errors Signed-off-by: Eduardo Apolinario <[email protected]> * Test sourcing the venv in hypothesis job Signed-off-by: Eduardo Apolinario <[email protected]> * Source everywhere Signed-off-by: Eduardo Apolinario <[email protected]> * Remove redundant shellcheck Signed-off-by: Eduardo Apolinario <[email protected]> * Add activate-uv-venv target Signed-off-by: Eduardo Apolinario <[email protected]> * Install uv in the system python Signed-off-by: Eduardo Apolinario <[email protected]> * Add --system Signed-off-by: Eduardo Apolinario <[email protected]> * Install plugin dev-requirements in the system python Signed-off-by: Eduardo Apolinario <[email protected]> * Rename setup-uv to setup-global-uv Signed-off-by: Eduardo Apolinario <[email protected]> * Fix call to install flytekit in dev image Signed-off-by: Eduardo Apolinario <[email protected]> * Comment out the dolt unit tests Signed-off-by: Eduardo Apolinario <[email protected]> * Fix papermill and great expectations enviroment setup Signed-off-by: Eduardo Apolinario <[email protected]> --------- Signed-off-by: Eduardo Apolinario <[email protected]> Co-authored-by: Eduardo Apolinario <[email protected]>
- Loading branch information
1 parent
c0eca6a
commit 0d4981b
Showing
7 changed files
with
58 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,9 +57,10 @@ jobs: | |
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.in', 'requirements.in')) }} | ||
- name: Install dependencies | ||
run: | | ||
make setup | ||
pip uninstall -y pandas | ||
pip freeze | ||
pip install uv | ||
make setup-global-uv | ||
uv pip uninstall --system pandas | ||
uv pip freeze | ||
- name: Test with coverage | ||
run: | | ||
make unit_test_codecov | ||
|
@@ -95,9 +96,10 @@ jobs: | |
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.in', 'requirements.in')) }} | ||
- name: Install dependencies | ||
run: | | ||
make setup | ||
pip uninstall -y pandas | ||
pip freeze | ||
pip install uv | ||
make setup-global-uv | ||
uv pip uninstall --system pandas | ||
uv pip freeze | ||
- name: Run extras unit tests with coverage | ||
# Skip this step if running on python 3.12 due to https://github.com/tensorflow/tensorflow/issues/62003 | ||
# and https://github.com/pytorch/pytorch/issues/110436 | ||
|
@@ -137,9 +139,10 @@ jobs: | |
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.in', 'requirements.in')) }} | ||
- name: Install dependencies | ||
run: | | ||
make setup | ||
pip install --force-reinstall "${{ matrix.pandas }}" | ||
pip freeze | ||
pip install uv | ||
make setup-global-uv | ||
uv pip install --system --force-reinstall "${{ matrix.pandas }}" | ||
uv pip freeze | ||
- name: Test with coverage | ||
run: | | ||
make unit_test_codecov | ||
|
@@ -172,7 +175,10 @@ jobs: | |
# Look to see if there is a cache hit for the corresponding requirements files | ||
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.in', 'requirements.in')) }} | ||
- name: Install dependencies | ||
run: make setup && pip freeze | ||
run: | | ||
pip install uv | ||
make setup-global-uv | ||
uv pip freeze | ||
- name: Test with coverage | ||
env: | ||
FLYTEKIT_HYPOTHESIS_PROFILE: ci | ||
|
@@ -207,7 +213,10 @@ jobs: | |
# Look to see if there is a cache hit for the corresponding requirements files | ||
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.in', 'requirements.in')) }} | ||
- name: Install dependencies | ||
run: make setup && pip freeze | ||
run: | | ||
pip install uv | ||
make setup-global-uv | ||
uv pip freeze | ||
- name: Test with coverage | ||
run: | | ||
make test_serialization_codecov | ||
|
@@ -244,7 +253,10 @@ jobs: | |
# Look to see if there is a cache hit for the corresponding requirements files | ||
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.in', 'requirements.in')) }} | ||
- name: Install dependencies | ||
run: make setup && pip freeze | ||
run: | | ||
pip install uv | ||
make setup-global-uv | ||
uv pip freeze | ||
- name: Install FlyteCTL | ||
uses: unionai-oss/flytectl-setup-action@master | ||
- name: Setup Flyte Sandbox | ||
|
@@ -272,7 +284,8 @@ jobs: | |
FLYTEKIT_IMAGE: localhost:30000/flytekit:dev | ||
FLYTEKIT_CI: 1 | ||
PYTEST_OPTS: -n2 | ||
run: make integration_test_codecov | ||
run: | | ||
make integration_test_codecov | ||
- name: Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
|
@@ -299,7 +312,8 @@ jobs: | |
- flytekit-data-fsspec | ||
- flytekit-dbt | ||
- flytekit-deck-standard | ||
- flytekit-dolt | ||
# TODO: remove dolt plugin - https://github.com/flyteorg/flyte/issues/5350 | ||
# flytekit-dolt | ||
- flytekit-duckdb | ||
- flytekit-envd | ||
- flytekit-flyteinteractive | ||
|
@@ -395,14 +409,15 @@ jobs: | |
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.txt', format('plugins/{0}/requirements.txt', matrix.plugin-names ))) }} | ||
- name: Install dependencies | ||
run: | | ||
pip install uv | ||
# TODO: double-check if checking out all tags solves the issue | ||
export SETUPTOOLS_SCM_PRETEND_VERSION="3.0.0" | ||
make setup | ||
make setup-global-uv | ||
cd plugins/${{ matrix.plugin-names }} | ||
pip install . | ||
if [ -f dev-requirements.in ]; then pip install -r dev-requirements.in; fi | ||
pip install -U $GITHUB_WORKSPACE | ||
pip freeze | ||
uv pip install --system . | ||
if [ -f dev-requirements.in ]; then uv pip install --system -r dev-requirements.in; fi | ||
uv pip install --system -U $GITHUB_WORKSPACE | ||
uv pip freeze | ||
- name: Test with coverage | ||
run: | | ||
cd plugins/${{ matrix.plugin-names }} | ||
|
@@ -435,12 +450,9 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
make setup | ||
pip freeze | ||
pip install uv | ||
make setup-global-uv | ||
uv pip freeze | ||
- name: Lint | ||
run: | | ||
make lint | ||
- name: ShellCheck | ||
uses: ludeeus/action-shellcheck@master | ||
with: | ||
ignore_paths: boilerplate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
-e file:../../.#egg=flytekitplugins-spark&subdirectory=plugins/flytekit-spark | ||
-e file:../flytekit-spark/.#egg=flytekitplugins-spark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
-e file:../../.#egg=flytekit | ||
-e file:../../.#egg=flytekitplugins-pod&subdirectory=plugins/flytekit-k8s-pod | ||
-e file:../../.#egg=flytekitplugins-spark&subdirectory=plugins/flytekit-spark | ||
-e file:../../.#egg=flytekitplugins-awsbatch&subdirectory=plugins/flytekit-aws-batch | ||
-e file:../flytekit-k8s-pod/.#egg=flytekitplugins-pod | ||
-e file:../flytekit-spark/.#egg=flytekitplugins-spark | ||
-e file:../flytekit-aws-batch/.#egg=flytekitplugins-awsbatch |