Skip to content

Commit

Permalink
Merge branch 'develop' into feature/plotly
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohmeier authored Oct 28, 2024
2 parents d027ffd + 8b80ffd commit 3959720
Show file tree
Hide file tree
Showing 434 changed files with 7,504 additions and 2,656 deletions.
2 changes: 1 addition & 1 deletion .codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ exclude_paths:
- 'tutorials/**'
- 'pandapipes/networks/network_files/**'
- '**.yml'
- '**.rst'
- '**.rst'
6 changes: 3 additions & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ exclude_lines =
pragma: no cover

omit =
pandapipes/test/*
pandapipes/plotting/geo.py
pandapipes/converter/stanet/data_cleaning.py
src/pandapipes/test/*
src/pandapipes/plotting/geo.py
src/pandapipes/converter/stanet/data_cleaning.py
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ 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 setup.py sdist --formats=zip
twine check dist/* --strict
python3 -m build
python3 -m twine check dist/* --strict
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
Expand All @@ -56,8 +56,8 @@ jobs:
- name: Build and Upload to PyPI
if: ${{ inputs.upload_server == 'pypi' }}
run: |
python3 setup.py sdist --formats=zip
twine check dist/* --strict
python3 -m build
python3 -m twine check dist/* --strict
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
Expand All @@ -70,12 +70,11 @@ jobs:
time: 300s

build:

runs-on: ${{ matrix.os }}
needs: upload
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [ ubuntu-latest, windows-latest ]
steps:
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -86,18 +85,19 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install pytest igraph pytest-split
if ${{ matrix.python-version != '3.11' }}; then python -m pip install numba; fi
if [${{ matrix.python-version != '3.11' }}]; then python -m pip install numba; fi
shell: bash
- name: Install pandapipes from TestPyPI
if: ${{ inputs.upload_server == 'testpypi'}}
run: |
pip install --no-cache-dir -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pandapipes
python -m pip install --no-cache-dir -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pandapipes
- name: Install pandapipes from PyPI
if: ${{ inputs.upload_server == 'pypi'}}
run: |
pip install pandapipes
python -m pip install pandapipes
- name: List all installed packages
run: |
pip list
python -m pip list
- name: Test with pytest
run: |
pytest --pyargs pandapipes.test
141 changes: 98 additions & 43 deletions .github/workflows/run_tests_develop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# 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
# A coverage report will be created for the Python 3.9 version
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

# pandapipes-develop branch is designed to work with pandapower-develop branch
# pandapipes-develop branch is designed to work with pandapower-master branch, but checks the ability to
# work with pandapower-develop branch (relying tests, usually not required for merges) in order to avoid
# problems in future releases

name: ppipes_dev

Expand All @@ -14,66 +16,117 @@ on:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .["all"]
shell: bash
- name: List all installed packages
run: |
python -m pip list
- name: Test with pytest
if: ${{ matrix.python-version != '3.11' }}
run: |
python -m pytest
- name: Test without numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip uninstall numba -y
python -m pytest -n=auto
- name: Test with pytest and Codecov
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install pytest-cov
python -m pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
if: ${{ matrix.python-version == '3.11' }}
uses: codecov/codecov-action@v1
with:
verbose: true

runs-on: ubuntu-latest
relying:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest igraph pytest-split
if ${{ matrix.python-version != '3.11' }}; then python -m pip install numba; fi
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 .
python -m pip install .["all"]
shell: bash
- name: List all installed packages
run: |
pip list
python -m pip list
- name: Test with pytest
if: ${{ matrix.python-version != '3.9' }}
if: ${{ matrix.python-version != '3.11' }}
run: |
pytest
python -m pytest
- name: Test with pytest and Codecov
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install pytest-cov
pytest --cov=./ --cov-report=xml
python -m pytest -n=auto --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
if: ${{ matrix.python-version == '3.9' }}
uses: codecov/codecov-action@v1
if: ${{ matrix.python-version == '3.11' }}
uses: codecov/codecov-action@v4
with:
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
dry_run: ${{ github.ref != 'refs/heads/develop' }}
exclude: |
'**/test/**'
'**/__init__.py'
'doc/**'
'tutorials/**'
'pandapipes/networks/network_files/**'
'**.yml'
'**.rst'
- name: Test without numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip uninstall numba -y
python -m pytest -n=auto
linting:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10']

python-version: ['3.11']
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
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 .
python -m pip install .["all"]
shell: bash
- name: List all installed packages
run: |
pip list
python -m pip list
- name: Lint with flake8 (syntax errors and undefinded names)
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -84,40 +137,43 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
tutorial_tests:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest nbmake pytest-xdist pytest-split igraph
if ${{ matrix.python-version != '3.11' }}; then python -m pip install numba; fi
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 .
python -m pip install .["all"]
shell: bash
- name: List all installed packages
run: |
pip list
python -m pip list
- name: Test with pytest
run: |
pytest --nbmake -n=auto "./tutorials"
python -m pytest --nbmake -n=auto "./tutorials"
- name: Test without numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip uninstall numba -y
python -m pytest --nbmake -n=auto "./tutorials"
docs_check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10' ]
python-version: [ '3.11' ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Check docs for Python ${{ matrix.python-version }}
Expand All @@ -126,7 +182,6 @@ 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 ."
python -m pip install .[docs];"
build-command: "sphinx-build -b html source _build -W"
docs-folder: "doc/"
Loading

0 comments on commit 3959720

Please sign in to comment.