Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 30 additions & 12 deletions .github/workflows/tests-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,70 @@ name: "Tests & Coverage"

on: [push]

# Cancel jobs on new push
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:

queue:
runs-on: ubuntu-latest
steps:
- name: Turnstyle
uses: softprops/turnstyle@v3
with:
same-branch-only: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build:
name: "${{ matrix.name-suffix }} at py${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
needs: queue

strategy:
fail-fast: false
matrix:
include:
# Coverage job (Linux only)
- name-suffix: "coverage"
os: ubuntu-latest
python-version: 3.9

# Basic test matrix
- name-suffix: "basic"
os: ubuntu-latest
python-version: "3.10"

- name-suffix: "basic"
os: ubuntu-latest
python-version: 3.11

- name-suffix: "basic"
os: windows-latest
python-version: 3.9

steps:
- name: Checkout repo
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up julia
# Julia is only needed on Linux
- name: Set up Julia
if: runner.os == 'Linux'
uses: julia-actions/setup-julia@v2
with:
version: "1.6"

- name: Install packages (Linux)
# Linux package installation (classic pip install)
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
pip install --upgrade pip wheel setuptools
pip install -e "."

- name: Install packages (Windows)
# Windows package installation via Conda environment file
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
uses: conda-incubator/setup-miniconda@v3
with:
Expand All @@ -61,23 +76,26 @@ jobs:
environment-file: eDisGo_env_dev.yml
python-version: ${{ matrix.python-version }}

- name: Run tests Linux
# Run standard tests on Linux
- name: Run tests (Linux)
if: runner.os == 'Linux' && matrix.name-suffix != 'coverage'
run: |
python -m pip install pytest pytest-notebook
python -m pytest --runslow --runonlinux --disable-warnings --color=yes -v
env:
TOEP_TOKEN_KH: ${{ secrets.TOEP_TOKEN_KH }}

- name: Run tests Windows
# Run standard tests on Windows
- name: Run tests (Windows)
if: runner.os == 'Windows'
run: |
python -m pip install pytest pytest-notebook
python -m pytest --runslow --disable-warnings --color=yes -v
env:
TOEP_TOKEN_KH: ${{ secrets.TOEP_TOKEN_KH }}

- name: Run tests, coverage and send to coveralls
# Run coverage job and upload to Coveralls (only on Linux, Python 3.9)
- name: Run tests with coverage and submit to Coveralls
if: runner.os == 'Linux' && matrix.python-version == 3.9 && matrix.name-suffix == 'coverage'
run: |
pip install pytest pytest-notebook coveralls
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

[![Coverage Status](https://coveralls.io/repos/github/openego/eDisGo/badge.svg?branch=dev)](https://coveralls.io/github/openego/eDisGo?branch=dev)
[![Tests & coverage](https://github.com/openego/eDisGo/actions/workflows/tests-coverage.yml/badge.svg)](https://github.com/openego/eDisGo/actions/workflows/tests-coverage.yml)
![Python Versions](https://img.shields.io/badge/python-3.9%20|%203.10%20|%203.11-blue)



# eDisGo
Expand Down
3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def setup(sphinx):
"networkx.%s",
),
"sqlalchemy": (
"https://docs.sqlalchemy.org/en/latest/core/connections.html#%s",
"https://docs.sqlalchemy.org/en/20/core/connections.html#%s",
"sqlalchemy.%s",
),
"numpy": (
Expand Down Expand Up @@ -143,6 +143,7 @@ def setup(sphinx):
r"https://stackoverflow.com*",
r"https://support.gurobi.com/*",
r"https://www.gnu.org/licenses/",
r"https://www.mdpi.com/*",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion doc/features_in_detail.rst
Original file line number Diff line number Diff line change
Expand Up @@ -430,4 +430,4 @@ References

.. [HoerschBrown] `Jonas Hörsch, Tom Brown: The role of spatial scale in joint optimisations of
generation and transmission for European highly renewable scenarios
<https://arxiv.org/pdf/1705.07617.pdf>`_
<https://arxiv.org/abs/1705.07617>`_
2 changes: 1 addition & 1 deletion doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Installation Steps
1. Install Julia 1.6.7


Download Julia 1.6.7 from the `Julia LTS releases page <https://julialang.org/downloads/#long_term_support_release>`_.
Download Julia 1.6.7 from the `Julia downloads page <https://julialang.org/downloads/>`_.

Install Julia by following the instructions in the `Julia installation guide <https://julialang.org/downloads/platform/#linux_and_freebsd>`_. Make sure to add Julia to your system path.

Expand Down
25 changes: 25 additions & 0 deletions edisgo/config/config_grid_expansion_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,31 @@ lv_load_case_line = 1.0
lv_feed-in_case_transformer = 1.0
lv_feed-in_case_line = 1.0

# §14a EnWG curtailment
# =====================
# Settings for curtailment of controllable consumption devices according to §14a EnWG
# as an alternative to grid expansion

[curtailment_14a_enwg]

# enable_curtailment: whether to consider §14a curtailment as an option in grid
# reinforcement. If True, curtailment can be used instead of grid expansion
# to solve grid issues.
enable_curtailment = True

# max_power_kw: maximum allowed power in kW after curtailment according to §14a EnWG.
# The legal default is 4.2 kW for controllable consumption devices.
max_power_kw = 4.2

# curtailment_priority: defines how to prioritize components for curtailment.
# Options: 'p_set' (largest nominal power first), 'random', 'grid_level'
# (start with LV, then MV)
curtailment_priority = p_set

# components_type: which types of components can be curtailed.
# Options: 'heat_pump', 'charging_point', 'both'
components_type = both

# costs
# ============

Expand Down
Loading
Loading