Skip to content

Commit

Permalink
Merge pull request #479 from e2nIEE/develop
Browse files Browse the repository at this point in the history
release 0.8.0
  • Loading branch information
SimonRubenDrauz authored Jan 5, 2023
2 parents f9b7cb0 + 5ab1e63 commit 5e58da7
Show file tree
Hide file tree
Showing 204 changed files with 21,880 additions and 1,068 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ exclude_lines =
omit =
pandapipes/test/*
pandapipes/plotting/geo.py
pandapipes/converter/stanet/data_cleaning.py
106 changes: 106 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# A coverage report will be created for the Python 3.8 version
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: release

# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
upload_server:
description: 'upload server'
required: true
default: 'testpypi'
type: choice
options:
- 'testpypi'
- 'pypi'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
upload:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Sets up python3
- uses: actions/setup-python@v2
with:
python-version: '3.10'
# Installs and upgrades pip, installs other dependencies and installs the package from setup.py
- name: Install dependencies
run: |
# Upgrade pip
python3 -m pip install --upgrade pip
# Install twine
python3 -m pip install setuptools wheel twine
# Upload to TestPyPI
- name: Build and Upload to TestPyPI
if: ${{ inputs.upload_server == 'testpypi'}}
run: |
python3 setup.py sdist --formats=zip
twine check dist/* --strict
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TESTPYPI }}
TWINE_REPOSITORY: testpypi

# Upload to PyPI
- name: Build and Upload to PyPI
if: ${{ inputs.upload_server == 'pypi' }}
run: |
python3 setup.py sdist --formats=zip
twine check dist/* --strict
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI }}
TWINE_REPOSITORY: pypi

- name: Sleep for 300s to make release available
uses: juliangruber/sleep-action@v1
with:
time: 300s

build:

runs-on: ${{ matrix.os }}
needs: upload
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies TestPyPI
if: ${{ inputs.upload_server == 'testpypi'}}
run: |
python -m pip install --upgrade pip
python -m pip install pytest nbmake python-igraph pytest-split numba
pip install --no-cache-dir -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pandapipes[all]
- name: Install dependencies PyPI
if: ${{ inputs.upload_server == 'pypi'}}
run: |
python -m pip install --upgrade pip
python -m pip install pytest nbmake python-igraph pytest-split numba
pip install pandapipes
- name: List all installed packages
run: |
pip list
- name: Test with pytest
run: |
pytest
pytest --nbmake -n=auto "./tutorials"
24 changes: 23 additions & 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
python -m pip install pytest python-igraph pytest-split numba shapely
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 Expand Up @@ -106,3 +106,25 @@ jobs:
- name: Test with pytest
run: |
pytest --nbmake -n=auto "./tutorials"
docs_check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8' ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Check docs for Python ${{ matrix.python-version }}
uses: e2nIEE/sphinx-action@master
with:
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 ."
build-command: "sphinx-build -b html source _build -W"
docs-folder: "doc/"
24 changes: 23 additions & 1 deletion .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 flake8 pytest python-igraph
python -m pip install pytest python-igraph pytest-split numba shapely
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 @@ -74,3 +74,25 @@ jobs:
- name: Test with pytest
run: |
pytest --nbmake -n=auto "./tutorials"
docs_check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8' ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Check docs for Python ${{ matrix.python-version }}
uses: e2nIEE/sphinx-action@master
with:
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 ."
build-command: "sphinx-build -b html source _build -W"
docs-folder: "doc/"
10 changes: 8 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Copyright (c) 2020-2022 by Fraunhofer Institute for Energy Economics
Copyright (c) 2020-2023 by Fraunhofer Institute for Energy Economics
and Energy System Technology (IEE), Kassel, and University of Kassel. All rights reserved.

Lead Developers:
- Dennis Cronbach
- Daniel Lohmeier
- Simon Ruben Drauz
- Jolando Marius Kisse
Expand All @@ -16,7 +15,14 @@ Further Contributions by:
- Christian Spalthoff
- Daniel Then
- Marius Schenk
- Natalia Sanina
- Erik Prade

Coordination:
- Tanja Manuela Kneiske
- Lars Lauven
- Jan Ulffers
- Martin Braun

Alumni:
- Dennis Cronbach (until July 2022)
32 changes: 30 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
Change Log
=============

[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.
- [ADDED] new component `mass_storage` and tutorial how to use it
- [ADDED] a stanet converter has been added incl. a stanet converter documentation
- [ADDED] in the course of the stanet converter release a component called valve-pipe was introduced. It is a combination of a valve and a pipe
- [ADDED] automated release process
- [ADDED] documentation added for circulation pumps of any kind, compressors, flow controller, pressure controller and mass storage
- [ADDED] adding property based on the sutherland model as additional FluidProperty
- [ADDED] besides regression models it is also possible to use interpolation models in case of StdTypes
- [ADDED] enable bulk creation of flow controls and ext grids
- [ADDED] toolbox function to extract the _pit (pandapipes internal tables) structure for nodes and branches as pandas tables with meaningful names for the stored columns as given in the node_idx and branch_idx files
- [ADDED] new global variable `__format_version__` that shall only be increased in case of API changes (i.e. if the convert_format function for JSON I/O must be called)
- [ADDED] documentation check which is able to throw errors in case of warnings
- [ADDED] example networks including new component types for the convert_format test
- [CHANGED] circ pump is now a branch component
- [CHANGED] default roughness parameter `k_mm` for pipes is now 0.2 mm instead of 1 mm (all create_pipe... functions)
- [CHANGED] instead of from and to junction, in case of circulation pumps it is called return and flow junction from now on
- [CHANGED] suffix 'flow' added to input variable p, t an mass in case of circulation pumps
- [CHANGED] ctrl/ts_variables dict in multinet gets an intermediate level 'nets', so that the structure is similar to Multinet ADict
- [CHANGED] order of the pump entries was adapted (v, p, degree)
- [CHANGED] by default p and t are set to None in case of ext grids. Based on the type selected, p and t must be adapted accordingly. If set to 'auto', based on the given p and t values, the type is set
- [CHANGED] 'auto' can also be set for type in case of circulation pumps. The behavior is the same as in case of ext grids
- [CHANGED] authors list adapted
- [CHANGED] as of now, not one but two example nets (water and gas) will be created for the convert_format test (ensure backward compatibility when loading nets from jsons)
- [FIXED] the references to pipeflow procedures have changed. Caused problems in the documentation
- [FIXED] removed unused import of 'progress_bar' from pandapower which caused import problems

[0.7.0] - 2022-08-02
-------------------------------
- [ADDED] automated test with Python 3.10 added to GitHub Actions CI (now Python 3.7 - 3.10)
Expand All @@ -26,8 +54,8 @@ Change Log

[0.6.0] - 2022-02-07
-------------------------------
- [ADDED] Adding pressure controller as new component
- [ADDED] Adding compressor as new component
- [ADDED] Adding `pressure controller` as new component
- [ADDED] Adding `compressor` as new component
- [ADDED] Compressing power of a pump component are returned as result
- [ADDED] Adding polynomial fluids
- [CHANGED] Removing irrelevant results in branch models with zero length (mean velocity, lambda, reynolds)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020-2022 by Fraunhofer Institute for Energy Economics
Copyright (c) 2020-2023 by Fraunhofer Institute for Energy Economics
and Energy System Technology (IEE), Kassel, and University of Kassel. Further
contributions by individual contributors (see AUTHORS file for details). All rights reserved.

Expand Down
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
include LICENSE AUTHORS README.rst CHANGELOG.rst .travis.yml .github/**/*.yml
include LICENSE AUTHORS README.rst CHANGELOG.rst .github/**/*.yml
global-include *.json
global-include *.csv
global-include *.txt

