This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new dd1ba96adf feat: use uv in CI (#31260)
dd1ba96adf is described below
commit dd1ba96adf4b5298b87d0357fbb538802acd74b1
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Mon Dec 2 18:16:56 2024 -0800
feat: use uv in CI (#31260)
---
.github/actions/setup-backend/action.yml | 8 ++++----
Dockerfile | 4 ++--
docker/pip-install.sh | 4 ++--
superset/__init__.py | 3 ++-
4 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/.github/actions/setup-backend/action.yml
b/.github/actions/setup-backend/action.yml
index db3ff7a782..1910f48514 100644
--- a/.github/actions/setup-backend/action.yml
+++ b/.github/actions/setup-backend/action.yml
@@ -42,12 +42,12 @@ runs:
- name: Install dependencies
run: |
if [ "${{ inputs.install-superset }}" = "true" ]; then
- sudo apt-get update && sudo apt-get -y install libldap2-dev
libsasl2-dev build-essential
- pip install --upgrade pip setuptools wheel
+ sudo apt-get update && sudo apt-get -y install libldap2-dev
libsasl2-dev
+ pip install --upgrade pip setuptools wheel uv
if [ "${{ inputs.requirements-type }}" = "dev" ]; then
- pip install -r requirements/development.txt
+ uv pip install --system -r requirements/development.txt
elif [ "${{ inputs.requirements-type }}" = "base" ]; then
- pip install -r requirements/base.txt
+ uv pip install --system -r requirements/base.txt
fi
fi
shell: bash
diff --git a/Dockerfile b/Dockerfile
index 9a89cef357..60ba12eabf 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -85,7 +85,7 @@ RUN if [ "$BUILD_TRANSLATIONS" = "true" ]; then \
# Transition to Python base image
FROM python:${PY_VER} AS python-base
-RUN pip install --no-cache-dir --upgrade setuptools pip
+RUN pip install --no-cache-dir --upgrade setuptools pip uv
######################################################################
# Final lean image...
@@ -191,7 +191,7 @@ RUN --mount=type=bind,source=./docker,target=/docker \
# Install Playwright and its dependencies
RUN --mount=type=cache,target=/root/.cache/pip \
- pip install playwright \
+ uv pip install --system playwright \
&& playwright install-deps
# Optionally install Chromium
diff --git a/docker/pip-install.sh b/docker/pip-install.sh
index 2defc7d1e7..7e69a6efba 100755
--- a/docker/pip-install.sh
+++ b/docker/pip-install.sh
@@ -47,10 +47,10 @@ fi
# Choose whether to use pip cache
if $USE_CACHE; then
echo "Using pip cache..."
- pip install "${ARGS[@]}"
+ uv pip install --system "${ARGS[@]}"
else
echo "Disabling pip cache..."
- pip install --no-cache-dir "${ARGS[@]}"
+ uv pip install --system --no-cache-dir "${ARGS[@]}"
fi
# Remove build-essential if it was installed
diff --git a/superset/__init__.py b/superset/__init__.py
index cbab58e0d2..c97580b122 100644
--- a/superset/__init__.py
+++ b/superset/__init__.py
@@ -34,7 +34,8 @@ from superset.security import SupersetSecurityManager #
noqa: F401
# All of the fields located here should be considered legacy. The correct way
# to declare "global" dependencies is to define it in extensions.py,
# then initialize it in app.create_app(). These fields will be removed
-# in subsequent PRs as things are migrated towards the factory pattern
+# in subsequent PRs as things are migrated towards the factory
+# pattern
app: Flask = current_app
cache = cache_manager.cache
conf = LocalProxy(lambda: current_app.config)