-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdodo.py
31 lines (24 loc) · 936 Bytes
/
dodo.py
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
"""
doit task/build automation
"""
import os
from doit.tools import create_folder
from lattice import Lattice
data_model = Lattice()
def task_validate_example_files():
"""Validates the example files against the JSON schema (and other validation steps)"""
return {
"file_dep": data_model.examples
+ [schema.path for schema in data_model.schemas],
"actions": [(data_model.validate_example_files, [])],
}
def task_generate_cpp_code():
"""Generate CPP headers and source for example schema."""
return {
"file_dep": [schema.path for schema in data_model.cpp_schemas]
+ [schema.meta_schema_path for schema in data_model.schemas],
"targets": [schema.cpp_header_path for schema in data_model.cpp_schemas]
+ [schema.cpp_source_path for schema in data_model.cpp_schemas],
"actions": [(data_model.generate_cpp_project, [[]])],
"clean": True,
}