Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d00838c
Start with data_module_template
jnnr Apr 17, 2025
382e994
Set up rules, env and scripts for capacity factors
jnnr Apr 17, 2025
8995967
Delete dummy rule
jnnr Jun 18, 2025
393d8f8
Set first column of spatial units as index
jnnr Jun 18, 2025
7f6689d
Adapt rule's wildcards
jnnr Jun 18, 2025
62f7c95
Use the same script for wind and pv capacityfactors
jnnr Jun 18, 2025
622861c
Allow use of point/raster layout
jnnr Jun 18, 2025
177c28b
Enable configuration to download cutout
jnnr Jun 18, 2025
1c2d22c
Move download rule to automatic.smk
jnnr Jun 20, 2025
8f490a2
Add simple unpolished plot and map
jnnr Jun 20, 2025
b22620a
Attempt to solve missing file when integrating data module via GitHub
jnnr Jun 20, 2025
7451085
Update template to v0.1.13
jnnr Jun 20, 2025
c203a62
Add integration test
jnnr Jun 20, 2025
cd3c2b4
Harmonize paths between rules
jnnr Jun 20, 2025
16e0d36
Force latest atlite 0.4.1 and cfgrib to handle new cdsapi
jnnr Aug 8, 2025
dccd8c0
Adhere to new atlite api
jnnr Aug 8, 2025
88d9dfa
Adapt and make schema stricter
jnnr Aug 8, 2025
5251b4c
Adapt example and test config
jnnr Aug 8, 2025
f9a6b00
Allow to pass monthly_requests
jnnr Aug 8, 2025
ecf5c99
Set masked to True when reading raster layouts
jnnr Aug 8, 2025
1f2e8f8
Set nan values in layout to zero
jnnr Oct 20, 2025
83b4780
Move atlite call to backend
jnnr Nov 3, 2025
3274159
Wrap processing in functions
jnnr Nov 3, 2025
51b9e08
Drop pre-defined keyword argument in function call
jnnr Nov 3, 2025
0278af0
Add plots
jnnr Nov 5, 2025
e88b910
Use parquet files for shapes
jnnr Nov 5, 2025
b5d37b3
Call function with correct argument
jnnr Nov 5, 2025
bcace4d
Describe interface
jnnr Nov 5, 2025
0579889
Drop separate plot rule as plots are already created alongside data
jnnr Nov 6, 2025
eec3901
Validate schemas of point layout and shapes
jnnr Nov 6, 2025
9fe6e8b
Configure examples
jnnr Nov 6, 2025
7548372
Extend README
jnnr Nov 12, 2025
9c88280
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 12, 2025
7edc44d
Commit pixi.lock and update gitignore
sjpfenninger Nov 12, 2025
ad7e446
Update to newest template; fix INTERFACE and integration Snakefile
sjpfenninger Nov 12, 2025
187e6e0
Define default target after module re-import
jnnr Nov 13, 2025
c358ceb
Merge branch 'main' into feature-module-setup
sjpfenninger Nov 13, 2025
71268ac
Delete obsolete files
jnnr Nov 13, 2025
16f85bc
Prepend _ to follow naming convention for python modules
jnnr Nov 13, 2025
212491c
Delete dummy content
jnnr Nov 13, 2025
9d83d7a
Fix name of python module when adding to source path
jnnr Nov 13, 2025
1ba5f13
Make sure all python modules are in source_path
jnnr Nov 14, 2025
1bfb4c3
Fix reference
jnnr Nov 14, 2025
f16dfe3
Relative import
jnnr Nov 14, 2025
23f559c
Update tests/integration/test_config.yaml
jnnr Nov 14, 2025
bde2d46
Copier update and change license to Apache
jnnr Jun 2, 2026
b01f549
Drop user/automatic from INTERFACE.yaml
jnnr Jun 2, 2026
07caabb
Rename spatial_units as shapes
jnnr Jun 2, 2026
2c9f739
Wrap download into function
jnnr Jun 2, 2026
5a24951
Rename functions for clarity
jnnr Jun 2, 2026
82eb839
Not define new variables for techs_specs
jnnr Jun 2, 2026
1402f4e
Generic naming
jnnr Jun 2, 2026
a1b65c1
Write specific error message
jnnr Jun 2, 2026
8c96e3e
Rename test to conform to new template
jnnr Jun 8, 2026
c4ec7c6
Run copier recopy
jnnr Jun 8, 2026
dd43ce3
Delete dummy script
jnnr Jun 8, 2026
257b561
Use pathvars
jnnr Jun 9, 2026
2e2d502
Bump pandera to handle errors during validation
jnnr Jun 9, 2026
0a6bae8
Avoid using ancient on output
jnnr Jun 10, 2026
b8c9dc2
Refine plots
jnnr Jun 10, 2026
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
12 changes: 6 additions & 6 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Changes here will be overwritten by Copier
# DO NOT MANUALLY MODIFY THIS FILE
# !!!!! DO NOT MANUALLY MODIFY THIS FILE !!!!!
_commit: latest
_src_path: https://github.com/calliope-project/data-module-template.git
author_email: j.a.c.launer@tudelft.nl
author_family_name: Launer
author_given_name: Jann
github_org: calliope-project
license: MIT
module_description: This data module produces area potentials and capacity factors
for PV and wind at arbitrary spatial resolution.
module_long_name: 'PV and wind area potentials and capacity factors '
github_org: modelblocks-org
license: Apache-2.0
module_description: This data module produces capacity factors for PV and wind at
arbitrary spatial resolution.
module_long_name: PV and wind capacity factors
module_short_name: module_pv_wind
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Linux Fedora 41, Windows 10...]
- OS: [e.g. Linux Fedora 43, Windows 11...]
- Version [e.g. v0.1.1]

