Skip to content

Commit f03d341

Browse files
Initial commit
1 parent 2178cfb commit f03d341

9 files changed

Lines changed: 407 additions & 4 deletions

File tree

.github/ISSUE_TEMPLATE/gp-01.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: "GP-01 — GEMS Language evolution impact on GemsPy"
2+
description: Track updates to the GemsPy interpreter triggered by a new GEMS Language version
3+
title: "[GP-01] GEMS Language update — GemsPy impact"
4+
labels: ["GP-01", "gems-language-update"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
**Process GP-01** — Triggered by a new GEMS Language version that requires changes to GemsPy parsing, execution, or behavior.
10+
11+
> **Deviation from standard workflow — Step 4:** introduce version-gated behavior if needed; GemsPy must support multiple GEMS Language versions simultaneously; update parsing and execution layers accordingly.
12+
13+
- type: input
14+
id: gems_new_version
15+
attributes:
16+
label: New GEMS Language Version
17+
placeholder: "e.g. 1.3.0"
18+
validations:
19+
required: true
20+
21+
- type: input
22+
id: gems_previous_version
23+
attributes:
24+
label: Previous Tracked Version
25+
placeholder: "e.g. 1.2.0"
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: trigger
31+
attributes:
32+
label: Trigger
33+
description: What changed in the new GEMS Language version? Link to the GEMS release notes or changelog.
34+
validations:
35+
required: true
36+
37+
- type: textarea
38+
id: impact
39+
attributes:
40+
label: Impact Analysis
41+
description: |
42+
Assess the impact on:
43+
- **Grammar** — does `grammar/Expr.g4` need updating?
44+
- **Parsing layer** — does the ANTLR-generated parser or expression AST need updating?
45+
- **Execution layer** — does model loading, constraint building, or variable resolution need updating?
46+
- **Version-gated behavior** — does GemsPy need to support both old and new syntax simultaneously?
47+
- **Results** — are solver output values expected to change?
48+
- **Compatibility** — breaking vs backward-compatible?
49+
validations:
50+
required: true
51+
52+
- type: textarea
53+
id: validation_strategy
54+
attributes:
55+
label: Validation Strategy
56+
description: |
57+
Describe the regression and E2E validation approach:
58+
- Which reference studies cover the new/changed syntax?
59+
- Are solver results expected to differ? If yes, why?
60+
- How will backward compatibility with old syntax be verified?
61+
validations:
62+
required: true
63+
64+
- type: textarea
65+
id: checklist
66+
attributes:
67+
label: Process Checklist
68+
value: |
69+
### Step 1 — Issue Creation
70+
- [x] Issue created and linked to process GP-01
71+
72+
### Step 2 — Triage
73+
- [ ] Process confirmed applicable
74+
- [ ] Assigned to responsible contributor
75+
- [ ] Priority and milestone set (if applicable)
76+
77+
### Step 3 — Impact Analysis
78+
- [ ] GEMS Language changelog reviewed for GemsPy-relevant changes
79+
- [ ] Grammar impact assessed (`grammar/Expr.g4`)
80+
- [ ] Parsing layer impact assessed (`expression/`, ANTLR-generated files)
81+
- [ ] Execution layer impact assessed (`simulation/`, `study/`)
82+
- [ ] Version-gated behavior required? (yes/no — document decision)
83+
- [ ] Results impact assessed (solver values expected to change?)
84+
- [ ] Breaking vs backward-compatible change identified
85+
86+
### Step 4 — Implementation ⚠️ version-gated behavior may be required
87+
- [ ] Grammar updated (`grammar/Expr.g4`) if needed — do not edit ANTLR-generated files directly
88+
- [ ] ANTLR parser regenerated if grammar changed
89+
- [ ] Parsing and execution layers updated (`expression/`, `simulation/`, `study/`)
90+
- [ ] Version-gated behavior introduced if GemsPy must support both old and new syntax
91+
92+
### Step 5 — Testing & Validation ⚠️ regression suite covering old and new syntax required
93+
- [ ] At least one reference E2E study validating new language feature added or updated
94+
- [ ] Regression tests covering old syntax still pass
95+
- [ ] If results expected to change: before/after comparison documented
96+
- [ ] If results must not change: confirmed via tests
97+
98+
### Step 6 — CI Validation
99+
- [ ] Type checking passes (`mypy`)
100+
- [ ] Formatting passes (`black`, `isort`)
101+
- [ ] All tests pass in CI (`pytest`)
102+
103+
### Step 7 — Review & Merge
104+
- [ ] PR reviewed; documentation changes included
105+
106+
### Step 8 — Versioning
107+
- [ ] `pyproject.toml` version bumped (Major if breaking language change, Minor otherwise)
108+
109+
### Step 9 — Documentation & Changelog
110+
- [ ] `CHANGELOG.md` entry added
111+
- [ ] `COMPATIBILITY.md` updated with new GEMS Language version mapping
112+
- [ ] `AGENTS.md` reviewed for impact and updated if needed
113+
114+
### Step 10 — Release
115+
- [ ] If a release is needed: follow the release process in the Developer Guidelines

.github/ISSUE_TEMPLATE/gp-02.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: "GP-02 — GemsPy internal development"
2+
description: Track internal bug fixes, new GemsPy features, or code improvements not driven by a GEMS Language release
3+
title: "[GP-02] "
4+
labels: ["GP-02"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
**Process GP-02** — Triggered by internal initiative to fix, improve, or extend GemsPy. Not driven by a new GEMS Language version.
10+
11+
> **Deviation from standard workflow — Step 3:** extended impact analysis on results is required. You must explicitly state whether solver results are expected to change, and if so, document the reasoning.
12+
13+
- type: dropdown
14+
id: component
15+
attributes:
16+
label: Affected Component
17+
options:
18+
- Expression parsing / grammar (expression/, grammar/)
19+
- Optimization problem construction (simulation/)
20+
- Study loading / model resolution (study/)
21+
- Decomposition / optim-config (optim_config/)
22+
- Library resolution (libs/)
23+
- Other (specify in description)
24+
validations:
25+
required: true
26+
27+
- type: dropdown
28+
id: change_type
29+
attributes:
30+
label: Type of Change
31+
description: Determines the semantic version impact.
32+
options:
33+
- "Major: backward-incompatible change or major new feature (e.g. rolling horizon)"
34+
- "Minor: bug fix or backward-compatible new feature (e.g. new operator)"
35+
- "Patch: dependency update, code optimisation, or internal refactor with no syntax impact"
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: description
41+
attributes:
42+
label: Description
43+
description: What change is being proposed and why?
44+
validations:
45+
required: true
46+
47+
- type: textarea
48+
id: results_impact
49+
attributes:
50+
label: Results Impact
51+
description: |
52+
Are solver output values expected to change?
53+
- If yes: describe the before/after difference and why it is intended.
54+
- If no: this must be confirmed via tests.
55+
validations:
56+
required: true
57+
58+
- type: textarea
59+
id: validation_strategy
60+
attributes:
61+
label: Validation Strategy
62+
description: |
63+
Describe the validation approach:
64+
- Which unit tests cover the changed component?
65+
- Which E2E studies confirm solver equivalence (if results must not change)?
66+
- If results are expected to change, which reference studies document the new expected behavior?
67+
validations:
68+
required: true
69+
70+
- type: textarea
71+
id: checklist
72+
attributes:
73+
label: Process Checklist
74+
value: |
75+
### Step 1 — Issue Creation
76+
- [x] Issue created and linked to process GP-02
77+
78+
### Step 2 — Triage
79+
- [ ] Process confirmed applicable
80+
- [ ] Assigned to responsible contributor
81+
- [ ] Priority and milestone set (if applicable)
82+
83+
### Step 3 — Impact Analysis ⚠️ extended results analysis required
84+
- [ ] Affected modules identified
85+
- [ ] Results impact explicitly stated: change intended / no change intended
86+
- [ ] If results expected to change: before/after difference described and justified
87+
- [ ] Breaking vs backward-compatible change determined
88+
89+
### Step 4 — Implementation
90+
- [ ] Code changes implemented
91+
- [ ] Backward compatibility maintained unless explicitly intended as breaking
92+
93+
### Step 5 — Testing & Validation
94+
- [ ] If results expected to change: reference studies updated with new expected values
95+
- [ ] If results must not change: solver equivalence confirmed via tests
96+
- [ ] Unit tests cover changed components
97+
98+
### Step 6 — CI Validation
99+
- [ ] Type checking passes (`mypy`)
100+
- [ ] Formatting passes (`black`, `isort`)
101+
- [ ] All tests pass in CI (`pytest`)
102+
103+
### Step 7 — Review & Merge
104+
- [ ] PR reviewed; documentation changes included
105+
106+
### Step 8 — Versioning
107+
- [ ] `pyproject.toml` version bumped
108+
109+
### Step 9 — Documentation & Changelog
110+
- [ ] `CHANGELOG.md` entry added
111+
- [ ] `AGENTS.md` reviewed for impact and updated if needed
112+
113+
### Step 10 — Release
114+
- [ ] If a release is needed: follow the release process in the Developer Guidelines

.github/ISSUE_TEMPLATE/gp-03.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: "GP-03 — Dependency update"
2+
description: Track updates to GemsPy dependencies (linopy, HiGHS, ANTLR4 runtime, numpy, pydantic, etc.)
3+
title: "[GP-03] Dependency update — "
4+
labels: ["GP-03", "dependency"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
**Process GP-03** — Triggered by a new release of a GemsPy dependency that requires version pinning, compatibility validation, or behavior verification.
10+
11+
- type: input
12+
id: dependency_name
13+
attributes:
14+
label: Dependency
15+
placeholder: "e.g. linopy, highspy, antlr4-python3-runtime"
16+
validations:
17+
required: true
18+
19+
- type: input
20+
id: new_version
21+
attributes:
22+
label: New Version
23+
placeholder: "e.g. 0.7.0"
24+
validations:
25+
required: true
26+
27+
- type: input
28+
id: current_version
29+
attributes:
30+
label: Current Pinned Version
31+
placeholder: "e.g. 0.6.2"
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: impact
37+
attributes:
38+
label: Impact Analysis
39+
description: |
40+
Assess the impact on:
41+
- **Solver behavior** — does the update change optimization results?
42+
- **API compatibility** — are there breaking changes in the dependency's public API used by GemsPy?
43+
- **Performance** — any known performance regressions or improvements?
44+
- **Type stubs** — do mypy overrides in pyproject.toml need updating?
45+
validations:
46+
required: true
47+
48+
- type: textarea
49+
id: checklist
50+
attributes:
51+
label: Process Checklist
52+
value: |
53+
### Step 1 — Issue Creation
54+
- [x] Issue created and linked to process GP-03
55+
56+
### Step 2 — Triage
57+
- [ ] Process confirmed applicable
58+
- [ ] Assigned to responsible contributor
59+
60+
### Step 3 — Impact Analysis
61+
- [ ] Dependency changelog reviewed for breaking changes
62+
- [ ] API impact on GemsPy assessed
63+
- [ ] Results impact assessed (solver values expected to change?)
64+
65+
### Step 4 — Implementation
66+
- [ ] Version constraint updated in `pyproject.toml`
67+
- [ ] Any API call sites updated if needed
68+
69+
### Step 5 — Testing & Validation
70+
- [ ] All tests pass with new dependency version
71+
- [ ] If solver behavior changes: documented and confirmed intentional
72+
73+
### Step 6 — CI Validation
74+
- [ ] Type checking passes (`mypy`)
75+
- [ ] Formatting passes (`black`, `isort`)
76+
- [ ] All tests pass in CI (`pytest`)
77+
78+
### Step 7 — Review & Merge
79+
- [ ] PR reviewed
80+
81+
### Step 8 — Versioning
82+
- [ ] `pyproject.toml` version bumped (Minor if behavior change, Patch if no behavior change)
83+
84+
### Step 9 — Documentation & Changelog
85+
- [ ] `CHANGELOG.md` entry added
86+
- [ ] `COMPATIBILITY.md` updated with new dependency version
87+
88+
### Step 10 — Release
89+
- [ ] If a release is needed: follow the release process in the Developer Guidelines

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Process ID
2+
3+
<!-- Which governance process does this PR fall under? -->
4+
<!-- GP-01 | GP-02 | N/A -->
5+
6+
**Process:**
7+
8+
## Description
9+
10+
<!-- What does this PR change and why? -->
11+
12+
## Impact Analysis
13+
14+
<!-- Which modules are affected (expression/, simulation/, study/, optim_config/)? -->
15+
<!-- Are solver output values expected to change? If yes, document why. -->
16+
17+
## Checklist
18+
19+
- [ ] Unit tests pass (`pytest`)
20+
- [ ] Type checking passes (`mypy`)
21+
- [ ] Formatting passes (`black`, `isort`)
22+
- [ ] `pyproject.toml` version bumped if applicable
23+
- [ ] `CHANGELOG.md` entry added
24+
- [ ] `COMPATIBILITY.md` updated if GEMS Language version support changed
25+
- [ ] `AGENTS.md` reviewed for impact and updated if needed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v6
1515

1616
- name: Set up Python
17-
uses: actions/setup-python@v5
17+
uses: actions/setup-python@v6
1818
with:
1919
python-version: 3.11
2020

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
environment: PyPi
2323

2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v6
2626
- name: Set up Python
27-
uses: actions/setup-python@v5
27+
uses: actions/setup-python@v6
2828
with:
2929
python-version: '3.11'
3030

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# GemsPy Changelog
2+
3+
All notable changes to GemsPy are documented here.
4+
Versioning follows [Semantic Versioning](https://semver.org/).
5+
6+
---
7+
8+
## v0.1.0 — Initial Release
9+
10+
### Added
11+
12+
- Pure-Python interpreter for the GEMS modelling language
13+
- ANTLR4-based expression parser with full mathematical syntax support (`grammar/Expr.g4`)
14+
- Model and library loading from YAML (`model/`, `libs/`)
15+
- Study instantiation from folder structure (`study/`)
16+
- Optimization problem construction via [linopy](https://github.com/PyPSA/linopy) with HiGHS solver backend (`simulation/`)
17+
- Temporal decomposition support: sequential subproblems, parallel subproblems, and Benders decomposition (`optim_config/`)
18+
- CLI entry point: `gemspy --model-libs ... --components ... --timeseries ... --duration ... --scenarios ...`
19+
- Python API: `load_study()`, `run_study()`, programmatic `Study` + `build_problem()` interface
20+
- Support for Python 3.10, 3.11, 3.12
21+
- CI pipeline: linting (`black`, `isort`), type checking (`mypy`), tests with coverage (`pytest --cov`)
22+
- PyPI package: `gemspy`

0 commit comments

Comments
 (0)