Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/check-version.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Check for changes in the upstream template. If changes are found, an issue is created
name: Template check.
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # Runs at 00:00 UTC on the 1st day of every month

jobs:
copier-update:
permissions:
contents: read
issues: write
uses: modelblocks-org/data-module-template/.github/workflows/template-check-version.yml@latest
2 changes: 1 addition & 1 deletion .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: integration-test-logs-${{ matrix.os }}
path: tests/integration/resources/powerplants/logs
path: tests/integration/resources/module/logs
if-no-files-found: ignore
retention-days: 30
- name: Fail if integration or linting failed
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ module module_powerplants:
aggregated_capacity="results/outputs/{shapes}/aggregated/{adjustment}/{category}.parquet",
powerplants="results/outputs/{shapes}/powerplants/{adjustment}/{category}.parquet",
# Redirect module intermediate files
logs="resources/powerplants/logs",
resources="resources/powerplants/resources",
results="resources/powerplants/results",
logs="resources/module/logs",
resources="resources/module/resources",
results="resources/module/results",
snakefile:
"../../workflow/Snakefile"
config:
Expand Down
2 changes: 2 additions & 0 deletions workflow/internal/settings.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Module settings that users cannot modify.
curl:
retry: 5
crs:
geographic: "EPSG:4326"
resources:
Expand Down
12 changes: 8 additions & 4 deletions workflow/rules/automatic.smk
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ rule download_eia:
conda:
"../envs/shell.yaml"
params:
retry=internal["curl"]["retry"],
url=internal["resources"]["automatic"]["EIA"],
message:
"Download the EIA International energy statistics in bulk."
shell:
"""
curl -sSLo {output.path:q} {params.url:q}
curl -fsSL --retry {params.retry:q} -o {output.path:q} {params.url:q}
"""


Expand All @@ -26,12 +27,13 @@ rule download_tz_sam:
conda:
"../envs/shell.yaml"
params:
retry=internal["curl"]["retry"],
url=internal["resources"]["automatic"]["TZ-SAM"],
message:
"Download the Transition Zero - Solar Asset Mapper dataset."
shell:
"""
curl -sSLo {output.path:q} {params.url:q}
curl -fsSL --retry {params.retry:q} -o {output.path:q} {params.url:q}
"""


Expand All @@ -43,12 +45,13 @@ rule download_glohydrores:
conda:
"../envs/shell.yaml"
params:
retry=internal["curl"]["retry"],
url=internal["resources"]["automatic"]["GloHydroRes"],
message:
"Download the GloHydroRes dataset."
shell:
"""
curl -sSLo {output.path:q} {params.url:q}
curl -fsSL --retry {params.retry:q} -o {output.path:q} {params.url:q}
"""


Expand All @@ -60,10 +63,11 @@ rule download_gem:
conda:
"../envs/shell.yaml"
params:
retry=internal["curl"]["retry"],
url=lambda wc: internal["resources"]["automatic"]["GEM"][wc.dataset],
message:
"Download the GEM {wildcards.dataset} dataset."
shell:
"""
curl -sSLo {output.path:q} {params.url:q}
curl -fsSL --retry {params.retry:q} -o {output.path:q} {params.url:q}
"""
Loading