Skip to content

Commit

Permalink
Add -o option to unzip calls
Browse files Browse the repository at this point in the history
  • Loading branch information
brynpickering committed Aug 2, 2024
1 parent 0f86694 commit 8f83e94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
* **UPDATE** dropped support for Intel macOS. The workflow may still run on Intel macOS, but we do not actively maintain support (#369).
* **UPDATE** link to GADM data following changes upstream (#376).
* **UPDATE** link to NUTS data to allow for different NUTS years (#380, #382).
* **UPDATE** unzip command to always overwrite existing data if it is called (#327).

### Fixed (models)

Expand Down
4 changes: 2 additions & 2 deletions rules/hydro.smk
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ rule basins_database:
output: "build/data/basins/hybas_eu_lev07_v1c.shp"
conda: "../envs/shell.yaml"
localrule: True
shell: "unzip {input} -d ./build/data/basins/"
shell: "unzip -o {input} -d ./build/data/basins/"


rule stations_database:
Expand All @@ -79,7 +79,7 @@ rule stations_database:
localrule: True
shell:
"""
unzip -j {input} "**/jrc-hydro-power-plant-database.csv" -d build/data/
unzip -o -j {input} "**/jrc-hydro-power-plant-database.csv" -d build/data/
"""


Expand Down
2 changes: 1 addition & 1 deletion rules/jrc-idees.smk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rule jrc_idees_unzipped:
sector = "industry|transport|tertiary"
output: temp("build/data/jrc-idees/{sector}/unprocessed/{country_code}.xlsx")
conda: "../envs/shell.yaml"
shell: "unzip -p {input.country_data} JRC-IDEES-2015_{params.sector_title_case}_{wildcards.country_code}.xlsx > {output}"
shell: "unzip -o -p {input.country_data} JRC-IDEES-2015_{params.sector_title_case}_{wildcards.country_code}.xlsx > {output}"


rule jrc_idees_industry_processed:
Expand Down

0 comments on commit 8f83e94

Please sign in to comment.