/
notes.txt
85 lines (54 loc) · 2.2 KB
/
notes.txt
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
Testing checklist:
- run wizard
- create config from scratch to preview
- load and edit config: add, rm, edit, preview
pipenv install -e git+https://github.com/binarymachines/mercury#egg=mercury
Adding new utils to mkcfg
To enable a new configuration target:
(1)
- look up the named target-package dictionary in configtargets.py:targets{}
- it should have the same name as the target utility
- top-level fields are "description", "template", "loader", "config_object_types"
- "loader" must be a valid function in configtargets.py which takes a yaml_config (text-based dictionary from a loaded YAML file)
and returns a live config (a dictionary of metaobjects).
- "template" must be a valid jinja2 template string (defined in configtemplates.py)
- "config_object_types" is an array of dictionaries, one per relevant metaobject (or metaobject collection, in the case of globals).
(2)
# Each dictionary must have:
'name': the name of the configuration section as it appears in the YAML config
'singular_label': how we refer to a single instance of the config object in the app
'plural_label': how we refer to multiple instances of the config object in the app
'index_attribute': the config object attribute we use to find one in a list
'find_func': the function we use to find a config object by its index attribute
'create_func': the function used to create a config object
'update_func': the function used to edit a config object
'list_func': the function used to generate a list of this config object for in-app display
(3)
# Make sure there are "spec" objects in metaobjects.py which match the internal structure of the configuration
# Each spec object should have a data() method which returns a dictionary of attributes (NOTE: Do we really need this?)
(4)
# Write the functions (in configtargets.py) referred to by the relevant config target(s)
(5)
# For each new function in configtargets, create the correct sequence dictionary in uisequences.py
AND
verify that the jinja2 template in configtemplates.py is correct
test list:
xfile
ngst
quasr
j2sqlgen
j2spectrum
profilr
pgexec
pgmeta
rsexec
rsexport
s3-gettbl
dfproc
cyclops
eavesdroppr
bqexport
bqexport-view
bqstream-dl
bqviewtblcreate
viewtblcreate