Skip to content

Commit

Permalink
Merge pull request #660 from e2nIEE/develop
Browse files Browse the repository at this point in the history
release 0.11.0
  • Loading branch information
EPrade authored Nov 7, 2024
2 parents 835ebd7 + 464fb63 commit 1ea83dc
Show file tree
Hide file tree
Showing 90 changed files with 4,166 additions and 1,753 deletions.
13 changes: 6 additions & 7 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 Down
86 changes: 59 additions & 27 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 @@ -17,7 +19,7 @@ jobs:
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@v4
Expand All @@ -28,30 +30,63 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-split
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install git+https://github.com/e2nIEE/pandapower@develop#egg=pandapower
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.9' }}
if: ${{ matrix.python-version != '3.11' }}
run: |
python -m pytest
- name: Test with numba
- 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

relying:
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 git+https://github.com/e2nIEE/pandapower@develop#egg=pandapower
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 pip install numba
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
python -m pytest -n=auto --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
uses: codecov/codecov-action@v4
with:
verbose: true
Expand All @@ -65,12 +100,17 @@ jobs:
'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: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.11']
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
Expand All @@ -82,8 +122,6 @@ jobs:
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
python -m pip install .["all"]
shell: bash
- name: List all installed packages
Expand All @@ -102,7 +140,7 @@ jobs:
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@v4
Expand All @@ -113,28 +151,25 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest==8.0.2 nbmake pytest-xdist pytest-split
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install git+https://github.com/e2nIEE/pandapower@develop#egg=pandapower
python -m pip install .
python -m pip install .["all"]
shell: bash
- name: List all installed packages
run: |
python -m pip list
- name: Test with pytest
run: |
python -m pytest --nbmake -n=auto "./tutorials"
- name: Test with numba
- name: Test without numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install numba
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@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -144,10 +179,7 @@ jobs:
- 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 .['all']"
pre-build-command: "python -m pip install --upgrade pip;
python -m pip install .[docs]"
build-command: "sphinx-build -b html source _build -W"
docs-folder: "doc/"
71 changes: 46 additions & 25 deletions .github/workflows/run_tests_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
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@v4
Expand All @@ -27,37 +27,29 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-split
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install pandapower;
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.9' }}
if: ${{ matrix.python-version != '3.11' }}
run: |
python -m pytest
- name: Test with numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install numba
python -m pytest -n=auto
- name: Test with pytest, Codecov and Coverage
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install pytest-cov
python -m pytest --nbmake -n=auto --cov=./ --cov-report=xml
cp ./coverage.xml ./codecov_coverage.xml
- name: Upload coverage to Codacy
if: ${{ matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'}}
if: ${{ matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'}}
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml
- name: Upload coverage to Codecov
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -71,13 +63,48 @@ jobs:
'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
relying:
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 -n=auto
- name: Test without numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip uninstall numba -y
python -m pytest -n=auto
tutorial_tests:
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@v4
Expand All @@ -88,9 +115,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest==8.0.2 nbmake pytest-xdist pytest-split
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install pandapower
python -m pip install .["all"]
shell: bash
- name: List all installed packages
Expand All @@ -99,18 +123,18 @@ jobs:
- name: Test with pytest
run: |
python -m pytest --nbmake -n=auto "./tutorials"
- name: Test with numba
- name: Test without numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install numba
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@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -120,10 +144,7 @@ jobs:
- 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 pandapower;
python -m pip install .['all']"
pre-build-command: "python -m pip install --upgrade pip;
python -m pip install .[docs]"
build-command: "sphinx-build -b html source _build -W"
docs-folder: "doc/"
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ build:

python:
install:
- method: pip
path: .
- requirements: doc/requirements.txt
Loading

0 comments on commit 1ea83dc

Please sign in to comment.