-
Notifications
You must be signed in to change notification settings - Fork 0
/
dodo.py
51 lines (33 loc) · 1.24 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from pathlib import Path
import doit
# from doit.tools import Interactive, LongRunning
BASE_DIR = Path(__file__).absolute().parent
DOIT_CONFIG = {
"default_tasks": [""],
"backend": "sqlite3",
"action_string_formatting": "new",
"verbosity": 2,
}
def action(param_name, postitional_argument_list):
pass
def task_name():
"""Doc"""
return {
# "task_dep": [], # strings of task names, without the task_
# "file_dep": [], # can't be a generator
"actions": [action, "ls {param_name}"],
'pos_arg': 'postitional_argument_list',
"params": [{"name": "param_name", "default": "default value", "long": "long-option-name", "short": "-s", "type": str, "inverse": "no-param"}], # also: choices, help
# "getargs": { # get values from previous task returned as a dict passed to current task as an argument
# "argument_name": ("action_returning_dict", "key_returned"),
# },
# "targets": [],
# "verbosity": 2,
}
def task_lock_deps():
return {
"actions": [
"pip-compile -o requirements.txt pyproject.toml",
"pip-compile --extra dev -o dev-requirements.txt pyproject.toml",
],
}