Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into unravel_CH4_coarse
Browse files Browse the repository at this point in the history
  • Loading branch information
lindnemi committed Aug 7, 2024
2 parents 69b4a1a + d90aca1 commit 82bc3ff
Show file tree
Hide file tree
Showing 34 changed files with 4,015 additions and 2,969 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Apply pre-commit (from #156)
ca1f43c23f1c0936cb9f9e1062854fdf0060c409
30 changes: 15 additions & 15 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:
strategy:
matrix:
include:
- {artifact_name: "results (feature branch)", path: "~/${{ github.repository }}/feature/results"}
- {artifact_name: "results (base branch)", path: "~/${{ github.repository }}/main/results"}
- {artifact_name: "validator-metadata", path: "~/${{ github.repository }}/validator-metadata.yml"}
- {artifact_name: "results (feature branch)", path: "~/${{ github.repository }}/feature/results"}
- {artifact_name: "results (base branch)", path: "~/${{ github.repository }}/main/results"}
- {artifact_name: "validator-metadata", path: "~/${{ github.repository }}/validator-metadata.yml"}
steps:
- name: Upload artifacts - ${{ matrix.artifact_name }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: |
${{ matrix.path }}
${{ matrix.path }}
if-no-files-found: error
retention-days: 90

Expand All @@ -47,17 +47,17 @@ jobs:
needs: upload-artifacts
runs-on: ubuntu-latest
steps:
- uses: lkstrp/pypsa-validator@main
with:
step: create-comment
snakemake_config: config/config.yaml
- uses: lkstrp/pypsa-validator@main
with:
step: create-comment
snakemake_config: config/config.yaml
# The path starting from prefix in config
# For plot results/<prefix>/<scenario>/<plot_name>.png pass
# <scenario>/<plot_name>.png
plots: >
"
KN2045_Bal_v4/ariadne/primary_energy.png
KN2045_Bal_v4/ariadne/secondary_energy.png
KN2045_Bal_v4/ariadne/final_energy.png
"
repo_private_key: ${{ secrets.REPO_PLOTS_PRIVATE_KEY }}
plots: >
"
KN2045_Bal_v4/ariadne/primary_energy.png
KN2045_Bal_v4/ariadne/secondary_energy.png
KN2045_Bal_v4/ariadne/final_energy.png
"
repo_private_key: ${{ secrets.REPO_PLOTS_PRIVATE_KEY }}
95 changes: 67 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,83 @@
exclude: "^LICENSES"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: mixed-line-ending
- id: check-yaml
- id: check-merge-conflict
- id: trailing-whitespace
- id: check-added-large-files
args: ['--maxkb=2000']
- repo: https://github.com/psf/black
rev: 22.3.0
args: ["--maxkb=2000"]

# Sort package imports alphabetically
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]

# Convert relative imports to absolute imports
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports

# Find common spelling mistakes in comments and docstrings
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ['--ignore-regex="(\b[A-Z]+\b)"', '--ignore-words-list=fom,appartment,bage,ore,setis,tabacco,berfore,vor'] # Ignore capital case words, e.g. country codes
types_or: [python, rst, markdown]
files: ^(scripts|doc)/

# Make docstrings PEP 257 compliant
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
args: ["--in-place", "--make-summary-multi-line", "--pre-summary-newline"]

- repo: https://github.com/keewis/blackdoc
rev: v0.3.9
hooks:
- id: blackdoc

# Formatting with "black" coding style
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
hooks:
# Format Python files
- id: black
# Format Jupyter Python notebooks
- id: black-jupyter

# Remove output from Jupyter notebooks
- repo: https://github.com/aflc/pre-commit-jupyter
rev: v1.2.1
hooks:
- id: jupyter-notebook-cleanup
args: ["--remove-kernel-metadata"]

# Do YAML formatting (before the linter checks it for misses)
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, "2", --preserve-quotes]

# Format Snakemake rule / workflow files
- repo: https://github.com/snakemake/snakefmt
rev: v0.6.0
rev: v0.10.2
hooks:
- id: snakefmt
- repo: https://github.com/jonasbb/pre-commit-latex-hooks
rev: v1.3.0
hooks:
- id: american-eg-ie
- id: cleveref-capitalization
- id: consistent-spelling
args:
[
"--emph=et al.",
'--regex=naive=\bna(i|\\"i)ve',
'--regex=optimisation=\boptimi(s|z)ation',
]
- id: ensure-labels-for-sections
- id: no-space-in-cite
- id: tilde-cite
- id: unique-labels
# - repo: https://github.com/fsfe/reuse-tool
# rev: latest
# hooks:
# - id: reuse

