Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into issues/1785-remove…
Browse files Browse the repository at this point in the history
…-deprecations
  • Loading branch information
KS-HTK committed Dec 19, 2024
2 parents 84a0d27 + a99f884 commit 4fb8ab8
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 17 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/upload_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ name: upload
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
push:
branches:
- master
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:
Expand All @@ -31,10 +38,23 @@ jobs:
# Upgrade pip
python3 -m pip install --upgrade pip
# Install twine
python3 -m pip install setuptools wheel twine
python3 -m pip install build setuptools wheel twine
# Upload to TestPyPI
- name: Build and Upload to TestPyPI
if: ${{ inputs.upload_server == 'testpypi' }}
run: |
python3 -m build
python3 -m 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 -m build
python3 -m twine check dist/* --strict
Expand All @@ -59,7 +79,7 @@ jobs:
ref_name: develop


# Run an install for testing
# Run an installation for testing
- name: Install pandapower from PyPI
run: |
python3 -m pip install pandapower
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Change Log

[upcoming release] - 2024-..-..
-------------------------------
- [FIXED] cim2pp add missing description to dcline
- [ADDED] pandas series accessor for geo column
- [FIXED] Increasing geojson precision as the default precision might cause problems with pandahub
- [ADDED] converter for European EHV grid data from JAO, the "Single Allocation Platform (SAP) for all European Transmission System Operators (TSOs) that operate in accordance to EU legislation"
Expand Down Expand Up @@ -87,6 +88,7 @@ Change Log
- [ADDED] fix lengths missmatch of output if ignore_zero_length is False in plotting utility function coords_from_node_geodata() and rename ignore_zero_length by ignore_no_geo_diff
- [ADDED] converter for European EHV grid data from JAO, the "Single Allocation Platform (SAP) for all European Transmission System Operators (TSOs) that operate in accordance to EU legislation"
- [ADDED] cim2pp converter: Using lxml to parse XML files (better performance)
- [FIXED] OC relay name attribute error

[2.14.11] - 2024-07-08
-------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pandapower/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import importlib.metadata

__version__ = importlib.metadata.version("pandapower")
__format_version__ = "3.0.0"
__format_version__ = "3.0.0.dev0"
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _prepare_dc_line_segments_cim16(self) -> pd.DataFrame:
# now join with the terminals
dc_line_segments = pd.merge(self.cimConverter.cim['eq']['DCLineSegment'], self.cimConverter.bus_merge,
how='left', on='rdfId')
dc_line_segments = dc_line_segments[['rdfId', 'name', 'ConnectivityNode', 'sequenceNumber']]
dc_line_segments = dc_line_segments[['rdfId', 'name', 'description', 'ConnectivityNode', 'sequenceNumber']]
dc_line_segments[sc['o_cl']] = 'DCLineSegment'
# now dc_line_segments looks like:
# rdfId name rdfId_Terminal connected ...
Expand Down
13 changes: 7 additions & 6 deletions pandapower/plotting/plotly/simple_plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,9 @@ def _simple_plotly_generic(net, respect_separators, use_branch_geodata, branch_w


if __name__ == '__main__':
from pandapower import networks as nw
from pandapower.networks import mv_oberrhein
from pandapower.plotting.plotly.traces import create_weighted_marker_trace
# simple_plotly(net)
# net = nw.example_multivoltage()
# fig = simple_plotly(net, trafo3w_color='k')

net = mv_oberrhein()
net.load.scaling, net.sgen.scaling = 1, 1
# different markers and sizemodes as examples
Expand All @@ -346,5 +343,9 @@ def _simple_plotly_generic(net, respect_separators, use_branch_geodata, branch_w
patch_type="circle-open", sizemode="diameter",
marker_scaling=100, scale_marker_size=[0.2, 0.4])

fig = simple_plotly(net, bus_size=1, aspectratio="original", additional_traces=[markers_sgen,
markers_load])
fig = simple_plotly(
net,
bus_size=1,
aspectratio="original",
additional_traces=[markers_sgen, markers_load]
)
2 changes: 1 addition & 1 deletion pandapower/protection/protection_devices/ocrelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def plot_protection_characteristic(self, net, num=60, xlabel="I [A]", ylabel="ti
plt.grid(True, which="both", ls="-")

def __str__(self):
s = 'Protection Device: %s \nType: %s \nName: %s' % (self.__class__.__name__, self.oc_relay_type, self.name)
s = 'Protection Device: %s \nType: %s \nIndex: %s' % (self.__class__.__name__, self.oc_relay_type, self.switch_index)
self.characteristic_index = 1
return s
def time_grading(net,time_settings):
Expand Down
1 change: 1 addition & 0 deletions pandapower/test/converter/test_from_cim.py
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ def test_fullgrid_dcline(fullgrid_v2):
assert 2 == len(fullgrid_v2.dcline.index)
element_0 = fullgrid_v2.dcline[fullgrid_v2.dcline['origin_id'] == '_70a3750c-6e8e-47bc-b1bf-5a568d9733f7']
assert 'LDC-1230816355' == element_0['name'].item()
assert 'LDC-1230816355' == element_0['description'].item()
assert '_27d57afa-6c9d-4b06-93ea-8c88d14af8b1' == fullgrid_v2.bus.iloc[element_0['from_bus'].item()]['origin_id']
assert '_d3d9c515-2ddb-436a-bf17-2f8be2394de3' == fullgrid_v2.bus.iloc[int(element_0['to_bus'].item())]['origin_id']
assert 0.0 == element_0['p_mw'].item()
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pandapower"
version = "3.0.0" # File format version '__format_version__' is tracked in _version.py
version = "3.0.0.dev0" # File format version '__format_version__' is tracked in _version.py
authors = [
{ name = "Leon Thurner", email = "[email protected]" },
{ name = "Alexander Scheidler", email = "[email protected]" }
Expand Down Expand Up @@ -62,7 +62,7 @@ Changelog = "https://github.com/e2nIEE/pandapower/blob/develop/CHANGELOG.rst"
docs = ["numpydoc>=1.5.0", "matplotlib", "sphinx>=5.3.0", "sphinx_rtd_theme>=1.1.1", "sphinx-pyproject"]
plotting = ["plotly>=3.1.1", "matplotlib", "igraph", "geopandas>=1.0"]
test = ["pytest~=8.1", "pytest-xdist", "nbmake"]
performance = ["ortools", "numba>=0.25", "lightsim2grid==0.9.0"]
performance = ["ortools", "numba==0.60.0", "lightsim2grid==0.9.0"]
fileio = ["xlsxwriter", "openpyxl", "cryptography", "geopandas>=1.0", "psycopg2"]
converter = ["matpowercaseframes"]
pgm = ["power-grid-model-io"]
Expand All @@ -71,7 +71,7 @@ all = [
"numpydoc>=1.5.0", "sphinx>=5.3.0", "sphinx_rtd_theme>=1.1.1", "sphinx-pyproject",
"plotly>=3.1.1", "matplotlib", "igraph", "geopandas>=1.0",
"pytest~=8.1", "pytest-xdist", "nbmake",
"ortools", "numba>=0.25", "lightsim2grid==0.9.0",
"ortools", "numba==0.60.0", "lightsim2grid==0.9.0",
"xlsxwriter", "openpyxl", "cryptography", "psycopg2",
"matpowercaseframes",
"power-grid-model-io"
Expand Down

0 comments on commit 4fb8ab8

Please sign in to comment.