Hi,
thanks for this great tool.
import json
def task_read():
def read():
with open('data.txt') as json_file:
data = json.load(json_file)
return data
return {
'file_dep': ['data.txt'],
'actions': [(read,)],
'verbosity': 2,
}
def show_getargs(x, y):
print("this is x: {}".format(x))
print("this is y: {}".format(y))
def task_use_python():
return {
'actions': [show_getargs],
'getargs': {'x': ('read', 'x'),
'y': ('read', 'y')},
'verbosity': 2,
}
user@machine-> cat data.txt
{
"a": 1,
"x": 2,
"y": 3,
"z": 4
}
user@machine-> doit
. read
. use_python
this is x: 2
this is y: 3
--> This is OK.
user@machine-> sed -i 's/2/12/g' data.txt
user@machine-> doit
. read
. use_python
this is x: 12
this is y: 3
--> This is OK.
user@machine-> sed -i 's/3/13/g' data.txt
user@machine-> doit use_python
-- use_python
IMHO this is not OK since the read task should be fired up. I expected the following output
user@machine-> doit use_python
. read
. use_python
this is x: 12
this is y: 13
Best Regards,
Henrik
Environment
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too