Skip to content

Commit 5e62529

Browse files
committed
Merge remote-tracking branch 'upstream/main' into demo
2 parents 851b5c4 + 2ba92d7 commit 5e62529

File tree

22 files changed

+512
-278
lines changed

22 files changed

+512
-278
lines changed

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

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,11 @@ jobs:
2424
uses: actions/setup-node@v4
2525
with:
2626
node-version: 22
27-
- name: Install Linux dependencies
28-
# only if we ever add a drawer menu libappindicator3-dev
29-
# re: at-spi2-core, Warning **: Error retrieving accessibility bus address:
30-
run: sudo apt update && sudo apt install -y libgtk-3-dev libwebkit2gtk-4.1-dev librsvg2-dev patchelf at-spi2-core
31-
- name: Install NodeJs dependencies
32-
run: npm ci
27+
- name: Install dependencies
28+
run: |
29+
npm ci & sudo apt update && sudo apt install -y libgtk-3-dev libwebkit2gtk-4.1-dev librsvg2-dev patchelf at-spi2-core
30+
wait
3331
- name: Install Playwright Browsers
3432
run: npx playwright install --with-deps
3533
- name: Test pdl-live viewer
3634
run: npm test
37-
- name: Test production build
38-
run: npm run tauri build
39-
- name: Setup xvfb for screen 0
40-
run: Xvfb :1 -screen 0 1600x1200x24 &
41-
- name: Run production build
42-
env:
43-
DISPLAY: :1
44-
run: ./src-tauri/target/release/pdl run | grep Usage
45-
- name: Tear down xvfb
46-
run: killall Xvfb

.github/workflows/tauri-cli.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Tauri CLI Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
# cancel any prior runs for this workflow and this PR (or branch)
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
cli:
16+
name: Test pdl CLI using Tauri
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
working-directory: ./pdl-live-react
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
- name: Install dependencies
28+
# sleep 2 to wait for ollama to be running... hack warning
29+
run: |
30+
npm ci & sudo apt update && \
31+
sudo apt install -y libgtk-3-dev libwebkit2gtk-4.1-dev librsvg2-dev patchelf at-spi2-core && \
32+
(curl -fsSL https://ollama.com/install.sh | sudo -E sh && sleep 2)
33+
wait
34+
- name: Test production build
35+
run: npm run tauri build -- --bundles deb # Skip testing appimage, is this dangerous? It's slow...
36+
- name: Setup xvfb for screen 0
37+
run: Xvfb :1 -screen 0 1600x1200x24 &
38+
39+
- name: Run production build
40+
env:
41+
DISPLAY: :1
42+
run: |
43+
PATH=./src-tauri/target/release/:$PATH
44+
45+
# 1. `run` subcommand works without any arguments
46+
pdl run | grep Usage
47+
48+
# 2. `run` subcommand works with UI demos (yaml source)
49+
pdl run ./demos/demo1.pdl | grep 'write a hello'
50+
51+
# 3. `run` subcommand works with UI demos (json source)
52+
# demo8 uses a private model? not sure
53+
for i in ./src/demos/*.json
54+
do if [[ $(basename $i) != "demo8.json" ]]; then pdl run $i; fi
55+
done
56+
57+
- name: Tear down xvfb
58+
run: killall Xvfb

pdl-live-react/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
"test:ui": "playwright install --with-deps && playwright test",
1717
"types": "(cd .. && python -m src.pdl.pdl --schema > src/pdl/pdl-schema.json) && json2ts ../src/pdl/pdl-schema.json src/pdl_ast.d.ts --unreachableDefinitions && npm run format",
1818
"test": "concurrently -n 'quality,playwright' 'npm run test:quality' 'npm run test:ui'",
19-
"pdl": "./src-tauri/target/debug/PDL",
19+
"pdl": "./src-tauri/target/debug/pdl",
2020
"view": "npm run pdl view",
21-
"prep-interpreter": "python3.12 -mvenv .venv && . .venv/bin/activate && pip install -e .. && pip freeze > requirements.txt",
2221
"start": "npm run tauri dev"
2322
},
2423
"dependencies": {

pdl-live-react/requirements.txt

Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,2 @@
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==9.0.1
26-
jedi==0.19.2
27-
Jinja2==3.1.6
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/prompt-declaration-language.git#egg=prompt_declaration_language
41-
prompt-declaration-language==0.4.1
42-
prompt_toolkit==3.0.50
43-
propcache==0.3.0
44-
ptyprocess==0.7.0
45-
pure_eval==0.2.3
46-
pydantic==2.10.6
47-
pydantic_core==2.27.2
48-
Pygments==2.19.1
49-
python-dotenv==1.0.1
50-
PyYAML==6.0.2
51-
referencing==0.36.2
52-
regex==2024.11.6
53-
requests==2.32.3
54-
rpds-py==0.23.1
55-
sniffio==1.3.1
56-
stack-data==0.6.3
57-
termcolor==2.5.0
58-
tiktoken==0.9.0
59-
tokenizers==0.21.0
60-
tqdm==4.67.1
61-
traitlets==5.14.3
62-
typing_extensions==4.12.2
63-
urllib3==2.3.0
64-
wcwidth==0.2.13
65-
yarl==1.18.3
66-
zipp==3.21.0
1+
-e git+https://github.com/IBM/prompt-declaration-language.git#egg=prompt_declaration_language
2+
#prompt-declaration-language==0.4.1

0 commit comments

Comments
 (0)