File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 1+ services :
2+ template :
3+ build :
4+ context : .
5+ dockerfile : Dockerfile
6+ volumes :
7+ - ./src:/src
8+ - ./in:/in
9+ - ./out:/out
10+ environment :
11+ - TOOL_RUN=foobar
12+ command : python run.py
Original file line number Diff line number Diff line change 11import os
22from datetime import datetime as dt
3- from pprint import pprint
43
54from json2args import get_parameter
65from json2args .data import get_data
6+ from json2args .logger import logger
77
88# parse parameters
99kwargs = get_parameter ()
1515# switch the tool
1616if toolname == 'foobar' :
1717 # RUN the tool here and create the output in /out
18- print ('This toolbox does not include any tool. Did you run the template?\n ' )
18+ logger . info ('This toolbox does not include any tool. Did you run the template?\n ' )
1919
2020 # write parameters to STDOUT.log
21- pprint (kwargs )
21+ logger . info (kwargs )
2222
2323 for name , ds in data .items ():
24- print (f"\n ### { name } " )
25- print (ds )
24+ logger . info (f"\n ### { name } " )
25+ logger . info (ds )
2626
2727
2828# In any other case, it was not clear which tool to run
2929else :
30- raise AttributeError (f"[{ dt .now ().isocalendar ()} ] Either no TOOL_RUN environment variable available, or '{ toolname } ' is not valid.\n " )
30+ raise AttributeError (f"[{ dt .now ().isocalendar ()} ] Either no TOOL_RUN environment variable available, or '{ toolname } ' is not valid.\n " )
You can’t perform that action at this time.
0 commit comments