Skip to content

Commit 95d5ea8

Browse files
Feature modelblocks (#16)
* Move to modelblocks * Use PU instead of CF for naming --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e4cb7d4 commit 95d5ea8

50 files changed

Lines changed: 11797 additions & 4689 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.copier-answers.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Changes here will be overwritten by Copier
2-
# DO NOT MANUALLY MODIFY THIS FILE
2+
# !!!!! DO NOT MANUALLY MODIFY THIS FILE !!!!!
33
_commit: latest
44
_src_path: https://github.com/calliope-project/data-module-template.git
55
author_email: i.ruizmanuel@tudelft.nl
66
author_family_name: Ruiz Manuel
77
author_given_name: Ivan
8-
github_org: calliope-project
8+
github_org: modelblocks-org
99
license: Apache-2.0
1010
module_description: A module to calculate hydropower inflow timeseries for facilities
11-
around the globe. Based on Euro-Calliope methods.
12-
module_long_name: clio - Hydropower module
11+
around the globe, based on Euro-Calliope methods.
12+
module_long_name: Modelblocks - Hydropower module
1313
module_short_name: module_hydropower

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

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

3030
**Additional context**

.github/ISSUE_TEMPLATE/config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: General information
4+
url: https://www.modelblocks.org/
5+
about: Please consult our website for general information on the Modelblocks methodology.

.github/pull_request_template.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Fixes #
88

99
## Reviewer checklist
1010

11-
* [ ] `INTERFACE.yaml` is up-to-date with all relevant user resources and results.
12-
* [ ] The integration example is up-to-date with a minimal use-case of the module.
13-
* [ ] Module documentation is up-to-date.
11+
* [ ] There are no `pip` dependencies in the module's environment files (`workflow/envs/`).
12+
* [ ] All rules use `pathvars` (e.g., `<results>`) in their inputs and outputs.
13+
* [ ] The integration test-suite is successful, including:
14+
* [ ] `pre-commit.ci` tests pass.
15+
* [ ] tests pass for all relevant OS configurations (linux, osx, windows).
16+
* [ ] Module documentation is up-to-date, including:
17+
* [ ] `INTERFACE.yaml` mentions all relevant `pathvars` and `wildcards`.
18+
* [ ] `README.md` describes how to use the module and has the necessary citations.

.github/workflows/check-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ on:
66

77
jobs:
88
copier-update:
9-
uses: calliope-project/data-module-template/.github/workflows/template-check-version.yml@latest
9+
uses: modelblocks-org/data-module-template/.github/workflows/template-check-version.yml@latest

.github/workflows/pr-ci.yml

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,43 @@
1-
name: CI
1+
# !!!!! DO NOT MODIFY UNLESS ABSOLUTELY NECESSARY !!!!!
2+
# This workflow helps standardise integration tests across data modules
3+
name: Pull Request CI tests for Modelblocks data modules
24
on:
35
pull_request:
46
branches:
57
- "main"
6-
78
jobs:
8-
ci-tests:
9-
uses: calliope-project/data-module-template/.github/workflows/template-pr-ci.yml@feature-ci-cdsapi
10-
secrets:
9+
build:
10+
name: Build
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
python-version: ["3.12"]
17+
env:
1118
CDSAPI_KEY: ${{ secrets.CDSAPI_KEY }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Setup pixi
22+
uses: prefix-dev/setup-pixi@v0.8.3
23+
- name: Run integration tests
24+
id: tests
25+
run: pixi run test-integration
26+
continue-on-error: true
27+
- name: Run snakemake linting
28+
id: linting
29+
run: |
30+
pixi run snakemake --lint --snakefile workflow/Snakefile
31+
pixi run snakemake --lint --snakefile tests/integration/Snakefile
32+
continue-on-error: true
33+
- name: Save integration logs
34+
if: ${{ always() }}
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: integration-test-logs-${{ matrix.os }}
38+
path: tests/integration/results/integration_test/logs
39+
if-no-files-found: ignore
40+
retention-days: 30
41+
- name: Fail if integration or linting failed
42+
if: ${{ steps.tests.outcome == 'failure' || steps.linting.outcome == 'failure' }}
43+
run: exit 1

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ on:
66

77
jobs:
88
release-workflow:
9-
uses: calliope-project/data-module-template/.github/workflows/template-release.yml@latest
9+
permissions:
10+
contents: write
11+
uses: modelblocks-org/data-module-template/.github/workflows/template-release.yml@latest

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ repos:
1212
# Repo quality
1313
- id: check-added-large-files
1414
args: [--enforce-all --maxkb=600]
15+
exclude: ^pixi\.lock$
1516
- id: forbid-submodules
1617
- id: check-case-conflict
1718
- id: check-illegal-windows-names
@@ -32,7 +33,7 @@ repos:
3233

3334
# Snakemake file formatting
3435
- repo: https://github.com/snakemake/snakefmt
35-
rev: v0.11.0
36+
rev: v0.11.4
3637
hooks:
3738
- id: snakefmt
3839

@@ -44,4 +45,4 @@ repos:
4445
files: .*\.(py|smk|md)$|^Snakefile$
4546

4647
ci: # https://pre-commit.ci/
47-
autoupdate_schedule: monthly
48+
autoupdate_schedule: quarterly

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ This is the list of contributors for copyright purposes.
22

33
This does not necessarily list everyone who has contributed to this software's
44
code or documentation. For a full contributor list, see:
5-
<https://github.com/calliope-project/module_hydropower/graphs/contributors>
5+
<https://github.com/modelblocks-org/module_hydropower/graphs/contributors>
66

77
Ivan Ruiz Manuel, <i.ruizmanuel@tudelft.nl>

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# https://citation-file-format.github.io/
44
cff-version: 1.2.0
55
message: If you use this software or data produced by it, please cite it using the metadata from this file.
6-
title: "clio - module_hydropower: clio - Hydropower module"
7-
repository: "https://github.com/calliope-project/module_hydropower"
6+
title: "Modelblocks - module_hydropower: Hydropower module"
7+
repository: "https://github.com/modelblocks-org/module_hydropower"
88
license: Apache-2.0
99
authors:
1010
- given-names: Ivan

0 commit comments

Comments
 (0)