Skip to content

Commit

Permalink
Add pandas requirement, change numpy requirement to 1.22.4, drops Pyt…
Browse files Browse the repository at this point in the history
…hon 3.7 support (#306)

* Add pandas requirement, change numpy requirement to 1.22.4

* Update README.md

* Update minimum Python version to 3.8

* Remove Python 3.7 from test and deploy workflow

* Fix flake8 linting: missing whitespace

* Update test_circuit_elements.py

Fix flake8 ignore lines that are causing the linter to fail

* Update test_preprocessing.py

Add space causing the linter to fail

---------

Co-authored-by: Matt Murbach <mdmurbach@users.noreply.github.com>
  • Loading branch information
adrianusler and mdmurbach authored Sep 12, 2024
1 parent 2407fc1 commit 0b302ca
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.7"
python-version: "3.8"

- name: Install dependencies
run: |
Expand All @@ -40,7 +40,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ impedance.py requires:

- Python (>=3.7)
- SciPy (>=1.0)
- NumPy (>=1.14)
- NumPy (>=1.22.4)
- Matplotlib (>=3.0)
- Altair (>=3.0)
- Pandas

Several example notebooks are provided in the `docs/source/examples/` directory. Opening these will require Jupyter notebook or Jupyter lab.

Expand Down
2 changes: 1 addition & 1 deletion impedance/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def readFile(filename, instrument=None):
'powersuite', 'biologic', 'chinstruments']

if instrument is not None:
assert instrument in supported_types,\
assert instrument in supported_types, \
'{} is not a supported instrument ({})'.format(instrument,
supported_types)

Expand Down
8 changes: 4 additions & 4 deletions impedance/tests/test_circuit_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ def NE2(p, f):
assert "NE2" in circuit_elements
with pytest.raises(OverwriteError):
# try to create the same element again without overwrite
@element(num_params=1, units=["Ohm"]) # noqa: F811
def NE2(p, f):
@element(num_params=1, units=["Ohm"])
def NE2(p, f): # noqa: F811
"""definitely a new circuit element no one has seen before
Notes
Expand Down Expand Up @@ -208,8 +208,8 @@ def NE3(p, f):
assert circuit_elements["NE3"]([1], [1]) == [[1]]
# try to create the same element again with overwrite

@element(num_params=1, units=["Ohm"], overwrite=True) # noqa: F811
def NE3(p, f):
@element(num_params=1, units=["Ohm"], overwrite=True)
def NE3(p, f): # noqa: F811
# feel free to change to a better test
return [p * ff * 2 for ff in f]

Expand Down
2 changes: 1 addition & 1 deletion impedance/tests/test_preprocessing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from impedance.preprocessing import readFile, readGamry, readZPlot,\
from impedance.preprocessing import readFile, readGamry, readZPlot, \
readBioLogic, ignoreBelowX, \
cropFrequencies, readCSV, saveCSV
import numpy as np
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
altair>=3.0
coveralls==3.2.0
matplotlib>=3.5
numpy>=1.14
numpy>=1.22.4
pandas
pytest>=4.6
pytest-cov
scipy>=1.0
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
long_description_content_type="text/markdown",
url="https://impedancepy.readthedocs.io/en/latest/",
packages=setuptools.find_packages(),
python_requires="~=3.7",
python_requires="~=3.8",
install_requires=['altair>=3.0', 'matplotlib>=3.5',
'numpy>=1.14', 'scipy>=1.0'],
'numpy>=1.22.4', 'scipy>=1.0',
'pandas'],
classifiers=(
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
Expand Down

0 comments on commit 0b302ca

Please sign in to comment.