diff --git a/.github/actions/setup_build_env/action.yml b/.github/actions/setup_build_env/action.yml index 26c51576a7a..7c16a981efd 100644 --- a/.github/actions/setup_build_env/action.yml +++ b/.github/actions/setup_build_env/action.yml @@ -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" @@ -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 @@ -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 diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 5143d6369f2..c4e5b313bc1 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -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 @@ -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 @@ -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 @@ -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: @@ -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: @@ -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 diff --git a/.github/workflows/check_node_latest.yml b/.github/workflows/check_node_latest.yml index 2c7a31cd62c..61bd675a9ba 100644 --- a/.github/workflows/check_node_latest.yml +++ b/.github/workflows/check_node_latest.yml @@ -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 @@ -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 diff --git a/.github/workflows/check_outdated_dependencies.yml b/.github/workflows/check_outdated_dependencies.yml index 7d3ba359aab..727dd476a6f 100644 --- a/.github/workflows/check_outdated_dependencies.yml +++ b/.github/workflows/check_outdated_dependencies.yml @@ -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 @@ -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 diff --git a/.github/workflows/integration_app_harness.yml b/.github/workflows/integration_app_harness.yml index 1942b12de11..debacdabf8d 100644 --- a/.github/workflows/integration_app_harness.yml +++ b/.github/workflows/integration_app_harness.yml @@ -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 diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index fa00c071816..531dd7c96e2 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -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: @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 6b74d382388..45db63ff77f 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -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 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 20877c4f512..6392c671cd2 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -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: diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 7b5a86b227e..a5357241e35 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -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` @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e013eae6f46..f4d5e42712b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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!