Skip to content

Commit fa4d506

Browse files
Merge pull request #509 from e2nIEE/hotfix_0.8.4
Hotfix 0.8.4
2 parents af5bdc7 + d14ca6e commit fa4d506

File tree

10 files changed

+908
-24
lines changed

10 files changed

+908
-24
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# A coverage report will be created for the Python 3.8 version
3-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
1+
# This workflow will create a Python package and upload it to testPyPi or PyPi
2+
# Then, it installs pandapipes from there and all dependencies and runs tests with different Python versions
43

54
name: release
65

@@ -20,21 +19,20 @@ on:
2019

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

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

3331
# Sets up python3
34-
- uses: actions/setup-python@v2
32+
- uses: actions/setup-python@v4
3533
with:
3634
python-version: '3.10'
37-
# Installs and upgrades pip, installs other dependencies and installs the package from setup.py
35+
# Installs and upgrades pip, installs twine and other packages for the release-process
3836
- name: Install dependencies
3937
run: |
4038
# Upgrade pip
@@ -80,15 +78,14 @@ jobs:
8078
python-version: ['3.7', '3.8', '3.9', '3.10']
8179
os: [ ubuntu-latest, windows-latest ]
8280
steps:
83-
- uses: actions/checkout@v2
8481
- name: Set up Python ${{ matrix.python-version }}
8582
uses: actions/setup-python@v2
8683
with:
8784
python-version: ${{ matrix.python-version }}
8885
- name: Install dependencies
8986
run: |
9087
python -m pip install --upgrade pip
91-
python -m pip install pytest nbmake python-igraph pytest-xdist pytest-split numba
88+
python -m pip install pytest python-igraph pytest-split numba
9289
- name: Install pandapipes from TestPyPI
9390
if: ${{ inputs.upload_server == 'testpypi'}}
9491
run: |
@@ -102,5 +99,4 @@ jobs:
10299
pip list
103100
- name: Test with pytest
104101
run: |
105-
pytest
106-
pytest --nbmake -n=auto "./tutorials"
102+
pytest --pyargs pandapipes.test

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Change Log
22
=============
33

4+
[0.8.4] - 2023-02-02
5+
-------------------------------
6+
- [FIXED] added flow control to nxgraph
7+
- [FIXED] in case of multiple pumps, there was a bug when calculating pressure
8+
- [FIXED] if all pumps are out of service, the pipeflow did not converge
9+
- [FIXED] remove unnecessary checkout in release.yml and tutorial tests
10+
411
[0.8.3] - 2023-01-09
512
-------------------------------
613
- [FIXED] inconsistency between testpypi and pypi

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
# The short X.Y version.
5050
version = "0.8"
5151
# The full version, including alpha/beta/rc tags.
52-
release = "0.8.3"
52+
release = "0.8.4"
5353

5454
# The language for content autogenerated by Sphinx. Refer to documentation
5555
# for a list of supported languages.

pandapipes/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# and Energy System Technology (IEE), Kassel, and University of Kassel. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
44

5-
__version__ = '0.8.3'
5+
__version__ = '0.8.4'
66
__format_version__ = '0.8.0'
77

88
import pandas as pd

pandapipes/component_models/pump_component.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,11 @@ def adaption_before_derivatives_hydraulic(cls, net, branch_pit, node_pit, idx_lo
8989
else:
9090
v_mean = v_mps
9191
vol = v_mean * area
92-
fcts = itemgetter(*std_types)(net['std_types']['pump'])
93-
fcts = [fcts] if not isinstance(fcts, tuple) else fcts
94-
pl = np.array(list(map(lambda x, y: x.get_pressure(y), fcts, vol)))
95-
pump_pit[:, PL] = pl
92+
if len(std_types):
93+
fcts = itemgetter(*std_types)(net['std_types']['pump'])
94+
fcts = [fcts] if not isinstance(fcts, tuple) else fcts
95+
pl = np.array(list(map(lambda x, y: x.get_pressure(y), fcts, vol)))
96+
pump_pit[:, PL] = pl
9697

9798
@classmethod
9899
def calculate_temperature_lift(cls, net, branch_component_pit, node_pit):

pandapipes/std_types/std_type_class.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ def get_pressure(self, vdot_m3_per_s):
196196
"Bypassing without pressure change is assumed" % str(self.name))
197197
mask = vdot_m3_per_s >= 0
198198
# no negative pressure lift - bypassing always allowed:
199-
results[mask] = np.where(mask, sum(self.reg_par * (vdot_m3_per_s[mask] * 3600) ** (n - 1)), 0)
199+
results[mask] = \
200+
np.where(mask, np.sum(self.reg_par * (vdot_m3_per_s[mask][:, None] * 3600) ** (n - 1), axis=1), 0)
200201
else:
201202
if vdot_m3_per_s < 0:
202203
logger.debug("Reverse flow observed in a %s pump. "

pandapipes/test/api/old_versions/example_0.8.4_gas.json

Lines changed: 412 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)