Skip to content
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
36 changes: 0 additions & 36 deletions .github/actions/setup_build_env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#
# Exit conditions:
# - Python of version `python-version` is ready to be invoked as `python`.
# - Uv of version `uv-version` is ready to be invoked as `uv`.
# - If `run-uv-sync` is true, deps as defined in `pyproject.toml` will have been installed into the venv at `create-venv-at-path`.

name: "Setup Reflex build environment"
Expand All @@ -15,10 +14,6 @@ inputs:
python-version:
description: "Python version setup"
required: true
uv-version:
description: "Uv version to install"
required: false
default: "0.6.9"
run-uv-sync:
description: "Whether to run uv sync on current dir"
required: false
Expand All @@ -34,38 +29,7 @@ runs:
- name: Install UV
uses: astral-sh/setup-uv@v5
with:
version: ${{ inputs.uv-version }}
python-version: ${{ inputs.python-version }}
enable-cache: true
prune-cache: false
cache-dependency-glob: "uv.lock"

- name: Restore cached project python deps
id: restore-pydeps-cache
uses: actions/cache/restore@v4
with:
path: ${{ inputs.create-venv-at-path }}
key: ${{ runner.os }}-python-${{ inputs.python-version }}-pydeps-${{ hashFiles('**/uv.lock') }}

- if: ${{ inputs.run-uv-sync == 'true' && steps.restore-pydeps-cache.outputs.cache-hit != 'true' }}
name: Run uv sync (will get cached)
# We skip over installing the root package (the current project code under CI)
# Root package should not be cached - its content is not reflected in uv.lock / cache key
shell: bash
run: |
uv sync --all-extras --dev --no-install-project

- if: steps.restore-pydeps-cache.outputs.cache-hit != 'true'
name: Save Python deps to cache
uses: actions/cache/save@v4
with:
path: ${{ inputs.create-venv-at-path }}
key: ${{ steps.restore-pydeps-cache.outputs.cache-primary-key }}

- if: ${{ inputs.run-uv-sync == 'true' }}
name: Run uv sync (root package)
# Here we really install the root package (the current project code under CI).env:
# This should not be cached.
shell: bash
run: |
uv sync --all-extras --dev
22 changes: 6 additions & 16 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,13 @@ jobs:
# if: github.event.pull_request.merged == true
strategy:
fail-fast: false
matrix:
# Show OS combos first in GUI
os: [ubuntu-latest]
python-version: ["3.12.8"]
node-version: ["18.x"]

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: ./.github/actions/setup_build_env
with:
python-version: ${{ matrix.python-version }}
python-version: 3.13
run-uv-sync: true

- name: Clone Reflex Website Repo
Expand Down Expand Up @@ -80,7 +71,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_build_env
with:
python-version: 3.12.8
python-version: 3.13
run-uv-sync: true

- name: Build reflex
Expand All @@ -90,7 +81,7 @@ jobs:
# Only run if the database creds are available in this context.
run:
uv run python benchmarks/benchmark_package_size.py --os ubuntu-latest
--python-version 3.12.8 --commit-sha "${{ github.sha }}" --pr-id "${{ github.event.pull_request.id }}"
--python-version 3.13 --commit-sha "${{ github.sha }}" --pr-id "${{ github.event.pull_request.id }}"
--branch-name "${{ github.head_ref || github.ref_name }}"
--path ./dist

Expand All @@ -103,7 +94,6 @@ jobs:
matrix:
# Show OS combos first in GUI
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12.8"]

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -112,7 +102,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.13
- name: Install UV
uses: astral-sh/setup-uv@v5
with:
Expand All @@ -126,7 +116,7 @@ jobs:
- name: calculate and upload size
run:
uv run python benchmarks/benchmark_package_size.py --os "${{ matrix.os }}"
--python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
--python-version "3.13" --commit-sha "${{ github.sha }}"
--pr-id "${{ github.event.pull_request.id }}"
--branch-name "${{ github.head_ref || github.ref_name }}"
--path ./.venv
3 changes: 1 addition & 2 deletions .github/workflows/check_node_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.12.8"]
split_index: [1, 2]
node-version: ["node"]
fail-fast: false
Expand All @@ -27,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_build_env
with:
python-version: ${{ matrix.python-version }}
python-version: 3.13
run-uv-sync: true

- uses: actions/setup-node@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check_outdated_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: ./.github/actions/setup_build_env
with:
python-version: "3.10"
python-version: 3.13
run-uv-sync: true

- name: Check outdated backend dependencies
Expand All @@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@v4
- uses: ./.github/actions/setup_build_env
with:
python-version: "3.10.16"
python-version: 3.13
run-uv-sync: true

- name: Clone Reflex Website Repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration_app_harness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
state_manager: ["redis", "memory"]
python-version: ["3.11.11", "3.12.8", "3.13.1"]
python-version: ["3.11", "3.12", "3.13"]
split_index: [1, 2]
fail-fast: false
runs-on: ubuntu-22.04
Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,7 @@ jobs:
matrix:
# Show OS combos first in GUI
os: [ubuntu-latest, windows-latest]
python-version: ["3.10.16", "3.11.11", "3.12.8", "3.13.1"]
exclude:
- os: windows-latest
python-version: "3.11.11"
- os: windows-latest
python-version: "3.10.16"
include:
- os: windows-latest
python-version: "3.11.9"
- os: windows-latest
python-version: "3.10.11"
python-version: ["3.10", "3.11", "3.12", "3.13"]

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -114,13 +104,11 @@ jobs:
strategy:
fail-fast: false
matrix:
# Show OS combos first in GUI
os: [ubuntu-latest]
python-version: ["3.11.11", "3.12.8"]
python-version: ["3.11", "3.12"]

env:
REFLEX_WEB_WINDOWS_OVERRIDE: "1"
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_build_env
Expand Down Expand Up @@ -155,7 +143,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_build_env
with:
python-version: "3.11.11"
python-version: 3.13
run-uv-sync: true

- name: Create app directory
Expand All @@ -181,7 +169,7 @@ jobs:
fail-fast: false
matrix:
# Note: py311 version chosen due to available arm64 darwin builds.
python-version: ["3.11.9", "3.12.8"]
python-version: ["3.11", "3.12"]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12.8"
python-version: "3.13"

- name: Install dependencies
run: uv sync --all-extras --dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_build_env
with:
python-version: 3.13.2
python-version: 3.13
run-uv-sync: true
- uses: actions/checkout@v4
with:
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10.16", "3.11.11", "3.12.8", "3.13.1"]
# Windows is a bit behind on Python version availability in Github
exclude:
- os: windows-latest
python-version: "3.11.11"
- os: windows-latest
python-version: "3.10.16"
include:
- os: windows-latest
python-version: "3.11.9"
- os: windows-latest
python-version: "3.10.11"
python-version: ["3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}

# Service containers to run with `runner-job`
Expand Down Expand Up @@ -88,8 +77,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# Note: py310, py311 versions chosen due to available arm64 darwin builds.
python-version: ["3.10.11", "3.11.9", "3.12.8", "3.13.1"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ uv run ruff format .
```

Consider installing git pre-commit hooks so Ruff, Pyright, Darglint and `make_pyi` will run automatically before each commit.
Note that pre-commit will only be installed when you use a Python version >= 3.10.

```bash
pre-commit install
uv run pre-commit install
```

That's it you can now submit your PR. Thanks for contributing to Reflex!
Expand Down
Loading