Skip to content

Commit 1654c42

Browse files
committed
update working dir
1 parent d03bb04 commit 1654c42

5 files changed

Lines changed: 72 additions & 10 deletions

File tree

.github/workflows/integration_tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ jobs:
166166

167167
# TODO: revisit when https://github.com/SocketDev/sfw-free/issues/30 is resolved.
168168
- name: Pre-install reflex-docs git dependencies (outside sfw)
169-
working-directory: ./reflex/docs/app
169+
working-directory: ./docs/app
170170
run: |
171171
# Replace reflex-dev/reflex git deps with plain package names (PR version is pre-installed)
172172
sed -i -E 's|"([a-zA-Z0-9_-]+)\s*@\s*git\+https://github\.com/reflex-dev/reflex@[^"]*"|"\1"|g' pyproject.toml
@@ -179,7 +179,7 @@ jobs:
179179
uv pip install --no-deps -r git-requirements.txt
180180
fi
181181
- name: Compile and install reflex-docs requirements (scanned by Socket.dev)
182-
working-directory: ./reflex/docs/app
182+
working-directory: ./docs/app
183183
run: |
184184
sfw uv pip compile pyproject.toml --no-annotate --no-header --no-deps --output-file requirements.txt
185185
uv pip list --format=json | jq -r '"^" + .[].name + "[ =]"' > installed_patterns.txt
@@ -196,13 +196,13 @@ jobs:
196196
echo "Installed reflex version: $installed_version"
197197
[[ "$installed_version" == *"+$expected_sha" ]]
198198
- name: Init Website for reflex-docs
199-
working-directory: ./reflex/docs/app
199+
working-directory: ./docs/app
200200
run: uv run --active --no-sync reflex init
201201
- name: Run Website and Check for errors
202202
run: |
203203
# Verify sfw wrappers are on PATH
204204
which npm && npm -v
205-
uv run --active --no-sync bash scripts/integration.sh ./reflex/docs/app prod
205+
uv run --active --no-sync bash scripts/integration.sh ./docs/app prod
206206
207207
- name: Upload Socket.dev Firewall report
208208
if: always()
@@ -262,20 +262,20 @@ jobs:
262262
run-uv-sync: true
263263

264264
- name: Install reflex-docs dependencies
265-
working-directory: ./reflex/docs/app
265+
working-directory: ./docs/app
266266
run: |
267267
uv pip compile pyproject.toml --no-annotate --no-header --no-deps --output-file requirements.txt
268268
uv pip list --format=json | jq -r '"^" + .[].name + "[ =]"' > installed_patterns.txt
269269
grep -ivf installed_patterns.txt requirements.txt > requirements.txt.tmp && mv requirements.txt.tmp requirements.txt
270270
rm installed_patterns.txt
271271
- name: Install Requirements for reflex-docs
272-
working-directory: ./reflex/docs/app
272+
working-directory: ./docs/app
273273
run: uv pip install -r requirements.txt
274274
- name: Init Website for reflex-docs
275-
working-directory: ./reflex/docs/app
275+
working-directory: ./docs/app
276276
run: uv run --active --no-sync reflex init
277277
- name: Run Website and Check for errors
278278
run: |
279279
# Check that npm is home
280280
npm -v
281-
uv run --active --no-sync bash scripts/integration.sh ./reflex/docs/app prod
281+
uv run --active --no-sync bash scripts/integration.sh ./docs/app prod

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ jobs:
3434
fetch-tags: true
3535
fetch-depth: 0
3636
- run: uv run pre-commit run --all-files --show-diff-on-failure
37+
- name: Run docs app pre-commit
38+
working-directory: ./docs/app
39+
run: uv run pre-commit run --all-files --show-diff-on-failure

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ reflex.db
2020
.env.*
2121
node_modules
2222
package-lock.json
23-
*.pyi
24-
.pre-commit-config.yaml
23+
*.pyi

.pre-commit-config.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
fail_fast: true
2+
repos:
3+
- hooks:
4+
- args:
5+
- reflex
6+
- tests
7+
id: ruff-format
8+
- args:
9+
- --fix
10+
- --exit-non-zero-on-fix
11+
exclude: ^(integration/benchmarks/|docs/)
12+
id: ruff-check
13+
repo: https://github.com/astral-sh/ruff-pre-commit
14+
rev: v0.15.6
15+
- hooks:
16+
- additional_dependencies:
17+
- tomli
18+
args:
19+
- reflex
20+
id: codespell
21+
repo: https://github.com/codespell-project/codespell
22+
rev: v2.4.1
23+
- hooks:
24+
- always_run: true
25+
description: Update pyi files as needed
26+
entry: python3 scripts/make_pyi.py
27+
id: update-pyi-files
28+
language: system
29+
name: update-pyi-files
30+
require_serial: true
31+
repo: local
32+
- hooks:
33+
- args:
34+
- reflex
35+
- tests
36+
id: pyright
37+
language: system
38+
repo: https://github.com/RobertCraigie/pyright-python
39+
rev: v1.1.408
40+
- hooks:
41+
- additional_dependencies:
42+
- '@biomejs/biome@2.4.8'
43+
args:
44+
- --indent-width
45+
- '2'
46+
- --indent-style
47+
- space
48+
id: biome-format
49+
repo: https://github.com/biomejs/pre-commit
50+
rev: v0.6.1

docs/app/.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
fail_fast: true
2+
3+
repos:
4+
- repo: https://github.com/charliermarsh/ruff-pre-commit
5+
rev: v0.14.0
6+
hooks:
7+
- id: ruff-format
8+
args: ["--config", "docs/app/ruff.toml"]
9+
- id: ruff-check
10+
args: ["--config", "docs/app/ruff.toml", "--fix", "--exit-non-zero-on-fix", "--no-unsafe-fixes"]

0 commit comments

Comments
 (0)