-
Notifications
You must be signed in to change notification settings - Fork 125
/
Copy pathJustfile
87 lines (63 loc) · 2.35 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
set dotenv-load
set positional-arguments
PARLANT_HOME := "./parlant-data"
LOGS_DIR := "./logs"
SERVER_ADDRESS := env("SERVER_ADDRESS", "http://localhost:8800")
@unknown:
echo "Please specify a command"
setup-cache:
mkdir -p {{PARLANT_HOME}}
setup-logdir:
mkdir -p {{LOGS_DIR}}
@server *args: setup-cache
PARLANT_HOME={{PARLANT_HOME}} poetry run parlant-server {{args}}
@client *args='':
poetry run parlant -s {{SERVER_ADDRESS}} "$@"
@chat *args='':
poetry run parlant -s {{SERVER_ADDRESS}} agent chat "$@"
@kill-server:
lsof -i:8800 | grep :8800 | cut -d " " -f 3 | xargs kill && echo "KILLED" || echo "NOT KILLED"
@kill-test-server:
lsof -i:8089 | grep :8089 | cut -d " " -f 3 | xargs kill && echo "KILLED" || echo "NOT KILLED"
@kill-test-plugin-server:
lsof -i:8091 | grep :8091 | cut -d " " -f 3 | xargs kill && echo "KILLED" || echo "NOT KILLED"
lsof -i:8092 | grep :8092 | cut -d " " -f 3 | xargs kill && echo "KILLED" || echo "NOT KILLED"
@kill: kill-test-plugin-server kill-test-server
echo "killed"
@test-deterministic *specs='': setup-logdir
mkdir -p logs/deterministic
poetry run pytest \
-vv {{specs}} --plan=deterministic --no-cache \
--tap-combined --tap-outdir=logs/deterministic \
--timing-file=logs/deterministic/test_timings.csv \
--junit-xml=logs/deterministic/testresults.xml \
--color=auto
@test-core-stable *specs='': setup-logdir
mkdir -p logs/core_stable
poetry run pytest \
-vv {{specs}} --plan=core_stable --no-cache \
--tap-combined --tap-outdir=logs/core_stable \
--timing-file=logs/core_stable/test_timings.csv \
--junit-xml=logs/core_stable/testresults.xml \
--color=auto
@test-core-unstable *specs='': setup-logdir
mkdir -p logs/core_unstable
poetry run pytest \
-vv {{specs}} --plan=core_unstable --no-cache \
--tap-combined --tap-outdir=logs/core_unstable \
--timing-file=logs/core_unstable/test_timings.csv \
--junit-xml=logs/core_unstable/testresults.xml \
--color=auto
test-complete *specs='':
just test-deterministic {{specs}}
just test-core-stable {{specs}}
just test-core-unstable {{specs}}
@install:
clear
poetry lock --no-update
poetry install --all-extras
@run: install server
@regen-sdk:
python scripts/generate_client_sdk.py
@clean:
find . -type d | grep __pycache__ | xargs rm -rf