Skip to content

Commit f6f90ec

Browse files
committed
fix: simplify ui's handling of requirements.txt by pre-generating it
We had been attempting to generate it for every ui developer. A hassle for them, bug prone (since we were caching a venv, and caching is hard), and hard to get stable in github action automation (especially windows). For example, the prior setup required that CI machines have python, even just to build an app bundle. With this change, that is no longer a requirement. Python is only needed if you want to Run pdl programs. Signed-off-by: Nick Mitchell <[email protected]>
1 parent 0a18463 commit f6f90ec

File tree

5 files changed

+71
-25
lines changed

5 files changed

+71
-25
lines changed

.github/workflows/pdl-live-react-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ jobs:
3535
- name: Test pdl-live viewer
3636
run: npm test
3737
- name: Test production build
38-
run: npm run prod:linux
38+
run: npm run tauri build
3939
- name: Setup xvfb for screen 0
4040
run: Xvfb :1 -screen 0 1600x1200x24 &
4141
- name: Run production build
4242
env:
4343
DISPLAY: :1
44-
run: ./src-tauri/target/x86_64-unknown-linux-gnu/release/PDL notacommand || true
44+
run: ./src-tauri/target/release/pdl run | grep Usage
4545
- name: Tear down xvfb
4646
run: killall Xvfb

.github/workflows/release-ui.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ jobs:
3232
steps:
3333
- uses: actions/checkout@v4
3434

35-
- name: Set up Python 3.12
36-
uses: actions/setup-python@v5
37-
with:
38-
python-version: 3.12
39-
4035
- name: setup node
4136
uses: actions/setup-node@v4
4237
with:
@@ -68,13 +63,6 @@ jobs:
6863
- name: install frontend dependencies
6964
run: npm ci # change this to npm, pnpm or bun depending on which one you use.
7065

71-
- name: prep interpreter
72-
if: matrix.platform != 'windows-latest'
73-
run: npm run prep-interpreter-from-scratch
74-
- name: prep interpreter for windows
75-
if: matrix.platform == 'windows-latest'
76-
run: npm run prep-interpreter-from-scratch-windows
77-
7866
- name: Install wget for Windows
7967
if: matrix.platform == 'windows-latest'
8068
run: choco install wget --no-progress

pdl-live-react/package.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
"scripts": {
77
"prod:mac:1": "npm run tauri build -- --no-bundle --target=universal-apple-darwin",
88
"prod:mac:2": "npm run tauri bundle -- --bundles dmg --target universal-apple-darwin",
9-
"prod:linux:1": "npm run tauri build -- --no-bundle --target=x86_64-unknown-linux-gnu",
10-
"prod:linux:2": "npm run tauri bundle -- --bundles deb --target x86_64-unknown-linux-gnu",
11-
"prod:mac": "npm run prep-interpreter && npm run prod:mac:1 && npm run prod:mac:2",
12-
"prod:linux": "npm run prep-interpreter && npm run prod:linux:1 && npm run prod:linux:2",
9+
"prod:mac": "npm run prod:mac:1 && npm run prod:mac:2",
1310
"dev": "vite",
1411
"build": "tsc && vite build",
1512
"lint": "eslint .",
@@ -21,12 +18,8 @@
2118
"test": "concurrently -n 'quality,playwright' 'npm run test:quality' 'npm run test:ui'",
2219
"pdl": "./src-tauri/target/debug/PDL",
2320
"view": "npm run pdl view",
24-
"prep-interpreter": "if [ ! -d .venv ]; then npm run prep-interpreter-from-scratch; fi",
25-
"prep-interpreter-from-scratch": "python3.12 -mvenv .venv && npm run reprep-interpreter",
26-
"prep-interpreter-from-scratch-windows": "python -mvenv .venv && npm run reprep-interpreter-windows",
27-
"reprep-interpreter": ". .venv/bin/activate && pip install -e .. && pip freeze > .venv/requirements.txt",
28-
"reprep-interpreter-windows": ".\\.venv\\Scripts\\Activate.ps1 ; pip install -e .. ; pip freeze > .venv\\requirements.txt",
29-
"start": "npm run prep-interpreter && npm run tauri dev"
21+
"prep-interpreter": "python3.12 -mvenv .venv && . .venv/bin/activate && pip install -e .. && pip freeze > requirements.txt",
22+
"start": "npm run tauri dev"
3023
},
3124
"dependencies": {
3225
"@patternfly/react-core": "^6.1.0",

pdl-live-react/requirements.txt

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
aiohappyeyeballs==2.4.6
2+
aiohttp==3.11.13
3+
aiosignal==1.3.2
4+
alchemy-config==1.1.3
5+
annotated-types==0.7.0
6+
anyio==4.8.0
7+
asttokens==3.0.0
8+
attrs==25.1.0
9+
certifi==2025.1.31
10+
charset-normalizer==3.4.1
11+
click==8.1.8
12+
decorator==5.2.1
13+
distro==1.9.0
14+
executing==2.2.0
15+
filelock==3.17.0
16+
frozenlist==1.5.0
17+
fsspec==2025.2.0
18+
granite-io==0.1.0
19+
h11==0.14.0
20+
httpcore==1.0.7
21+
httpx==0.28.1
22+
huggingface-hub==0.29.1
23+
idna==3.10
24+
importlib_metadata==8.6.1
25+
ipython==8.33.0
26+
jedi==0.19.2
27+
Jinja2==3.1.5
28+
jiter==0.8.2
29+
json_repair==0.39.1
30+
jsonschema==4.23.0
31+
jsonschema-specifications==2024.10.1
32+
litellm==1.61.20
33+
MarkupSafe==3.0.2
34+
matplotlib-inline==0.1.7
35+
multidict==6.1.0
36+
openai==1.65.2
37+
packaging==24.2
38+
parso==0.8.4
39+
pexpect==4.9.0
40+
-e git+ssh://[email protected]/IBM/[email protected]#egg=prompt_declaration_language
41+
prompt_toolkit==3.0.50
42+
propcache==0.3.0
43+
ptyprocess==0.7.0
44+
pure_eval==0.2.3
45+
pydantic==2.10.6
46+
pydantic_core==2.27.2
47+
Pygments==2.19.1
48+
python-dotenv==1.0.1
49+
PyYAML==6.0.2
50+
referencing==0.36.2
51+
regex==2024.11.6
52+
requests==2.32.3
53+
rpds-py==0.23.1
54+
sniffio==1.3.1
55+
stack-data==0.6.3
56+
termcolor==2.5.0
57+
tiktoken==0.9.0
58+
tokenizers==0.21.0
59+
tqdm==4.67.1
60+
traitlets==5.14.3
61+
typing_extensions==4.12.2
62+
urllib3==2.3.0
63+
wcwidth==0.2.13
64+
yarl==1.18.3
65+
zipp==3.21.0

pdl-live-react/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"active": true,
6060
"targets": "all",
6161
"resources": {
62-
"../.venv/requirements.txt": "interpreter/requirements.txt"
62+
"../requirements.txt": "interpreter/requirements.txt"
6363
},
6464
"icon": [
6565
"icons/32x32.png",

0 commit comments

Comments
 (0)