prune doc*
prune tutorials*
4 changes: 4 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sphinx>=5.3.0
sphinx_rtd_theme>=1.1.1
numpydoc>=1.5.0
sphinxcontrib.bibtex>=2.5.0
Empty file added doc/source/_static/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion doc/source/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ for the analysis and optimization of piping grids.
|br|

More information about pandapipes can be found on `www.pandapipes.org <https://www.pandapipes.org>`_
or in our publication :cite:`Lohmeier2020`
or in our publication :cite:`Lohmeier2020`. Please cite the paper if you use pandapipes.

About pandapipes:

Expand Down
2 changes: 1 addition & 1 deletion doc/source/about/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ License
pandapipes is published under the following 3-clause BSD license: ::


Copyright (c) 2020 by Fraunhofer Institute for Energy Economics and
Copyright (c) 2020-2023 by Fraunhofer Institute for Energy Economics and
Energy System Technology (IEE) Kassel and individual contributors
(see AUTHORS file for details). All rights reserved.

Expand Down
10 changes: 7 additions & 3 deletions doc/source/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ and types of included elements and the fluid. Further explanation, also on addit
is stored in the pandapipesNet, can be found in the `pandapipes-paper <https://doi.org/10.3390/su12239899>`_
:cite:`Lohmeier2020`.

