Open BoPeng opened 4 years ago
[10]
output: dynamic('A.bak')
_output.touch()
[20]
input: 'A.bak'
depends: sos_step(10)
output: 'B.txt'
_output.touch()
At least in this case, the behavior is incorrect for dynamic
used for output:
.
Edit: this is not a valid case because _output
cannot be used with dynamic()
.
[10]
output: dynamic('*.bak')
path('A.bak').touch()
[20]
input: 'A.bak'
depends: sos_step(10)
output: 'B.txt'
_output.touch()
works due to sos_step(10)
.
import time
[10]
output: dynamic('*.bak')
time.sleep(5)
path('A.bak').touch()
[20]
input: 'A.bak'
output: 'B.txt'
_output.touch()
does not work because sos will try to execute 20
while 10
is still running.
Using dynamic('A.bak') for step 20 solves the problem but not sure if this is the best approach.
import time
[10]
output: dynamic('*.bak')
time.sleep(5)
path('A.bak').touch()
[20]
input: dynamic('A.bak')
output: 'B.txt'
_output.touch()
input: dynamic(mnm_high_het_input_files) , group_by = 3,
Just quote a case that may be it is not a good idea to remove targets that does not exist from dynamic
because it will mess up the grouping of inputs.
Right now we allow for
and we resolve them to
and the returned target might not be invalid (e.g.
a.txt
does not exist).For the handling of
-e ignore
(or some other scenario), perhaps it makes sense to resolve it always asthat is to say
*.txt
, we allow for match nothing through pattern match.a.txt
, we also "match" it, so it returns[]
ifa.txt
does not exist.