Skip to content

Commit 95dba9c

Browse files
authored
Merge pull request #12 from modelblocks-org/chore/convention-v1.0.0
move to convention v1.0.0
2 parents 8fda1ef + a4a192f commit 95dba9c

31 files changed

Lines changed: 13866 additions & 11579 deletions

.all-contributorsrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"projectName": "module_co2stop_cdr",
3+
"projectOwner": "modelblocks-org",
4+
"repoType": "github",
5+
"repoHost": "https://github.com",
6+
"files": [
7+
"README.md"
8+
],
9+
"imageSize": 100,
10+
"commit": false,
11+
"commitConvention": "none",
12+
"contributors": [],
13+
"contributorsPerLine": 7,
14+
"linkToUsage": false,
15+
"contributorsSortAlphabetically": true
16+
}

.copier-answers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Changes here will be overwritten by Copier
22
# !!!!! DO NOT MANUALLY MODIFY THIS FILE !!!!!
3-
_commit: latest
3+
_commit: v1.0.2
44
_src_path: https://github.com/modelblocks-org/data-module-template.git
55
author_email: i.ruizmanuel@tudelft.nl
66
author_family_name: Ruiz Manuel
77
author_given_name: Ivan
88
github_org: modelblocks-org
99
license: Apache-2.0
1010
module_description: A module to aggregate CDR potential in Europe into flexible spatial
11-
resolutions, using the CO2Stop dataset
11+
resolutions, using the CO2Stop dataset.
1212
module_long_name: Module CO2Stop - Carbon Dioxide Removal in Europe
1313
module_short_name: module_co2stop_cdr

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ assignees: ''
88
---
99

1010
**Describe the bug**
11-
A clear and concise description of what the bug is.
11+
A clear and concise description of the bug.
1212

13-
**To Reproduce**
13+
**Steps to reproduce**
1414
Steps to reproduce the behavior:
1515
1. Go to '...'
16-
2. Click on '....'
17-
3. Scroll down to '....'
16+
2. Run '...'
17+
3. Provide '...'
1818
4. See error
1919

2020
**Expected behavior**
@@ -23,9 +23,9 @@ A clear and concise description of what you expected to happen.
2323
**Screenshots**
2424
If applicable, add screenshots to help explain your problem.
2525

26-
**Desktop (please complete the following information):**
26+
**Environment (please complete the following information):**
2727
- OS: [e.g. Linux Fedora 43, Windows 11...]
28-
- Version [e.g. v0.1.1]
28+
- Version: [e.g. v0.1.1]
2929

3030
**Additional context**
3131
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Modelblocks project website
4+
url: https://www.modelblocks.org/
5+
about: Consult our website for general information on our initiative.
6+
- name: Documentation
7+
url: https://modelblocks.readthedocs.io/
8+
about: Read our documentation for general questions and guidelines.
9+
- name: Community chat
10+
url: https://calliope-modelblocks.zulipchat.com
11+
about: Reach out to our community on our official Zulip chat.
Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,75 @@
1-
# Check for changes in the upstream template. If changes are found, an issue is created
2-
name: Template check.
1+
# Check for changes in the upstream template. If changes are found, an issue is created.
2+
name: Template check
3+
34
on:
5+
workflow_dispatch:
46
schedule:
57
- cron: '0 0 1 * *' # Runs at 00:00 UTC on the 1st day of every month
68

9+
defaults:
10+
run:
11+
shell: bash --noprofile --norc -euo pipefail {0}
12+
713
jobs:
8-
copier-update:
9-
uses: modelblocks-org/data-module-template/.github/workflows/template-check-version.yml@latest
14+
copier-check-update:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
issues: write
19+
env:
20+
ISSUE_TITLE: Template update available
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
26+
27+
- name: Check for template updates
28+
id: copier_check_update
29+
run: |
30+
update_json="$(uvx --from 'copier>=9.15.2' copier check-update --output-format json)"
31+
echo "$update_json"
32+
{
33+
echo "update_available=$(jq -r '.update_available // false' <<< "$update_json")"
34+
echo "current_version=$(jq -r '.current_version // "unknown"' <<< "$update_json")"
35+
echo "latest_version=$(jq -r '.latest_version // "unknown"' <<< "$update_json")"
36+
} >> "$GITHUB_OUTPUT"
37+
38+
- name: Check for existing update issue
39+
if: steps.copier_check_update.outputs.update_available == 'true'
40+
id: existing_issue
41+
run: |
42+
issue_count="$(gh issue list \
43+
--repo "${{ github.repository }}" \
44+
--state open \
45+
--search "$ISSUE_TITLE in:title" \
46+
--json title \
47+
--jq "map(select(.title == \"$ISSUE_TITLE\")) | length")"
48+
if [[ "$issue_count" -gt 0 ]]; then
49+
echo "exists=true" >> "$GITHUB_OUTPUT"
50+
else
51+
echo "exists=false" >> "$GITHUB_OUTPUT"
52+
fi
53+
env:
54+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Open update issue
57+
if: steps.copier_check_update.outputs.update_available == 'true' && steps.existing_issue.outputs.exists != 'true'
58+
run: |
59+
gh issue create \
60+
--repo "${{ github.repository }}" \
61+
--title "$ISSUE_TITLE" \
62+
--body "A new version of the Modelblocks data module template is available.
63+
64+
Current template version: ${{ steps.copier_check_update.outputs.current_version }}
65+
Latest template version: ${{ steps.copier_check_update.outputs.latest_version }}
66+
67+
Please update this project using:
68+
69+
\`\`\`shell
70+
copier update --skip-answered --defaults
71+
\`\`\`
72+
73+
Review the resulting changes before merging them."
74+
env:
75+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
os: [ubuntu-latest, windows-latest, macos-latest]
16-
python-version: ["3.12"]
1716
steps:
18-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v7
1918
- name: Setup pixi
20-
uses: prefix-dev/setup-pixi@v0.8.3
19+
uses: prefix-dev/setup-pixi@v0.9.6
2120
- name: Run integration tests
2221
id: tests
2322
run: pixi run test-integration
@@ -30,10 +29,10 @@ jobs:
3029
continue-on-error: true
3130
- name: Save integration logs
3231
if: ${{ always() }}
33-
uses: actions/upload-artifact@v4
32+
uses: actions/upload-artifact@v7
3433
with:
3534
name: integration-test-logs-${{ matrix.os }}
36-
path: tests/integration/results/integration_test/logs
35+
path: tests/integration/resources/module/logs
3736
if-no-files-found: ignore
3837
retention-days: 30
3938
- name: Fail if integration or linting failed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ __pycache__
1212
*.pyc
1313

1414
### Environments
15-
.pixi/
15+
.pixi/*
16+
!.pixi/.gitignore
1617

1718
### Snakemake
1819
.snakemake/

.pixi/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!.gitignore
3+
!config.toml

.pixi/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pinning-strategy = "latest-up"

0 commit comments

Comments
 (0)