Skip to content

Commit

Permalink
drop support from 3.7 as oct2py no longer support
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirroni committed Jun 12, 2024
1 parent cdd1587 commit 50c3f39
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
matpower-version: ["7.0", "7.1", "8.0"]
platform: [octave]

Expand Down Expand Up @@ -72,4 +72,4 @@ jobs:
- name: Test package
run: |
pip install --upgrade --no-cache-dir --force-reinstall jupyter_client ipykernel ipython tornado
pytest -n auto -rA -c pyproject.toml --cov-report term-missing --cov=matpower --nbmake
pytest auto -rA -c pyproject.toml --cov-report term-missing --cov=matpower --nbmake
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
build:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
matpower-version: ["7.0", "7.1", "8.0"]
platform: [octave]

Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Test package
run: |
pip install --upgrade --no-cache-dir --force-reinstall jupyter_client ipykernel ipython tornado
pytest -n auto -rA -c pyproject.toml --cov-report term-missing --cov=matpower --nbmake
pytest auto -rA -c pyproject.toml --cov-report term-missing --cov=matpower --nbmake
deploy:
needs: build
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pip install -e ."[dev]"

```shell
pytest -n auto -rA -c pyproject.toml --cov-report term-missing --cov=matpower
pytest -rA -c pyproject.toml --cov-report term-missing --cov=matpower --nbmake
```

## Notebook example
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "matpower"
description = 'matpower-pip: A Python Package for Easy Access to MATPOWER Power System Simulation Package'
readme = "README.md"
requires-python = ">=3.7.1"
requires-python = ">=3.8.1"
keywords = []
authors = [
{name = "Muhammad Yasirroni", email = "[email protected]"},
Expand All @@ -16,11 +16,11 @@ maintainers = [
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
]
Expand All @@ -33,10 +33,10 @@ octave = [
]
dev = [
"jupyter>=1.0.0",
"matplotlib>=3.5.3", # latest support of 3.7
"matplotlib>=3.5.3",
"matpowercaseframes>=1.0.7",
"nbmake>=1.3.5",
"numpy>=1.21.6", # latest support for 3.7
"numpy>=1.21.6",
"oct2py>=5.7.0",
"openpyxl>=3.1.2",
"pandas>=1.3.5",
Expand Down
9 changes: 5 additions & 4 deletions tests/test_core_functionality.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import matpower
import numpy as np
from matpower import __MATPOWER_VERSION__, __MATPOWERPIP_VERSION__, Matpower
from oct2py import Oct2Py

import matpower
from matpower import __MATPOWER_VERSION__, __MATPOWERPIP_VERSION__, Matpower

"""Test using pytest
# normal test
copy matpowerpip\\__init__.py matpower\\__init__.py
pytest -n auto -rA -c pyproject.toml --cov-report term-missing --cov=matpower
# complete test, including example notebooks
copy matpowerpip\\__init__.py matpower\\__init__.py
pytest -n auto -rA -c pyproject.toml --cov-report term-missing --cov=matpower --nbmake
pytest -rA -c pyproject.toml --cov-report term-missing --cov=matpower --nbmake
# only run last failed test
copy matpowerpip\\__init__.py matpower\\__init__.py
pytest -n auto --lf -rA -c pyproject.toml --cov-report term-missing --cov=matpower --nbmake
pytest --lf -rA -c pyproject.toml --cov-report term-missing --cov=matpower --nbmake
"""


Expand Down

0 comments on commit 50c3f39

Please sign in to comment.