Skip to content

Commit

Permalink
Merge pull request #485 from e2nIEE/hotfix
Browse files Browse the repository at this point in the history
Hotfix - version +0.0.1, docs for collections
  • Loading branch information
SimonRubenDrauz authored Jan 8, 2023
2 parents 5e58da7 + f9a085b commit ddb2548
Show file tree
Hide file tree
Showing 16 changed files with 928 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_tests_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest python-igraph pytest-split numba shapely
python -m pip install pytest python-igraph pytest-split numba
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install git+https://github.com/e2nIEE/pandapower@develop#egg=pandapower
pip install .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_tests_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest python-igraph pytest-split numba shapely
python -m pip install pytest python-igraph pytest-split numba
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install git+https://github.com/e2nIEE/pandapower@master#egg=pandapower
pip install .
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
pre-build-command: "apt-get update -y && apt-get install -y git;
git --version;
python -m pip install --upgrade pip;
python -m pip install git+https://github.com/e2nIEE/pandapower@develop#egg=pandapower;
python -m pip install git+https://github.com/e2nIEE/pandapower@master#egg=pandapower;
python -m pip install ."
build-command: "sphinx-build -b html source _build -W"
docs-folder: "doc/"
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Change Log
=============

[0.8.1] - 2023-01-08
-------------------------------
- [ADDED] shapely as additional requirement (due to the stanet2pandapipes converter)
- [ADDED] missing components in collection docu were added
- [FIXED] undetected failing tests fixed

[0.8.0] - 2023-01-05
-------------------------------
- [ADDED] new component `flow controller`: a branch component that controls the flow through itself. The flow controller component is able to keep its mass flow fixed. It adapts the pressure drop between two junctions to reflect the desired flow situation.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# The short X.Y version.
version = "0.8"
# The full version, including alpha/beta/rc tags.
release = "0.8.0"
release = "0.8.1"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
12 changes: 12 additions & 0 deletions doc/source/plotting/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ fact return more than just one collection:

.. autofunction:: pandapipes.plotting.create_heat_exchanger_collection

.. autofunction:: pandapipes.plotting.create_pump_collection

.. autofunction:: pandapipes.plotting.create_compressor_collection

.. autofunction:: pandapipes.plotting.create_pressure_control_collection

.. autofunction:: pandapipes.plotting.create_flow_control_collection

A bunch of standard collections can be created by :code:`create_simple_collections`.
If the collections should be plotted immediately, use :code:`simple_plot`.

.. autofunction:: pandapipes.plotting.create_simple_collections

Drawing Collections
===================
Expand Down
1 change: 1 addition & 0 deletions doc/source/plotting/simple_plot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Simple Plot
Creating a Simple Network Plot
==============================

.. _simple_plot:
.. autofunction:: pandapipes.plotting.simple_plot


Expand Down
2 changes: 1 addition & 1 deletion pandapipes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# and Energy System Technology (IEE), Kassel, and University of Kassel. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

__version__ = '0.8.0'
__version__ = '0.8.1'
__format_version__ = '0.8.0'

import pandas as pd
Expand Down
22 changes: 8 additions & 14 deletions pandapipes/plotting/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ def create_flow_control_collection(net, flow_controllers=None, size=5., junction
"""
Creates a matplotlib patch collection of pandapipes flow control components.
They are plotted in the center between two junctions and look like a valve with a T on top.
They are plotted in the center between two junctions and look like a valve with a T on top,
if the flow control is active and an I on top, if the flow control is not active.
:param net: The pandapipes network
:type net: pandapipesNet
Expand Down Expand Up @@ -510,9 +511,7 @@ def create_pump_collection(net, pumps=None, table_name='pump', size=5., junction
infofunc=None, picker=False, fj_col="from_junction",
tj_col="to_junction", **kwargs):
"""
Creates a matplotlib patch collection of pandapipes junction-junction valves. Valves are
plotted in the center between two junctions with a "helper" line (dashed and thin) being drawn
between the junctions as well.
Creates a matplotlib patch collection of pandapipes pumps.
:param net: The pandapipes network
:type net: pandapipesNet
Expand Down Expand Up @@ -568,16 +567,14 @@ def create_pump_collection(net, pumps=None, table_name='pump', size=5., junction
def create_pressure_control_collection(net, pcs=None, table_name='press_control',
size=5., junction_geodata=None,
color='k', infofunc=None, picker=False, **kwargs):
"""
Creates a matplotlib patch collection of pandapipes junction-junction valves. Valves are
plotted in the center between two junctions with a "helper" line (dashed and thin) being drawn
between the junctions as well.
"""Creates a matplotlib patch collection of pandapipes pressure controllers.
:param net: The pandapipes network
:type net: pandapipesNet
:param valves: The valves for which the collections are created. If None, all valves which have\
entries in the respective junction geodata will be plotted.
:type valves: list, default None
:param pcs: The pressure controllers for which the collections are created. If None,
all pressure controllers which have entries in the respective junction geodata
will be plotted.
:type pcs: list, default None
:param size: Patch size
:type size: float, default 5.
:param junction_geodata: Coordinates to use for plotting. If None, net["junction_geodata"] is \
Expand All @@ -589,9 +586,6 @@ def create_pressure_control_collection(net, pcs=None, table_name='press_control'
:type infofunc: function, default None
:param picker: Picker argument passed to the patch collection
:type picker: bool, default False
:param fill_closed: If True, valves with parameter opened == False will be filled and those\
with opened == True will have a white facecolor. Vice versa if False.
:type fill_closed: bool, default True
:param kwargs: Keyword arguments are passed to the patch function
:return: lc - line collection, pc - patch collection
Expand Down
412 changes: 412 additions & 0 deletions pandapipes/test/api/old_versions/example_0.8.1_gas.json

Large diffs are not rendered by default.

Loading

0 comments on commit ddb2548

Please sign in to comment.