Skip to content

Commit 880975a

Browse files
authored
improve client state (#4597)
* improve client state * no comma * update python for unit tests * overwrite it for windows * bump other python versions
1 parent 93245ef commit 880975a

File tree

9 files changed

+203
-181
lines changed

9 files changed

+203
-181
lines changed

.github/workflows/benchmarks.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types:
66
- closed
77
paths-ignore:
8-
- '**/*.md'
8+
- "**/*.md"
99

1010
permissions:
1111
contents: read
@@ -15,21 +15,21 @@ defaults:
1515
shell: bash
1616

1717
env:
18-
PYTHONIOENCODING: 'utf8'
18+
PYTHONIOENCODING: "utf8"
1919
TELEMETRY_ENABLED: false
20-
NODE_OPTIONS: '--max_old_space_size=8192'
20+
NODE_OPTIONS: "--max_old_space_size=8192"
2121
PR_TITLE: ${{ github.event.pull_request.title }}
2222

2323
jobs:
2424
reflex-web:
25-
# if: github.event.pull_request.merged == true
25+
# if: github.event.pull_request.merged == true
2626
strategy:
2727
fail-fast: false
2828
matrix:
2929
# Show OS combos first in GUI
3030
os: [ubuntu-latest]
31-
python-version: ['3.11.4']
32-
node-version: ['18.x']
31+
python-version: ["3.12.8"]
32+
node-version: ["18.x"]
3333

3434
runs-on: ${{ matrix.os }}
3535
steps:
@@ -81,24 +81,24 @@ jobs:
8181
matrix:
8282
# Show OS combos first in GUI
8383
os: [ubuntu-latest, windows-latest, macos-latest]
84-
python-version: ['3.9.18', '3.10.13', '3.11.5', '3.12.0']
84+
python-version: ["3.9.21", "3.10.16", "3.11.11", "3.12.8"]
8585
exclude:
8686
- os: windows-latest
87-
python-version: '3.10.13'
87+
python-version: "3.10.16"
8888
- os: windows-latest
89-
python-version: '3.9.18'
89+
python-version: "3.9.21"
9090
# keep only one python version for MacOS
9191
- os: macos-latest
92-
python-version: '3.9.18'
92+
python-version: "3.9.21"
9393
- os: macos-latest
94-
python-version: '3.10.13'
94+
python-version: "3.10.16"
9595
- os: macos-latest
96-
python-version: '3.12.0'
96+
python-version: "3.11.11"
9797
include:
9898
- os: windows-latest
99-
python-version: '3.10.11'
99+
python-version: "3.10.11"
100100
- os: windows-latest
101-
python-version: '3.9.13'
101+
python-version: "3.9.13"
102102

103103
runs-on: ${{ matrix.os }}
104104
steps:
@@ -123,7 +123,7 @@ jobs:
123123
--event-type "${{ github.event_name }}" --pr-id "${{ github.event.pull_request.id }}"
124124

125125
reflex-dist-size: # This job is used to calculate the size of the Reflex distribution (wheel file)
126-
if: github.event.pull_request.merged == true
126+
if: github.event.pull_request.merged == true
127127
timeout-minutes: 30
128128
strategy:
129129
# Prioritize getting more information out of the workflow (even if something fails)
@@ -133,7 +133,7 @@ jobs:
133133
- uses: actions/checkout@v4
134134
- uses: ./.github/actions/setup_build_env
135135
with:
136-
python-version: 3.11.5
136+
python-version: 3.12.8
137137
run-poetry-install: true
138138
create-venv-at-path: .venv
139139
- name: Build reflex
@@ -143,20 +143,20 @@ jobs:
143143
# Only run if the database creds are available in this context.
144144
run:
145145
poetry run python benchmarks/benchmark_package_size.py --os ubuntu-latest
146-
--python-version 3.11.5 --commit-sha "${{ github.sha }}" --pr-id "${{ github.event.pull_request.id }}"
146+
--python-version 3.12.8 --commit-sha "${{ github.sha }}" --pr-id "${{ github.event.pull_request.id }}"
147147
--branch-name "${{ github.head_ref || github.ref_name }}"
148148
--path ./dist
149149

150150
reflex-venv-size: # This job calculates the total size of Reflex and its dependencies
151-
if: github.event.pull_request.merged == true
151+
if: github.event.pull_request.merged == true
152152
timeout-minutes: 30
153153
strategy:
154154
# Prioritize getting more information out of the workflow (even if something fails)
155155
fail-fast: false
156156
matrix:
157157
# Show OS combos first in GUI
158158
os: [ubuntu-latest, windows-latest, macos-latest]
159-
python-version: ['3.11.5']
159+
python-version: ["3.12.8"]
160160

161161
runs-on: ${{ matrix.os }}
162162
steps:
@@ -186,6 +186,6 @@ jobs:
186186
run:
187187
poetry run python benchmarks/benchmark_package_size.py --os "${{ matrix.os }}"
188188
--python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
189-
--pr-id "${{ github.event.pull_request.id }}"
189+
--pr-id "${{ github.event.pull_request.id }}"
190190
--branch-name "${{ github.head_ref || github.ref_name }}"
191-
--path ./.venv
191+
--path ./.venv

.github/workflows/check_generated_pyi.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ concurrency:
66

77
on:
88
push:
9-
branches: ['main']
9+
branches: ["main"]
1010
# We don't just trigger on make_pyi.py and the components dir, because
1111
# there are other things that can change the generator output
1212
# e.g. black version, reflex.Component, reflex.Var.
1313
paths-ignore:
14-
- '**/*.md'
14+
- "**/*.md"
1515
pull_request:
16-
branches: ['main']
16+
branches: ["main"]
1717
paths-ignore:
18-
- '**/*.md'
18+
- "**/*.md"
1919

2020
jobs:
2121
check-generated-pyi-components:
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v4
2626
- uses: ./.github/actions/setup_build_env
2727
with:
28-
python-version: '3.11.5'
28+
python-version: "3.12.8"
2929
run-poetry-install: true
3030
create-venv-at-path: .venv
3131
- run: |
Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,40 @@
11
name: integration-node-latest
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
1010

1111
env:
12-
TELEMETRY_ENABLED: false
13-
REFLEX_USE_SYSTEM_NODE: true
12+
TELEMETRY_ENABLED: false
13+
REFLEX_USE_SYSTEM_NODE: true
1414

1515
jobs:
16-
check_latest_node:
17-
runs-on: ubuntu-22.04
18-
strategy:
19-
matrix:
20-
python-version: ['3.12']
21-
split_index: [1, 2]
22-
node-version: ['node']
23-
fail-fast: false
24-
25-
steps:
26-
- uses: actions/checkout@v4
27-
- uses: ./.github/actions/setup_build_env
28-
with:
29-
python-version: ${{ matrix.python-version }}
30-
run-poetry-install: true
31-
create-venv-at-path: .venv
32-
- uses: actions/setup-node@v4
33-
with:
34-
node-version: ${{ matrix.node-version }}
35-
- run: |
36-
poetry run uv pip install pyvirtualdisplay pillow pytest-split
37-
poetry run playwright install --with-deps
38-
- run: |
39-
poetry run pytest tests/test_node_version.py
40-
poetry run pytest tests/integration --splits 2 --group ${{matrix.split_index}}
41-
42-
16+
check_latest_node:
17+
runs-on: ubuntu-22.04
18+
strategy:
19+
matrix:
20+
python-version: ["3.12.8"]
21+
split_index: [1, 2]
22+
node-version: ["node"]
23+
fail-fast: false
4324

25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: ./.github/actions/setup_build_env
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
run-poetry-install: true
31+
create-venv-at-path: .venv
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
- run: |
36+
poetry run uv pip install pyvirtualdisplay pillow pytest-split
37+
poetry run playwright install --with-deps
38+
- run: |
39+
poetry run pytest tests/test_node_version.py
40+
poetry run pytest tests/integration --splits 2 --group ${{matrix.split_index}}
Lines changed: 64 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,86 @@
11
name: check-outdated-dependencies
22

33
on:
4-
push: # This will trigger the action when a pull request is opened or updated.
4+
push: # This will trigger the action when a pull request is opened or updated.
55
branches:
6-
- 'release/**' # This will trigger the action when any branch starting with "release/" is created.
7-
workflow_dispatch: # Allow manual triggering if needed.
6+
- "release/**" # This will trigger the action when any branch starting with "release/" is created.
7+
workflow_dispatch: # Allow manual triggering if needed.
88

99
jobs:
1010
backend:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v3
14+
- name: Checkout code
15+
uses: actions/checkout@v3
1616

17-
- uses: ./.github/actions/setup_build_env
18-
with:
19-
python-version: '3.9'
20-
run-poetry-install: true
21-
create-venv-at-path: .venv
17+
- uses: ./.github/actions/setup_build_env
18+
with:
19+
python-version: "3.9.21"
20+
run-poetry-install: true
21+
create-venv-at-path: .venv
2222

23-
- name: Check outdated backend dependencies
24-
run: |
25-
outdated=$(poetry show -oT)
26-
echo "Outdated:"
27-
echo "$outdated"
23+
- name: Check outdated backend dependencies
24+
run: |
25+
outdated=$(poetry show -oT)
26+
echo "Outdated:"
27+
echo "$outdated"
2828
29-
filtered_outdated=$(echo "$outdated" | grep -vE 'pyright|ruff' || true)
30-
31-
if [ ! -z "$filtered_outdated" ]; then
32-
echo "Outdated dependencies found:"
33-
echo "$filtered_outdated"
34-
exit 1
35-
else
36-
echo "All dependencies are up to date. (pyright and ruff are ignored)"
37-
fi
29+
filtered_outdated=$(echo "$outdated" | grep -vE 'pyright|ruff' || true)
3830
31+
if [ ! -z "$filtered_outdated" ]; then
32+
echo "Outdated dependencies found:"
33+
echo "$filtered_outdated"
34+
exit 1
35+
else
36+
echo "All dependencies are up to date. (pyright and ruff are ignored)"
37+
fi
3938
4039
frontend:
4140
runs-on: ubuntu-latest
4241

4342
steps:
44-
- name: Checkout code
45-
uses: actions/checkout@v4
46-
- uses: ./.github/actions/setup_build_env
47-
with:
48-
python-version: '3.10.11'
49-
run-poetry-install: true
50-
create-venv-at-path: .venv
51-
- name: Clone Reflex Website Repo
52-
uses: actions/checkout@v4
53-
with:
54-
repository: reflex-dev/reflex-web
55-
ref: main
56-
path: reflex-web
57-
- name: Install Requirements for reflex-web
58-
working-directory: ./reflex-web
59-
run: poetry run uv pip install -r requirements.txt
60-
- name: Install additional dependencies for DB access
61-
run: poetry run uv pip install psycopg
62-
- name: Init Website for reflex-web
63-
working-directory: ./reflex-web
64-
run: poetry run reflex init
65-
- name: Run Website and Check for errors
66-
run: |
67-
poetry run bash scripts/integration.sh ./reflex-web dev
68-
- name: Check outdated frontend dependencies
69-
working-directory: ./reflex-web/.web
70-
run: |
71-
raw_outdated=$(/home/runner/.local/share/reflex/bun/bin/bun outdated)
72-
outdated=$(echo "$raw_outdated" | grep -vE '\|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\|' || true)
73-
echo "Outdated:"
74-
echo "$outdated"
75-
76-
# Ignore 3rd party dependencies that are not updated.
77-
filtered_outdated=$(echo "$outdated" | grep -vE 'Package|@chakra-ui|lucide-react|@splinetool/runtime|ag-grid-react|framer-motion|react-markdown|remark-math|remark-gfm|rehype-katex|rehype-raw|remark-unwrap-images' || true)
78-
no_extra=$(echo "$filtered_outdated" | grep -vE '\|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-' || true)
43+
- name: Checkout code
44+
uses: actions/checkout@v4
45+
- uses: ./.github/actions/setup_build_env
46+
with:
47+
python-version: "3.10.16"
48+
run-poetry-install: true
49+
create-venv-at-path: .venv
50+
- name: Clone Reflex Website Repo
51+
uses: actions/checkout@v4
52+
with:
53+
repository: reflex-dev/reflex-web
54+
ref: main
55+
path: reflex-web
56+
- name: Install Requirements for reflex-web
57+
working-directory: ./reflex-web
58+
run: poetry run uv pip install -r requirements.txt
59+
- name: Install additional dependencies for DB access
60+
run: poetry run uv pip install psycopg
61+
- name: Init Website for reflex-web
62+
working-directory: ./reflex-web
63+
run: poetry run reflex init
64+
- name: Run Website and Check for errors
65+
run: |
66+
poetry run bash scripts/integration.sh ./reflex-web dev
67+
- name: Check outdated frontend dependencies
68+
working-directory: ./reflex-web/.web
69+
run: |
70+
raw_outdated=$(/home/runner/.local/share/reflex/bun/bin/bun outdated)
71+
outdated=$(echo "$raw_outdated" | grep -vE '\|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\|' || true)
72+
echo "Outdated:"
73+
echo "$outdated"
7974
75+
# Ignore 3rd party dependencies that are not updated.
76+
filtered_outdated=$(echo "$outdated" | grep -vE 'Package|@chakra-ui|lucide-react|@splinetool/runtime|ag-grid-react|framer-motion|react-markdown|remark-math|remark-gfm|rehype-katex|rehype-raw|remark-unwrap-images' || true)
77+
no_extra=$(echo "$filtered_outdated" | grep -vE '\|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-' || true)
8078
81-
if [ ! -z "$no_extra" ]; then
82-
echo "Outdated dependencies found:"
83-
echo "$filtered_outdated"
84-
exit 1
85-
else
86-
echo "All dependencies are up to date. (3rd party packages are ignored)"
87-
fi
8879
80+
if [ ! -z "$no_extra" ]; then
81+
echo "Outdated dependencies found:"
82+
echo "$filtered_outdated"
83+
exit 1
84+
else
85+
echo "All dependencies are up to date. (3rd party packages are ignored)"
86+
fi

.github/workflows/integration_app_harness.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
timeout-minutes: 30
2323
strategy:
2424
matrix:
25-
state_manager: ['redis', 'memory']
26-
python-version: ['3.11.5', '3.12.0', '3.13.0']
25+
state_manager: ["redis", "memory"]
26+
python-version: ["3.11.11", "3.12.8", "3.13.1"]
2727
split_index: [1, 2]
2828
fail-fast: false
2929
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)