**Additional context**
Expand Down
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: General information
url: https://www.modelblocks.org/
about: Please consult our website for general information on the Modelblocks methodology.
11 changes: 8 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Fixes #

## Reviewer checklist

* [ ] `INTERFACE.yaml` is up-to-date with all relevant user resources and results.
* [ ] The integration example is up-to-date with a minimal use-case of the module.
* [ ] Module documentation is up-to-date.
* [ ] There are no `pip` dependencies in the module's environment files (`workflow/envs/`).
* [ ] All rules use `pathvars` (e.g., `<results>`) in their inputs and outputs.
* [ ] The integration test-suite is successful, including:
* [ ] `pre-commit.ci` tests pass.
* [ ] tests pass for all relevant OS configurations (linux, osx, windows).
* [ ] Module documentation is up-to-date, including:
* [ ] `INTERFACE.yaml` mentions all relevant `pathvars` and `wildcards`.
* [ ] `README.md` describes how to use the module and has the necessary citations.
6 changes: 5 additions & 1 deletion .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:
uses: calliope-project/data-module-template/.github/workflows/template-check-version.yml@latest
permissions:
contents: read
issues: write
uses: modelblocks-org/data-module-template/.github/workflows/template-check-version.yml@latest
40 changes: 36 additions & 4 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
name: CI
# !!!!! DO NOT MODIFY UNLESS ABSOLUTELY NECESSARY !!!!!
# This workflow helps standardise integration tests across data modules
name: Pull Request CI tests for Modelblocks data modules
on:
pull_request:
branches:
- "main"

jobs:
ci-tests:
uses: calliope-project/data-module-template/.github/workflows/template-pr-ci.yml@latest
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.8.3
- name: Run integration tests
id: tests
run: pixi run test-integration
continue-on-error: true
- name: Run snakemake linting
id: linting
run: |
pixi run snakemake --lint --snakefile workflow/Snakefile
pixi run snakemake --lint --snakefile tests/integration/Snakefile
continue-on-error: true
- name: Save integration logs
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: integration-test-logs-${{ matrix.os }}
path: tests/integration/resources/module/logs
if-no-files-found: ignore
retention-days: 30
- name: Fail if integration or linting failed
if: ${{ steps.tests.outcome == 'failure' || steps.linting.outcome == 'failure' }}
run: exit 1
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ on:

jobs:
release-workflow:
uses: calliope-project/data-module-template/.github/workflows/template-release.yml@latest
permissions:
contents: write
uses: modelblocks-org/data-module-template/.github/workflows/template-release.yml@latest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
__pycache__
*.pyc

### Environments
.pixi/

### Snakemake
.snakemake/
gurobi.log
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ repos:
# Repo quality
- id: check-added-large-files
args: [--enforce-all]
exclude: ^pixi\.lock$
- id: forbid-submodules
- id: check-case-conflict
- id: check-illegal-windows-names
Expand Down Expand Up @@ -44,4 +45,4 @@ repos:
files: .*\.(py|smk|md)$|^Snakefile$

ci: # https://pre-commit.ci/
autoupdate_schedule: monthly
autoupdate_schedule: quarterly
19 changes: 0 additions & 19 deletions .readthedocs.yaml

This file was deleted.

55 changes: 36 additions & 19 deletions INTERFACE.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
# Module Input-Output structure for automated doc. generation
resources:
user:
user_message.md: "Example file emulating external files requested from a user."
automatic:
dummy_readme.md: "Example file emulating downloads determined by internal settings."
results:
combined_text.md: "Example file emulating module results."

# Wildcard example:
# resources:
# user:
# shapes_{resolution}.geojson: region geometries.
# automatic:
# technology_data.parquet: dataset with technology characteristics.
# results:
# '{resolution}/tech_capacity.parquet': description of output data.
# '{resolution}/results_image.png': description of output image.
# wildcards:
# resolution: description of the wildcard’s purpose.
pathvars:
snakemake_defaults:
logs:
default: "<logs>"
description: location of rule log files.
resources:
default: "<resources>"
description: "location of module resource files."
results:
default: "<results>"
description: "location of module results."
user_resources:
cutout:
default: "<resources>/user/cutout_{name_cutout}.nc"
description: "Cutout of meteorological data provided by user."
tech_specs:
default: "<resources>/user/tech_specs/{name_tech}.yaml"
description: "Technology specification of PV/wind."
layout_raster:
default: "<resources>/user/layout/{name_layout}.tif"
description: "Raster layout file describing the spatial distribution of capacity."
layout_point:
default: "<resources>/user/layout/{name_layout}.parquet"
description: "Point layout file describing the spatial distribution of capacity."
shapes:
default: "<resources>/user/shapes/{shape}.parquet"
description: "Geometries of shapes (e.g., administrative regions)."
results:
capacity_factors:
default: "<results>/{name_cutout}/{shape}/{name_layout}/capacityfactors_{name_tech}.nc"
description: Capacity factors for the specified technology.
wildcards:
name_cutout: Cutout name
name_tech: Technology name
name_layout: Layout name
shape: Shape name
Loading
Loading