alan-turing-institute / uatk-spc

Synthetic Population Catalyst
https://alan-turing-institute.github.io/uatk-spc/
MIT License
20 stars 12 forks source link

Run on multiple files at once? #26

Closed nickmalleson closed 2 years ago

nickmalleson commented 2 years ago

More of a feature request possibly. Is it possible to iterate over a number of different areas/files in one command? If not it's no bother really, trivial to repeatedly run the program using a bash for loop

dabreegster commented 2 years ago

It's not. I would vote against complicating the command-line arguments to support this, since you can just call it in a loop. https://github.com/alan-turing-institute/uatk-spc/blob/37901a95dfb26feb41d5ac84ce7f8b58d84bce4e/scripts/collect_stats.py#L15 is an example of running it in a loop. Maybe we could just add an example command to https://github.com/alan-turing-institute/uatk-spc/blob/37901a95dfb26feb41d5ac84ce7f8b58d84bce4e/scripts/collect_stats.py#L15 or similar... for name in area1 area2 area3; do cargo run --release -- config/${name}.txt; done or so

nickmalleson commented 2 years ago

👍 I'll write an example of a for loop in the docs and add it to https://github.com/alan-turing-institute/uatk-spc/pull/28 .