From 7f6172b55fc39e040339e4bf84413d128adb0038 Mon Sep 17 00:00:00 2001 From: Adrian Usler Date: Fri, 23 Aug 2024 02:49:28 +0200 Subject: [PATCH 1/7] Add pandas requirement, change numpy requirement to 1.22.4 --- requirements.txt | 3 ++- setup.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index ea8a8d3..3a0bdaa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/setup.py b/setup.py index 610ccfb..cd2b4cc 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,8 @@ packages=setuptools.find_packages(), python_requires="~=3.7", 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", From bdac813e2251428f0cefe6f50a96121f8ff44fe6 Mon Sep 17 00:00:00 2001 From: Adrian Usler <42970780+adrianusler@users.noreply.github.com> Date: Fri, 23 Aug 2024 02:55:45 +0200 Subject: [PATCH 2/7] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eb1388f..03492d1 100644 --- a/README.md +++ b/README.md @@ -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. From 34151f259362bb86ae0f13e6b070704bf85cbd4b Mon Sep 17 00:00:00 2001 From: Matt Murbach Date: Thu, 5 Sep 2024 08:05:21 -0700 Subject: [PATCH 3/7] Update minimum Python version to 3.8 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index cd2b4cc..3ec140c 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ 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.22.4', 'scipy>=1.0', 'pandas'], From 324c70dff0a337ee69c2170773f17c8481947f8e Mon Sep 17 00:00:00 2001 From: Matt Murbach Date: Thu, 5 Sep 2024 08:09:12 -0700 Subject: [PATCH 4/7] Remove Python 3.7 from test and deploy workflow --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8474a3c..075951d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | @@ -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 From f2fe5cd3d05b23525c9ac117b0f01a0378954604 Mon Sep 17 00:00:00 2001 From: Adrian Usler Date: Fri, 6 Sep 2024 08:26:20 +0200 Subject: [PATCH 5/7] Fix flake8 linting: missing whitespace --- impedance/preprocessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impedance/preprocessing.py b/impedance/preprocessing.py index 1cfe55d..dbf0af6 100644 --- a/impedance/preprocessing.py +++ b/impedance/preprocessing.py @@ -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) From 691773f75526d92212a80261a324d413d881e832 Mon Sep 17 00:00:00 2001 From: Matt Murbach Date: Wed, 11 Sep 2024 20:22:33 -0700 Subject: [PATCH 6/7] Update test_circuit_elements.py Fix flake8 ignore lines that are causing the linter to fail --- impedance/tests/test_circuit_elements.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/impedance/tests/test_circuit_elements.py b/impedance/tests/test_circuit_elements.py index cd1e3f2..5276c44 100644 --- a/impedance/tests/test_circuit_elements.py +++ b/impedance/tests/test_circuit_elements.py @@ -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 @@ -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] From c53ea8c98fff572121e2dd61ed27650c88df19e9 Mon Sep 17 00:00:00 2001 From: Matt Murbach Date: Wed, 11 Sep 2024 20:23:21 -0700 Subject: [PATCH 7/7] Update test_preprocessing.py Add space causing the linter to fail --- impedance/tests/test_preprocessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impedance/tests/test_preprocessing.py b/impedance/tests/test_preprocessing.py index 2f23a0e..8a96a9a 100644 --- a/impedance/tests/test_preprocessing.py +++ b/impedance/tests/test_preprocessing.py @@ -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