pandapipes provides thermo-hydraulic models for 9 elements, for each of which you can find
detailed information about the definition and interpretation of the parameters in the
pandapipes provides thermo-hydraulic models for several component types, for each of which you can
find detailed information about the definition and interpretation of the parameters in the
following documentation:


Expand All @@ -34,8 +34,12 @@ following documentation:
components/valve/valve_component
components/sink/sink_component
components/source/source_component
components/storage/storage_component
components/ext_grid/ext_grid_component
components/heat_exchanger/heat_exchanger_component
components/pump/pump_component
components/circulation_pump_mass/circ_pump_mass_component
components/circulation_pump_pressure/circ_pump_pressure_component
components/heat_exchanger/heat_exchanger_component
components/compressor/compressor_component
components/press_control/press_control_component
components/flow_control/flow_control_component
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ Component Table Data
Physical Model
==============

Coming soon!
The circulation pump is a component that controls the flow in a looped network. At its outlet (the flow side),
it induces a pressure and temperature level just like an external grid. At the inlet (the return side), it induces
a mass flow which should be the same as the mass flow into the system.


Result Table Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
**Parameter**;**Datatype**;**Value Range**;**Explanation**
name;string;;Name of the pump
from_junction;integer;:math:`>` 0;Index of junction at which the pump starts
to_junction;integer;:math:`>` 0;Index of junction at which the pump ends
p_bar;float;:math:`>` 0;Pressure set point [bar]
p_lift_bar;float;:math:`>` 0;Pressure lift induced by the pump [bar]
t_k;float;:math:`>` 0;Temperature set point [K]
return_junction;integer;:math:`>` 0;Index of junction on the return side (where the pump starts)
flow_junction;integer;:math:`>` 0;Index of junction on the flow side (where the pump ends)
p_flow_bar;float;:math:`>` 0;Pressure set point at the pump outlet (at flow side) [bar]
mdot_flow_kg_per_s;float;:math:`>` 0;Mass flow transported by the pump [kg/s]
t_flow_k;float;:math:`>` 0;Temperature set point (at flow side) [K]
in_serivce;boolean;True / False;True for in service or False for out of service
type;string;;Type variable to classify the pump
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
**Parameter**;**Datatype**;**Explanation**
deltap_bar;float;The pressure lift caused by the pump [bar]
mdot_kg_per_s;float;The mass flow running through the pump [bar]
mdot_flow_kg_per_s;float;The mass flow running through the pump [bar]
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ Component Table Data
Physical Model
==============

Coming soon!
The circulation pump is a component that controls the flow in a looped network. At its outlet (the flow side),
it induces a pressure and temperature level just like an external grid. At the inlet (the return side), it also
induces a certain pressure, which is defined by the pressure lift parameter. The resulting mass flow through the
loop is identified by the pipeflow algorithm.


Result Table Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
**Parameter**;**Datatype**;**Value Range**;**Explanation**
name;string;;name of the pump
from_junction;integer;:math:`>` 0;index of junction at which the pump starts
to_junction;integer;:math:`>` 0;index of junction at which the pump ends
p_bar;float;:math:`>` 0;pressure set point [bar]
mdot_kg_per_s;float;:math:`>` 0;mass flow transported by the pump [bar]
t_k;float;:math:`>` 0;temperature set point [K]
return_junction;integer;:math:`>` 0;Index of junction on the return side (where the pump starts)
flow_junction;integer;:math:`>` 0;Index of junction on the flow side (where the pump ends)
p_flow_bar;float;:math:`>` 0;Pressure set point at the pump outlet (at flow side) [bar]
p_lift_bar;float;:math:`>` 0;Pressure lift induced by the pump [bar]
t_flow_k;float;:math:`>` 0;Temperature set point (at flow side) [K]
in_serivce;boolean;True/ False;True for in service or False for out of service
type;string;;type variable to classify the pump
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
**Parameter**;**Datatype**;**Explanation**
deltap_bar;float;The pressure lift caused by the pump [bar]
mdot_kg_per_s;float;The mass flow running through the pump [bar]
mdot_flow_kg_per_s;float;The mass flow running through the pump [bar]
Loading

0 comments on commit 5e58da7

Please sign in to comment.