Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0d597d7
Bug fixes (#229)
markbouman Nov 7, 2022
364b789
docs: add markbouman as a contributor for bug, and code (#230)
allcontributors[bot] Nov 7, 2022
7384f0a
bump version to 1.4.2
mdmurbach Jan 28, 2023
9dbca09
Removes Python 3.6 from test matrix (#240)
mdmurbach Jan 28, 2023
b183863
add build and push to pypi in ci workflow (#241)
mdmurbach Jan 28, 2023
047e716
add tags to github workflow
mdmurbach Jan 28, 2023
2b53caf
add tags to github workflow
mdmurbach Jan 28, 2023
9376532
Merge branch 'main' of github.com:ECSHackWeek/impedance.py into main
mdmurbach Jan 28, 2023
41d00fb
docs: add oslopanda as a contributor for bug (#242)
allcontributors[bot] Jan 28, 2023
fd2e91b
docs: add pililac as a contributor for bug (#243)
allcontributors[bot] Jan 28, 2023
5b821d4
Update preprocessing.py (#233)
kevinsmia1939 Jan 28, 2023
77f3c3b
docs: add kevinsmia1939 as a contributor for code (#244)
allcontributors[bot] Jan 28, 2023
43dbe6c
Plotting update and a bug fix (#237)
oslopanda Jan 28, 2023
d1315b2
fix inadvertant whitespace
mdmurbach Jan 28, 2023
019f958
fix PEP8 long lines issues in visualization.py
mdmurbach Jan 28, 2023
ecaae60
bump version to v1.4.3
mdmurbach Jan 28, 2023
059df99
New Feature: Users can add their own circuit elements easily (#196)
rgasper Feb 2, 2023
e666b12
replace spaces in circuit string for custom circuits (#247)
mdmurbach Feb 3, 2023
4bd8989
Merge branch 'main' into HEAD
BGerwe Feb 10, 2023
aaa9617
Adds flake8 to dependencies. Needs to be <6.0.0 to support python 3.7
BGerwe Feb 10, 2023
c5450f9
Update pyproject to format for poetry >1.2. Add flake8 to dev require…
BGerwe Feb 14, 2023
0a76744
Change poetry version in build action
BGerwe Feb 14, 2023
bd501fd
include python 3.11 in project specs
BGerwe Feb 14, 2023
42fcc7b
resync lock file
BGerwe Feb 14, 2023
87bb27e
remove altair to test if package builds faster for 3.10
BGerwe Feb 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,50 @@
"contributions": [
"bug"
]
},
{
"login": "markbouman",
"name": "Mark Bouman",
"avatar_url": "https://avatars.githubusercontent.com/u/103944120?v=4",
"profile": "https://github.com/markbouman",
"contributions": [
"bug",
"code"
]
},
{
"login": "oslopanda",
"name": "oslopanda",
"avatar_url": "https://avatars.githubusercontent.com/u/33810430?v=4",
"profile": "https://github.com/oslopanda",
"contributions": [
"bug"
]
},
{
"login": "pililac",
"name": "pililac",
"avatar_url": "https://avatars.githubusercontent.com/u/60116646?v=4",
"profile": "https://github.com/pililac",
"contributions": [
"bug"
]
},
{
"login": "kevinsmia1939",
"name": "Kavin Teenakul",
"avatar_url": "https://avatars.githubusercontent.com/u/11407922?v=4",
"profile": "https://github.com/kevinsmia1939",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"projectName": "impedance.py",
"projectOwner": "ECSHackWeek",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true
"skipCi": true,
"commitConvention": "angular"
}
2 changes: 1 addition & 1 deletion .github/actions/build_impedance/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.1.14
curl -sSL https://install.python-poetry.org | python3 - --version 1.3.2
echo "$HOME/.poetry/bin" >> $GITHUB_PATH # add poetry to PATH.
shell: bash

Expand Down
34 changes: 31 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: CI tests
name: Run tests and build package
on:
pull_request:
push:
branches:
- main
tags:
- '*'

jobs:
linting:
Expand All @@ -20,13 +22,14 @@ jobs:

tests:
name: Run tests
needs: linting
runs-on: ubuntu-latest

strategy:
fail-fast: false
max-parallel: 4
max-parallel: 5
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
Expand All @@ -43,3 +46,28 @@ jobs:
run: poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# TODO: I think this is redundant with .github/workflows/release.yml?
# build-and-push:
# name: Build and publish package to PyPI
# needs: [linting, tests]
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@master
#
# - name: Set up Python 3.10
# uses: actions/setup-python@v3
# with:
# python-version: "3.10"
#
# - name: Build a binary wheel and a source tarball
# run: |
# python3 -m pip install wheel
# python3 setup.py sdist bdist_wheel
#
# - name: Publish distribution to PyPI (if tagged)
# if: startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,6 @@ venv.bak/

# mypy
.mypy_cache/

# testing
*_test.csv
44 changes: 25 additions & 19 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion impedance/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.4.1"
__version__ = "1.4.3"
6 changes: 3 additions & 3 deletions impedance/models/circuits/circuits.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, initial_guess=[], constants=None, name=None):
"""

# if supplied, check that initial_guess is valid and store
initial_guess = list(filter(None, initial_guess))
initial_guess = [x for x in initial_guess if x is not None]
for i in initial_guess:
if not isinstance(i, (float, int, np.int32, np.float64)):
raise TypeError(f'value {i} in initial_guess is not a number')
Expand Down Expand Up @@ -188,7 +188,7 @@ def __str__(self):
for name, value in self.constants.items():
elem = get_element_from_name(name)
units = check_and_eval(elem).units
if '_' in name:
if '_' in name and len(units) > 1:
unit = units[int(name.split('_')[-1])]
else:
unit = units[0]
Expand Down Expand Up @@ -431,7 +431,7 @@ def __init__(self, circuit='', **kwargs):
"""

super().__init__(**kwargs)
self.circuit = circuit
self.circuit = circuit.replace(" ", "")

circuit_len = calculateCircuitLength(self.circuit)

Expand Down
Loading