-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
43 lines (37 loc) · 1.43 KB
/
Taskfile.yml
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
version: '3'
tasks:
clean:
desc: clean up
cmds:
- find . -type d -name .pytest_cache -exec rm -rf {} \; || true
- find . -type d -name __pycache__ -exec rm -rf {} \; || true
- find . -type d -name .ten -exec rm -rf {} \; || true
- find . -name .coverage -exec rm -f {} \; || true
test:
desc: run tests
cmds:
- task: test-standalone
- task: test-template
test-standalone:
desc: run standalone testing
cmds:
- ./tests/bin/start {{ .CLI_ARGS }}
test-template:
desc: run testing with publish and create by template
cmds:
- tman -c tests/local-config.json --verbose publish
- rm -rf ./tmp && mkdir -p tmp/
- cd tmp && tman -c ../tests/local-config.json --verbose create extension hello_world --template default_async_llm_extension_python --template-data class_name_prefix=HelloWorld
- cd tmp/hello_world && tman install --standalone
- cd tmp/hello_world && tests/bin/start {{ .CLI_ARGS }}
install:
desc: install dependencies
cmds:
- tman install --standalone
- pip install -r requirements.txt
lint:
desc: lint codes
env:
PYTHONPATH: "{{.USER_WORKING_DIR}}/.ten/app/ten_packages/system/ten_runtime_python/lib:{{.USER_WORKING_DIR}}/.ten/app/ten_packages/system/ten_runtime_python/interface:{{.USER_WORKING_DIR}}/.ten/app/ten_packages/system/ten_ai_base/interface"
cmds:
- pylint ./*.py {{ .CLI_ARGS }}