nismod / open-gira

Open-data Global Infrastructure Risk/Resilience Analysis
https://nismod.github.io/open-gira/
MIT License
12 stars 3 forks source link

Power/storms scripts should take filepaths as arguments #103

Closed thomas-fred closed 1 year ago

thomas-fred commented 2 years ago

File location logic is encoded in the snakemake rules for the power/storms workflow, this allows snakemake to assemble the DAG and check where prior work can be reused. However, the majority of scripts in the power/storms workflow make similar assumptions about file paths. This means the file naming/location schemes are implemented twice. There is frequently workflow-type logic within the scripts.

This is not fully utilising the power of snakemake, is not DRY and makes it difficult to infer what the workflow is doing without reading scripts in detail.

I suggest that scripts should be modified to take the snakemake rule inputs as arguments and operate only using these paths.

tomalrussell commented 1 year ago

Some progress from #117, at least in preprocessing steps

thomas-fred commented 1 year ago

Getting there after #123. Once we have damages reworked, close this issue?