# For cleaning jupyter notebooks
- repo: https://github.com/aflc/pre-commit-jupyter
rev: v1.2.1
hooks:
- id: jupyter-notebook-cleanup
exclude: examples/solve-on-remote.ipynb
2 changes: 1 addition & 1 deletion .syncignore-send
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ __pycache__
.ipynb_checkpoints
.vscode
resources
results
results
1 change: 0 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ authors:
- family-names: Your surname
given-names: Christoph Tries
orcid: https://orcid.org/0009-0000-2425-0993

1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

- fix the hydrogen import boundary condition
- add primary oil bus and account for refinery emissions
- added Changelog file
1 change: 0 additions & 1 deletion ariadne-data/costs_2025-modifications.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ offwind-ac-connection-submarine,investment,4225,EUR2020/MW/km,NEP2023,"equal to
offwind-ac-connection-underground,investment,1215,EUR2020/MW/km,NEP2023,"equal to AC overhead"
offwind-float-station,investment,700,EUR2020/kW,NEP2023,"cost of two stations"
offwind-dc-station,investment,700,EUR2020/kW,NEP2023,"cost of two stations"

1 change: 0 additions & 1 deletion ariadne-data/costs_2035-modifications.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ offwind-ac-connection-submarine,investment,4225,EUR2020/MW/km,NEP2023,"equal to
offwind-ac-connection-underground,investment,1215,EUR2020/MW/km,NEP2023,"equal to AC overhead"
offwind-float-station,investment,700,EUR2020/kW,NEP2023,"cost of two stations"
offwind-dc-station,investment,700,EUR2020/kW,NEP2023,"cost of two stations"

1 change: 0 additions & 1 deletion ariadne-data/costs_2040-modifications.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ offwind-ac-connection-submarine,investment,4225,EUR2020/MW/km,NEP2023,"equal to
offwind-ac-connection-underground,investment,1215,EUR2020/MW/km,NEP2023,"equal to AC overhead"
offwind-float-station,investment,700,EUR2020/kW,NEP2023,"cost of two stations"
offwind-dc-station,investment,700,EUR2020/kW,NEP2023,"cost of two stations"

1 change: 0 additions & 1 deletion ariadne-data/costs_2045-modifications.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ offwind-ac-connection-submarine,investment,4225,EUR2020/MW/km,NEP2023,"equal to
offwind-ac-connection-underground,investment,1215,EUR2020/MW/km,NEP2023,"equal to AC overhead"
offwind-float-station,investment,700,EUR2020/kW,NEP2023,"cost of two stations"
offwind-dc-station,investment,700,EUR2020/kW,NEP2023,"cost of two stations"

1 change: 0 additions & 1 deletion ariadne-data/costs_2050-modifications.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ offwind-ac-connection-submarine,investment,4225,EUR2020/MW/km,NEP2023,"equal to
offwind-ac-connection-underground,investment,1215,EUR2020/MW/km,NEP2023,"equal to AC overhead"
offwind-float-station,investment,700,EUR2020/kW,NEP2023,"cost of two stations"
offwind-dc-station,investment,700,EUR2020/kW,NEP2023,"cost of two stations"

2 changes: 1 addition & 1 deletion config/config.personal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ private:

remote:
ssh: ""
path: ""
path: ""
16 changes: 8 additions & 8 deletions config/config.public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ run:
enable: true
manual_file: config/scenarios.public.yaml
file: config/scenarios.automated.yaml
shared_resources:
shared_resources:
policy: base #stops recalculating
exclude:
- existing_heating.csv # specify files which should not be shared between scenarios
- costs
- retrieve_cost # This is necessary to save retrieve_cost_data_{year}.log in the correct folder
- existing_heating.csv # specify files which should not be shared between scenarios
- costs
- retrieve_cost # This is necessary to save retrieve_cost_data_{year}.log in the correct folder

iiasa_database:
db_name: ariadne
Expand All @@ -28,8 +28,8 @@ iiasa_database:
transport_stock: DLR-VECTOR21
industry: FORECAST v1.0
scenarios:
- 8Gt_Bal_v3
- 8Gt_Elec_v3
- 8Gt_H2_v3
- 8Gt_Bal_v3
- 8Gt_Elec_v3
- 8Gt_H2_v3
reference_scenario: 8Gt_Bal_v3
region: Deutschland
region: Deutschland
Loading

0 comments on commit 82bc3ff

Please sign in to comment.