Skip to content

Commit e52777f

Browse files
authored
Merge pull request #787 from open-energy-transition/merge-upstream-260706
Merge changes from upstream
2 parents 25cf9e2 + 2c73f62 commit e52777f

43 files changed

Lines changed: 2865 additions & 3146 deletions

Some content is hidden

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

.github/ISSUE_TEMPLATE/1-bug-community.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ body:
1111
1212
Please do not post usage questions here. Ask them on the [PyPSA/Open-TYNDP Discord channel](https://discord.com/channels/911692131440148490/1414977512089321564) or contact tyndp@openenergytransition.org.
1313
14+
Please write this issue description yourself. Any potentially verbose AI-generated content should be marked.
15+
1416
- type: checkboxes
1517
id: version_checks
1618
attributes:

.github/ISSUE_TEMPLATE/2-feature-community.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ body:
1111
1212
Please do not post usage questions here. Ask them on the [PyPSA/Open-TYNDP Discord channel](https://discord.com/channels/911692131440148490/1414977512089321564) or contact tyndp@openenergytransition.org.
1313
14+
Please write this issue description yourself. Any potentially verbose AI-generated content should be marked.
15+
1416
- type: checkboxes
1517
id: affected_component
1618
attributes:

.github/ISSUE_TEMPLATE/3-bug-maintainer.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ body:
1111
1212
Please do not post usage questions here. Ask them on the [PyPSA/Open-TYNDP Discord channel](https://discord.com/channels/911692131440148490/1414977512089321564) or contact tyndp@openenergytransition.org.
1313
14+
Please write this issue description yourself. Any potentially verbose AI-generated content should be marked.
15+
1416
- type: checkboxes
1517
id: version_checks
1618
attributes:

.github/ISSUE_TEMPLATE/4-feature-maintainer-parent.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ body:
1212
1313
This template is for high-level parent issues that will be broken down into sub-issues. Use the ["Feature - Sub Issue (Maintainer)"](https://github.com/open-energy-transition/open-tyndp/issues/new?template=5-feature-maintainer-sub.yaml) template for detailed feature requests. Security and risk assessment is captured at this sub-issue level.
1414
15+
Please write this issue description yourself. Any potentially verbose AI-generated content should be marked.
16+
1517
- type: checkboxes
1618
id: affected_component
1719
attributes:

.github/ISSUE_TEMPLATE/5-feature-maintainer-sub.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ body:
1212
1313
This template is for detailed feature requests. Use the ["Feature - Parent Issue (Maintainer)"](https://github.com/open-energy-transition/open-tyndp/issues/new?template=4-feature-maintainer-parent.yaml) template for high-level parent issues that will be broken down into sub-issues.
1414
15+
Please write this issue description yourself. Any potentially verbose AI-generated content should be marked.
16+
1517
- type: input
1618
id: parent_issue
1719
attributes:

.github/ISSUE_TEMPLATE/6-spike-maintainer.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ body:
1212
1313
Spikes are exploratory issues meant to gather information and explore concepts. They typically don't result in PRs but help inform future implementation decisions.
1414
15+
Please write this issue description yourself. Any potentially verbose AI-generated content should be marked.
16+
1517
- type: input
1618
id: parent_issue
1719
attributes:

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Closes # (if applicable).
2222
- [ ] Changes are tested locally and behave as expected.
2323
- [ ] Code and workflow changes are documented.
2424
- [ ] A release note entry is added to `doc/release_notes.md`.
25+
- [ ] The description is human-written and any AI-generated content is marked.
2526

2627
**If applicable:**
2728
- [ ] Changes in configuration options are reflected in `scripts/lib/validation`.

.github/workflows/security-scan.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,15 @@ jobs:
4545
add-cpes-if-none: true
4646
output-format: sarif
4747

48-
# Point alerts to pixi.lock so githubs path scoped PR check registers it
49-
- name: Rewrite SARIF locations to pixi.lock
48+
# Set uri=pixi.lock for a readable location, and fingerprint each alert by
49+
# CVE id so code scanning matches against the master baseline by CVE, not line.
50+
- name: Normalize SARIF (pixi.lock location + CVE fingerprint)
5051
run: |
51-
jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri = "pixi.lock"' \
52-
"${{ steps.scan.outputs.sarif }}" > rewritten.sarif
53-
mv rewritten.sarif "${{ steps.scan.outputs.sarif }}"
52+
jq '.runs[].results[] |= (
53+
.locations[].physicalLocation.artifactLocation.uri = "pixi.lock"
54+
| .partialFingerprints = {"grypeCve/v1": .ruleId}
55+
)' "${{ steps.scan.outputs.sarif }}" > normalized.sarif
56+
mv normalized.sarif "${{ steps.scan.outputs.sarif }}"
5457
5558
- name: Upload SARIF
5659
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

Snakefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,19 @@ for scenario_name, scenario_overrides in scenarios.items():
6060
) from e
6161

6262
RDIR = get_rdir(run)
63+
PROJ_DIR = Path(workflow.snakefile).parent
64+
6365
shadow_config = get_shadow(run)
6466

6567
shared_resources = run["shared_resources"]["policy"]
6668
exclude_from_shared = run["shared_resources"]["exclude"]
6769
logs = path_provider("logs/", RDIR, shared_resources, exclude_from_shared)
6870
benchmarks = path_provider("benchmarks/", RDIR, shared_resources, exclude_from_shared)
6971
resources = path_provider("resources/", RDIR, shared_resources, exclude_from_shared)
70-
scripts = script_path_provider(Path(workflow.snakefile).parent)
72+
scripts = script_path_provider(PROJ_DIR)
7173

7274
RESULTS = "results/" + RDIR
75+
workflow.default_target = config["run"]["default_target_rule"]
7376

7477

7578
localrules:
@@ -207,7 +210,6 @@ def input_all_tyndp(w):
207210

208211

209212
rule all:
210-
default_target: True
211213
input:
212214
input_all_tyndp,
213215
expand(RESULTS + "graphs/costs.pdf", run=config["run"]["name"]),
@@ -396,6 +398,8 @@ rule rulegraph:
396398
pdf=resources("dag_rulegraph.pdf"),
397399
png=resources("dag_rulegraph.png"),
398400
svg=resources("dag_rulegraph.svg"),
401+
params:
402+
default_target=workflow.default_target, # track default target to ensure rule is re-triggered
399403
message:
400404
"Creating RULEGRAPH dag in multiple formats using the final configuration."
401405
shell:
@@ -433,6 +437,8 @@ rule filegraph:
433437
pdf=resources("dag_filegraph.pdf"),
434438
png=resources("dag_filegraph.png"),
435439
svg=resources("dag_filegraph.svg"),
440+
params:
441+
default_target=workflow.default_target, # track default target to ensure rule is re-triggered
436442
message:
437443
"Creating FILEGRAPH dag in multiple formats using the final configuration."
438444
shell:

config/config.default.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ run:
3333
policy: false
3434
exclude: []
3535
use_shadow_directory: false
36+
default_target_rule: all
3637

3738
# docs in https://open-tyndp.readthedocs.io/en/latest/configuration.html#foresight
3839
foresight: overnight
@@ -1311,6 +1312,13 @@ solving:
13111312
primal_feasibility_tolerance: 1.0e-05
13121313
dual_feasibility_tolerance: 1.0e-05
13131314
random_seed: 123
1315+
"highs-hipo":
1316+
solver: hipo
1317+
parallel: 'on'
1318+
primal_feasibility_tolerance: 1.0e-05
1319+
dual_feasibility_tolerance: 1.0e-05
1320+
random_seed: 123
1321+
run_crossover: 'off'
13141322
"gurobi-default":
13151323
threads: 32
13161324
method: 2
@@ -1394,6 +1402,8 @@ solving:
13941402

13951403
# docs in https://open-tyndp.readthedocs.io/en/latest/configuration.html#data
13961404
data:
1405+
version_files:
1406+
- data/versions.csv
13971407
hotmaps_industrial_sites:
13981408
source: archive
13991409
version: latest

0 commit comments

Comments
 (0)