-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from e2nIEE/develop
new release 1.4.0
- Loading branch information
Showing
27 changed files
with
362 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# This workflow will create a Python package and upload it to testPyPi or PyPi | ||
# Then, it installs simbench from there and all dependencies and runs tests with different Python versions | ||
|
||
name: release | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
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: | ||
upload: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
# Sets up python3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
# Installs and upgrades pip, installs other dependencies and installs the package from setup.py | ||
- name: Install dependencies | ||
run: | | ||
# Upgrade pip | ||
python3 -m pip install --upgrade pip | ||
# Install twine | ||
python3 -m pip install 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 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 setup.py sdist --formats=zip | ||
twine check dist/* --strict | ||
python3 -m twine upload dist/* | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI }} | ||
TWINE_REPOSITORY: pypi | ||
|
||
- name: Sleep for 60s to make release available | ||
uses: juliangruber/sleep-action@v1 | ||
with: | ||
time: 60s | ||
|
||
|
||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
needs: upload | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11'] | ||
os: [ ubuntu-latest, windows-latest ] | ||
group: [ 1, 2 ] | ||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install pytest python-igraph pytest-split | ||
- name: Install dependencies (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
if ( '${{ matrix.python-version }}' -ne '3.11' ) { python -m pip install numba } | ||
- name: Install dependencies (Ubuntu) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
if ${{ matrix.python-version != '3.11' }}; then python -m pip install numba; fi | ||
- name: Install simbench 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 simbench | ||
- name: Install simbench from PyPI | ||
if: inputs.upload_server == 'pypi' | ||
run: | | ||
pip install simbench | ||
- name: List all installed packages | ||
run: | | ||
pip list | ||
- name: Test with pytest | ||
run: | | ||
pytest --splits 2 --group ${{ matrix.group }} --pyargs simbench.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ tutorials/.ipynb_checkpoints | |
*.bak | ||
*.orig | ||
*.ini | ||
.vscode/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
version: 2 | ||
|
||
python: | ||
version: 3.5 | ||
version: 3.8 | ||
install: | ||
- requirements: doc/requirements.txt | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs | ||
- docs,plotting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# pip only: | ||
pandapower>=2.12.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,15 @@ | |
from setuptools import setup, find_packages | ||
import re | ||
|
||
with open('README.rst', 'rb') as f: | ||
install = f.read().decode('utf-8') | ||
|
||
with open('CHANGELOG.rst', 'rb') as f: | ||
changelog = f.read().decode('utf-8') | ||
|
||
with open('README.rst', 'rb') as f: | ||
readme = f.read().decode('utf-8') | ||
|
||
with open('requirements.txt') as req_file: | ||
requirements = req_file.read() | ||
|
||
classifiers = [ | ||
'Development Status :: 5 - Production/Stable', | ||
'Environment :: Console', | ||
|
@@ -24,28 +24,32 @@ | |
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3'] | ||
|
||
with open('.github/workflows/github_test_action.yml', 'rb') as f: | ||
lines = f.read().decode('utf-8') | ||
versions = set(re.findall('3.[0-9]', lines)) | ||
for version in versions: | ||
classifiers.append('Programming Language :: Python :: 3.%s' % version[-1]) | ||
classifiers.append(f'Programming Language :: Python :: 3.{version[-1]}') | ||
|
||
long_description = '\n\n'.join((install, changelog)) | ||
long_description = '\n\n'.join((readme, changelog)) | ||
|
||
setup( | ||
name='simbench', | ||
version='1.3.0', | ||
version='1.4.0', | ||
author='Steffen Meinecke', | ||
author_email='[email protected]', | ||
description='Electrical Power System Benchmark Models', | ||
long_description=readme, | ||
long_description_content_type="text/x-rst", | ||
url='http://www.simbench.de/en', | ||
license='odbl', | ||
install_requires=["pandapower>=2.5"], | ||
python_requires='>=3.8', | ||
install_requires=requirements, | ||
extras_require={"docs": ["numpydoc", "sphinx", "sphinx_rtd_theme"], | ||
"all": ["numpydoc", "sphinx", "sphinx_rtd_theme"]}, | ||
"plotting": ["matplotlib"], | ||
"tutorials": ["matplotlib"], | ||
"all": ["numpydoc", "sphinx", "sphinx_rtd_theme", "matplotlib"]}, | ||
packages=find_packages(), | ||
include_package_data=True, | ||
classifiers=classifiers | ||
classifiers=classifiers, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.