/
pre_render.py
30 lines (20 loc) · 1014 Bytes
/
pre_render.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
"""
__ __ __
____/ /___ ______ ___ / /__ ____ ___ ___ ____ / /_
/ __ / __ `/ ___/ / _ \/ / _ \/ __ `__ \/ _ \/ __ \/ __/
/ /_/ / /_/ (__ ) / __/ / __/ / / / / / __/ / / / /_
\__,_/\__,_/____/ \___/_/\___/_/ /_/ /_/\___/_/ /_/\__/
Example file if you use some custom dependency in your submission scripts.
To resolve a path pattern like <custom.dependecy> you need to add some value for the custom data.
If that is not provided the resolve would otherwise fail if you re-render the proxies and there is no main task to provide the depdency.
"""
import sys
def main(*args):
data = args[0]
# make sure to set some value for the dependency.
# otherwise it will fail when resolving the path pattern '<custom.dependency>'
if not data.get('template_values', {}).get('custom'):
data['template_values']['custom'] = {'dependency': ''}
return data
if __name__ == '__main__':
main(sys.argv[1:])