-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
141 lines (112 loc) · 3.04 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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# https://taskfile.dev
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
tasks:
# Documents
build_book:
cmds:
- jupyter-book build doc
build_book_all:
cmds:
- jupyter-book build doc --all
open_book:
cmds:
- python -m webbrowser file:///$(pwd)/doc/_build/html/index.html
book:
cmds:
- task: build_book
- task: open_book
book_all:
cmds:
- task: build_book_all
- task: open_book
watch_build_book:
cmds:
- fswatch -o doc/**/*.ipynb | xargs -n1 -I{} jupyter-book build doc
doc_rust:
cmds:
- cargo doc --no-deps -p ommx
doc_rust_open:
cmds:
- cargo doc --no-deps --open -p ommx
# Protocol Buffers
protogen:
cmds:
- task: protogen_python
- task: protogen_rust
protogen_python:
cmds:
- task: buf_generate_python
- task: format_python
protogen_rust:
cmds:
- cargo run --bin protogen
buf_generate_python:
cmds:
- buf generate --template buf.gen.python.yaml
dir: proto
# Python
install_python_sdk:
cmds:
- pip install -ve "python/ommx[dev]"
install_python_mip_adapter:
cmds:
- pip install -ve "python/ommx-python-mip-adapter[dev]"
install_pyscipopt_adapter:
cmds:
- pip install -ve "python/ommx-pyscipopt-adapter[dev]"
install_openjij_adapter:
cmds:
- pip install -ve "python/ommx-openjij-adapter[dev]"
format_python:
cmds:
- ruff format
test_python:
cmds:
- task: test_python_sdk
- task: test_python_mip_adapter
- task: test_pyscipopt_adapter
- task: test_openjij_adapter
test_python_sdk:
cmds:
- pytest -vv --doctest-modules python/ommx/
- pyright python/ommx/
test_python_mip_adapter:
cmds:
- pytest -vv --doctest-modules python/ommx-python-mip-adapter/
- markdown-code-runner python/ommx-python-mip-adapter/README.md
- pyright python/ommx-python-mip-adapter/
test_pyscipopt_adapter:
cmds:
- pytest -vv --doctest-modules python/ommx-pyscipopt-adapter/
- markdown-code-runner python/ommx-pyscipopt-adapter/README.md
- pyright python/ommx-pyscipopt-adapter/
test_openjij_adapter:
cmds:
- pytest -vv --doctest-modules python/ommx-openjij-adapter/
- pyright python/ommx-openjij-adapter/
doc_python:
cmds:
- task: doc_python_sdk
- task: doc_python_mip_adapter
doc_python_sdk:
cmds:
- sphinx-build -b html source build
dir: python/ommx/docs
doc_python_mip_adapter:
cmds:
- sphinx-build -b html source build
dir: python/ommx-python-mip-adapter/docs
open_doc_python_sdk:
cmds:
- python -m webbrowser file:///$(pwd)/python/ommx/docs/build/index.html
open_doc_python_mip_adapter:
cmds:
- python -m webbrowser file:///$(pwd)/python/ommx-python-mip-adapter/docs/build/index.html
stubgen:
cmds:
- cargo run --bin stub_gen --features=stub_gen
pip_compile:
cmds:
- uv pip compile pyproject.toml -o ../requirements.txt
dir: doc/