-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
175 lines (139 loc) · 3.83 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# https://taskfile.dev
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
tasks:
# Documents
build_book_ja:
cmds:
- jupyter-book build docs/ja
build_book_ja_all:
cmds:
- jupyter-book build docs/ja --all
open_book_ja:
cmds:
- python -m webbrowser file:///$(pwd)/docs/ja/_build/html/index.html
book_ja:
cmds:
- task: build_book_ja
- task: open_book_ja
book_ja_all:
cmds:
- task: build_book_ja_all
- task: open_book_ja
watch_build_book_ja:
cmds:
- fswatch -o docs/ja/**/*.ipynb | xargs -n1 -I{} jupyter-book build docs/ja
build_book_en:
cmds:
- jupyter-book build docs/en
build_book_en_all:
cmds:
- jupyter-book build docs/en --all
open_book_en:
cmds:
- python -m webbrowser file:///$(pwd)/docs/en/_build/html/index.html
book_en:
cmds:
- task: build_book_en
- task: open_book_en
book_en_all:
cmds:
- task: build_book_en_all
- task: open_book_en
watch_build_book_en:
cmds:
- fswatch -o docs/en/**/*.ipynb | xargs -n1 -I{} jupyter-book build docs/en
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]"
install:
cmds:
- task: install_python_sdk
- task: install_pyscipopt_adapter
- task: install_openjij_adapter
# Skip because Python-MIP is not available on macOS
# - task: install_python_mip_adapter
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: docs/