Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:openego/eDisGo into feature/#274-imp…
Browse files Browse the repository at this point in the history
…rove-rtd-doc
  • Loading branch information
maike93he committed Jan 11, 2023
2 parents 9ffb792 + a01d0e5 commit af0d48c
Show file tree
Hide file tree
Showing 123 changed files with 20,600 additions and 69,322 deletions.
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ Please delete options that are not relevant.
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] The Read the Docs documentation is compiling correctly
- [ ] If new packages are needed, I added them the [setup.py](https://github.com/openego/eDisGo/blob/dev/setup.py), and if needed the [rtd_requirements.txt](https://github.com/openego/eDisGo/blob/dev/rtd_requirements.txt), the [eDisGo_env.yml](https://github.com/openego/eDisGo/blob/dev/eDisGo_env.yml) and the [eDisGo_env_dev.yml](https://github.com/openego/eDisGo/blob/dev/eDisGo_env_dev.yml).
- [ ] I have added new features to the corresponding [whatsnew](https://github.com/openego/eDisGo/tree/dev/doc/whatsnew) file
82 changes: 59 additions & 23 deletions .github/workflows/tests-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,69 @@
# Tests with pytest the package and monitors the covarage and sends it to coveralls.io
# Coverage is only send to coveralls.io when no pytest tests fail
name: "Tests & coverage"
name: "Tests & Coverage"

on: [push]

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

jobs:
build:
runs-on: ubuntu-latest
name: "${{ matrix.name-suffix }} at py${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.8', '3.9' ]
include:
- name-suffix: "coverage"
os: ubuntu-latest
python-version: 3.8
- name-suffix: "basic"
os: ubuntu-latest
python-version: 3.9
- name-suffix: "basic"
os: windows-latest
python-version: 3.8

steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install -e $GITHUB_WORKSPACE[full]
pip3 install coveralls
- name: Run coverage
run: |
coverage run --source=edisgo -m pytest --runslow -vv
- name: Run coveralls
run: |
coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
- name: Checkout repo
uses: actions/checkout@v3

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

- name: Install packages (Linux)
if: runner.os == 'Linux'
run: |
pip install --upgrade pip wheel setuptools
pip install -e "."
- name: Install packages (Windows)
if: runner.os == 'Windows'
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: edisgo_env
environment-file: eDisGo_env_dev.yml
python-version: ${{ matrix.python-version }}

- name: Run tests
if: ${{ !(runner.os == 'Linux' && matrix.python-version == 3.8 && matrix.name-suffix == 'coverage') }}
run: |
python -m pip install pytest pytest-notebook
python -m pytest --runslow --disable-warnings --color=yes -v
- name: Run tests, coverage and send to coveralls
if: runner.os == 'Linux' && matrix.python-version == 3.8 && matrix.name-suffix == 'coverage'
run: |
pip install pytest pytest-notebook coveralls
coverage run --source=edisgo -m pytest --runslow --disable-warnings --color=yes -v
coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
11 changes: 0 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ doc/_html

# exclude egg-info
eDisGo.egg-info/
/examples/Exemplary_PyPSA_bus_results.csv
/examples/Exemplary_PyPSA_line_results.csv

# exclude directories
/examples/edisgo2pypsa_export/*
/examples/data/
/examples/ding0_example_grid/

# exclude check scripts
/examples/compare_graphs.py
/examples/compare_pypsa_network.py

# exclude .json files in opf
/edisgo/opf/edisgo_scenario_data/*.json
Expand Down
12 changes: 8 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 22.8.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
rev: 5.0.4
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
Expand All @@ -19,10 +19,14 @@ repos:
- id: isort
name: isort (python)
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
rev: v2.38.0
hooks:
- id: pyupgrade
#- repo: https://github.com/pycqa/pylint
# rev: pylint-2.6.0
# hooks:
# - id: pylint
- repo: https://github.com/kynan/nbstripout
rev: 0.6.0
hooks:
- id: nbstripout
8 changes: 8 additions & 0 deletions doc/api/edisgo.flex_opt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ edisgo.flex\_opt.exceptions module
:undoc-members:
:show-inheritance:

edisgo.flex\_opt.heat_pump_operation module
---------------------------------------------

.. automodule:: edisgo.flex_opt.heat_pump_operation
:members:
:undoc-members:
:show-inheritance:

edisgo.flex\_opt.q\_control module
-----------------------------------

Expand Down
8 changes: 8 additions & 0 deletions doc/api/edisgo.network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ edisgo.network.grids module
:undoc-members:
:show-inheritance:

edisgo.network.heat module
---------------------------

.. automodule:: edisgo.network.heat
:members:
:undoc-members:
:show-inheritance:

edisgo.network.results module
-----------------------------

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
# built documents.
#
# The short X.Y version.
version = "0.1.1"
version = "0.2.0"
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
2 changes: 1 addition & 1 deletion doc/dev_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Activate the newly created environment and install the pre-commit hooks with:
conda activate eDisGo_env_dev
pre-commit install # install pre-commit hooks
This will install eDisGo with all it's dependencies.
This will install eDisGo with all its dependencies.

Installation using MacOS
~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion doc/equipment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The following tables hold all data of cables, lines and transformers used.
:file: ../edisgo/equipment/equipment-parameters_LV_cables.csv
:delim: ,
:header-rows: 2
:widths: 3, 1, 1, 1, 1
:widths: 3, 1, 1, 1, 1, 1
:stub-columns: 0

.. _mv_cables_table:
Expand Down
57 changes: 57 additions & 0 deletions doc/features_in_detail.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,63 @@ It is also possible to curtail specific generators internally, though a user fri
where :math:`c_{target,t}` is the given curtailment target (power) for timestep :math:`t` to be allocated
to the generators.

.. _electromobility-integration-label:

Electromobility integration
----------------------------

The import and integration of electromobility data is implemented in :py:func:`~edisgo.io.electromobility_import`.

Allocation of charging demand
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The allocation of charging processes to charging stations is implemented in
:py:func:`~edisgo.io.electromobility_import.distribute_charging_demand`.
After electromobility data is loaded, the charging demand from SimBEV is allocated to potential charging parks
from TracBEV. The allocation of the charging processes to the charging infrastructure is carried out with the
help of the weighting factor of the potential charging parks determined by TracBEV. This involves a random and
weighted selection of one charging park per charging process. In the case of private charging infrastructure, a
separate charging point is set up for each electric vehicle (EV). All charging processes of the respective EV and charging use case
are assigned to this charging point. The allocation of private charging processes to charging stations is
implemented in :py:func:`~edisgo.io.electromobility_import.distribute_private_charging_demand`.

For public charging infrastructure, the allocation is made explicitly per charging process. For each charging
process it is determined whether a suitable charging point is already available. For this purpose it is checked
whether the charging point is occupied by another EV in the corresponding period and whether it can provide the
corresponding charging capacity. If no suitable charging point is available, a charging point is determined
randomly and weighted in the same way as for private charging. The allocation of public charging processes to
charging stations is implemented in :py:func:`~edisgo.io.electromobility_import.distribute_public_charging_demand`.

.. _charging_strategies-label:

Charging strategies
^^^^^^^^^^^^^^^^^^^^^^^^

eDisGo right now provides three charging strategy methodologies called 'dumb', 'reduced' and 'residual', that
are implemented in :py:mod:`~edisgo.flex_opt.charging_strategies`.
The aim of the charging strategies 'reduced' and 'residual' is to generate the most grid-friendly charging behavior possible without
restricting the convenience for end users. Therefore, the boundary condition of all charging strategies is that
the charging requirement of each charging process must be fully covered. This means that charging processes can
only be flexibilised if the EV can be fully charged while it is stationary. Furthermore, only private
charging processes can be used as a flexibility, since the fulfillment of the service is the priority for public
charging processes.

'dumb'
""""""""""""""""""
In this charging strategy the cars are charged directly after arrival with the maximum possible charging capacity.

'reduced'
""""""""""""""""""
This is a preventive charging strategy. The cars are charged directly after arrival with the minimum possible
charging power. The minimum possible charging power is determined by the parking time and the parameter
minimum_charging_capacity_factor.

'residual'
""""""""""""""""""
This is an active charging strategy. The cars are charged when the residual load in the MV grid is lowest
(high generation and low consumption). Charging processes with a low flexibility are given priority.


.. _storage-integration-label:

Storage integration
Expand Down
18 changes: 2 additions & 16 deletions doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Getting started
Installation using Linux
-------------------------

.. warning:: Make sure to use python 3.7 or higher!
.. warning:: Make sure to use python 3.8 or higher!

Install latest eDisGo version through pip. Therefore, we highly recommend using
a virtual environment and its pip.
Expand All @@ -15,25 +15,13 @@ a virtual environment and its pip.
python -m pip install edisgo
The above will install all packages for the basic usage of eDisGo. To install
additional packages e.g. needed to create plots with background maps or to run
the jupyter notebook examples, we provide installation with extra packages:

.. code-block:: bash
python -m pip install edisgo[geoplot] # for plotting with background maps
python -m pip install edisgo[examples] # to run examples
python -m pip install edisgo[dev] # developer packages
python -m pip install edisgo[full] # combines all of the extras above
You may also consider installing a developer version as detailed in
:ref:`dev-notes`.

Installation using Windows
--------------------------

.. warning:: Make sure to use python 3.7 or higher!
.. warning:: Make sure to use python 3.8 or higher!

For Windows users we recommend using Anaconda and to install the geo stack
using the conda-forge channel prior to installing eDisGo. You may use the provided
Expand All @@ -50,8 +38,6 @@ Activate the newly created environment with:
conda activate eDisGo_env
This will install eDisGo with all it's dependencies ([full] flag).

Installation using MacOS
--------------------------

Expand Down
Loading

0 comments on commit af0d48c

Please sign in to comment.