Skip to content

Commit

Permalink
build: increment pybamm to 24.5rc2, ci: increment tests alongside.
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyPlanden committed Jul 20, 2024
1 parent 2517a6a commit 40133fb
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,6 @@ $RECYCLE.BIN/
# Airspeed Velocity
*.asv/
results/

# Pycharm
*.idea/
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [#393](https://github.com/pybop-team/PyBOP/pull/383) - Adds Minkowski and SumofPower cost classes, with an example and corresponding tests.
- [#403](https://github.com/pybop-team/PyBOP/pull/403/) - Adds lychee link checking action.
- [#313](https://github.com/pybop-team/PyBOP/pull/313/) - Fixes for PyBaMM v24.5, drops support for PyBaMM v23.9, v24.1

## Bug Fixes

Expand Down
4 changes: 2 additions & 2 deletions examples/scripts/gitt.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
model = pybop.lithium_ion.WeppnerHuggins(parameter_set=parameter_set)

parameters = pybop.Parameter(
"Positive electrode diffusivity [m2.s-1]",
"Positive particle diffusivity [m2.s-1]",
prior=pybop.Gaussian(5e-14, 1e-13),
bounds=[1e-16, 1e-11],
true_value=parameter_set["Positive electrode diffusivity [m2.s-1]"],
true_value=parameter_set["Positive particle diffusivity [m2.s-1]"],
)

problem = pybop.FittingProblem(
Expand Down
2 changes: 1 addition & 1 deletion pybop/models/lithium_ion/weppner_huggins.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, name="Weppner & Huggins model", **model_kwargs):
# Parameters
######################

d_s = Parameter("Positive electrode diffusivity [m2.s-1]")
d_s = Parameter("Positive particle diffusivity [m2.s-1]")

c_s_max = Parameter("Maximum concentration in positive electrode [mol.m-3]")

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ classifiers = [
]
requires-python = ">=3.9, <3.13"
dependencies = [
# "pybamm>=23.9",
"pybamm @ git+https://github.com/bradyplanden/[email protected]",
"pybamm>=24.5rc2",
"numpy>=1.16, <2.0",
"scipy>=1.3",
"pints>=0.5",
Expand Down
11 changes: 7 additions & 4 deletions scripts/ci/build_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@

python_version=("3.9" "3.10" "3.11" "3.12")
os=("ubuntu-latest" "windows-latest" "macos-13" "macos-14")
# This command fetches the last two PyBaMM versions excluding release candidates from PyPI
pybamm_version=($(curl -s https://pypi.org/pypi/pybamm/json | jq -r '.releases | keys[]' | grep -v rc | tail -n 2 | paste -sd " " -))
# This command fetches the last PyBaMM version excluding release candidates from PyPI
#pybamm_version=($(curl -s https://pypi.org/pypi/pybamm/json | jq -r '.releases | keys[]' | grep -v rc | tail -n 1 | paste -sd " " -))

# This command fetches the last PyBaMM versions including release candidates from PyPI
pybamm_version=($(curl -s https://pypi.org/pypi/pybamm/json | jq -r '.releases | keys[]' | tail -n 1 | paste -sd " " -))

# open dict
json='{
Expand Down Expand Up @@ -40,7 +43,7 @@ json+='
]
}'

# Filter out incompatible combinations
json=$(echo "$json" | jq -c 'del(.include[] | select(.pybamm_version == "23.9" and .python_version == "3.12"))')
# Example for filtering out incompatible combinations
#json=$(echo "$json" | jq -c 'del(.include[] | select(.pybamm_version == "23.9" and .python_version == "3.12"))')

echo "$json" | jq -c .
2 changes: 1 addition & 1 deletion tests/integration/test_model_experiment_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TestModelAndExperimentChanges:
),
pybop.Parameters(
pybop.Parameter( # non-geometric parameter
"Positive electrode diffusivity [m2.s-1]",
"Positive particle diffusivity [m2.s-1]",
prior=pybop.Gaussian(3.43e-15, 1e-15),
bounds=[1e-15, 5e-15],
true_value=4e-15,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def test_non_converged_solution(self):
problem = pybop.FittingProblem(model, parameters=parameters, dataset=dataset)

# Simulate the DFN with active material values of 0.
# The solutions will not change as the solver will not converge.
# The solution elements will not change as the solver will not converge.
output = problem.evaluate([0, 0])
output_S1, _ = problem.evaluateS1([0, 0])

Expand Down

0 comments on commit 40133fb

Please sign in to comment.