Skip to content

Commit

Permalink
updated versions and added upload feature to codacy, added explicit n…
Browse files Browse the repository at this point in the history
…umba test.
  • Loading branch information
vogt31337 committed Jun 25, 2024
1 parent b301612 commit 47dc54a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 34 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ on:
- 'testpypi'
- 'pypi'

env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
upload:
Expand Down
41 changes: 23 additions & 18 deletions .github/workflows/run_tests_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
pull_request:
branches-ignore: [ master ]

env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -23,19 +20,18 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '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 pytest igraph pytest-split
if [${{ matrix.python-version != '3.11' }}]; then python -m pip install numba; fi
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 .
python -m pip install .["all"]
shell: bash
- name: List all installed packages
run: |
Expand All @@ -44,6 +40,11 @@ jobs:
if: ${{ matrix.python-version != '3.9' }}
run: |
python -m pytest
- name: Test with numba
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' }}
run: |
Expand All @@ -62,9 +63,9 @@ jobs:
python-version: ['3.10']
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
Expand All @@ -73,7 +74,7 @@ jobs:
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 .
python -m pip install .["all"]
shell: bash
- name: List all installed packages
run: |
Expand All @@ -94,16 +95,15 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '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 pytest==8.0.2 nbmake pytest-xdist pytest-split igraph
if [${{ matrix.python-version != '3.11' }}]; then python -m pip install numba; fi
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 .
Expand All @@ -114,16 +114,21 @@ jobs:
- name: Test with pytest
run: |
python -m pytest --nbmake -n=auto "./tutorials"
- name: Test with numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install numba
python -m pytest -n=auto "./tutorials"
docs_check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10' ]
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 @@ -133,6 +138,6 @@ jobs:
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 .['all']"
build-command: "sphinx-build -b html source _build -W"
docs-folder: "doc/"
34 changes: 21 additions & 13 deletions .github/workflows/run_tests_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
pull_request:
branches: [ master ]

env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -30,11 +27,10 @@ jobs:
- 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
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@master#egg=pandapower;
python -m pip install .
python -m pip install pandapower;
python -m pip install .["all"]
shell: bash
- name: List all installed packages
run: |
Expand All @@ -43,6 +39,11 @@ jobs:
if: ${{ matrix.python-version != '3.9' }}
run: |
python -m pytest
- name: Test with numba
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' }}
run: |
Expand All @@ -52,7 +53,9 @@ jobs:
if: ${{ matrix.python-version == '3.9' }}
uses: codecov/codecov-action@v4
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
upload: true

tutorial_tests:
runs-on: ${{ matrix.os }}
Expand All @@ -69,18 +72,23 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest==8.0.2 nbmake pytest-xdist pytest-split igraph
if [${{ matrix.python-version != '3.11' }}]; then python -m pip install numba; fi
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@master#egg=pandapower
python -m pip install .
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
run: |
python -m pytest --nbmake -n=auto "./tutorials"
- name: Test with numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install numba
python -m pytest -n=auto "./tutorials"
docs_check:
runs-on: ubuntu-latest
Expand All @@ -99,7 +107,7 @@ 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@master#egg=pandapower;
python -m pip install ."
python -m pip install pandapower;
python -m pip install .['all']"
build-command: "sphinx-build -b html source _build -W"
docs-folder: "doc/"

0 comments on commit 47dc54a

Please sign in to comment.