Skip to content

Commit 0b302ca

Browse files
Add pandas requirement, change numpy requirement to 1.22.4, drops Python 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>
1 parent 2407fc1 commit 0b302ca

File tree

7 files changed

+16
-13
lines changed

7 files changed

+16
-13
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717

18-
- name: Set up Python 3.7
18+
- name: Set up Python 3.8
1919
uses: actions/setup-python@v3
2020
with:
21-
python-version: "3.7"
21+
python-version: "3.8"
2222

2323
- name: Install dependencies
2424
run: |
@@ -40,7 +40,7 @@ jobs:
4040
fail-fast: false
4141
max-parallel: 5
4242
matrix:
43-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
43+
python-version: ["3.8", "3.9", "3.10", "3.11"]
4444

4545
steps:
4646
- uses: actions/checkout@v3

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ impedance.py requires:
3131

3232
- Python (>=3.7)
3333
- SciPy (>=1.0)
34-
- NumPy (>=1.14)
34+
- NumPy (>=1.22.4)
3535
- Matplotlib (>=3.0)
3636
- Altair (>=3.0)
37+
- Pandas
3738

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

impedance/preprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def readFile(filename, instrument=None):
2828
'powersuite', 'biologic', 'chinstruments']
2929

3030
if instrument is not None:
31-
assert instrument in supported_types,\
31+
assert instrument in supported_types, \
3232
'{} is not a supported instrument ({})'.format(instrument,
3333
supported_types)
3434

impedance/tests/test_circuit_elements.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ def NE2(p, f):
179179
assert "NE2" in circuit_elements
180180
with pytest.raises(OverwriteError):
181181
# try to create the same element again without overwrite
182-
@element(num_params=1, units=["Ohm"]) # noqa: F811
183-
def NE2(p, f):
182+
@element(num_params=1, units=["Ohm"])
183+
def NE2(p, f): # noqa: F811
184184
"""definitely a new circuit element no one has seen before
185185
186186
Notes
@@ -208,8 +208,8 @@ def NE3(p, f):
208208
assert circuit_elements["NE3"]([1], [1]) == [[1]]
209209
# try to create the same element again with overwrite
210210

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

impedance/tests/test_preprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from impedance.preprocessing import readFile, readGamry, readZPlot,\
1+
from impedance.preprocessing import readFile, readGamry, readZPlot, \
22
readBioLogic, ignoreBelowX, \
33
cropFrequencies, readCSV, saveCSV
44
import numpy as np

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
altair>=3.0
22
coveralls==3.2.0
33
matplotlib>=3.5
4-
numpy>=1.14
4+
numpy>=1.22.4
5+
pandas
56
pytest>=4.6
67
pytest-cov
78
scipy>=1.0

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
long_description_content_type="text/markdown",
1515
url="https://impedancepy.readthedocs.io/en/latest/",
1616
packages=setuptools.find_packages(),
17-
python_requires="~=3.7",
17+
python_requires="~=3.8",
1818
install_requires=['altair>=3.0', 'matplotlib>=3.5',
19-
'numpy>=1.14', 'scipy>=1.0'],
19+
'numpy>=1.22.4', 'scipy>=1.0',
20+
'pandas'],
2021
classifiers=(
2122
"Programming Language :: Python :: 3",
2223
"License :: OSI Approved :: MIT License",

0 commit comments

Comments
 (0)