Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use uv in CI #31260

Merged
merged 7 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/actions/setup-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docker/pip-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion superset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
# 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)
Expand Down
Loading