Skip to content

Commit

Permalink
Merge branch 'develop' into single-layer-sei
Browse files Browse the repository at this point in the history
  • Loading branch information
brosaplanella authored Oct 9, 2024
2 parents 482f5f8 + e4eb82a commit 5e1a46b
Show file tree
Hide file tree
Showing 98 changed files with 4,440 additions and 1,783 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/periodic_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
LD_LIBRARY_PATH: $HOME/.local/lib

- name: Upload results as artifact
uses: actions/upload-artifact@v4.4.0
uses: actions/upload-artifact@v4.4.1
with:
name: asv_periodic_results
path: results
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
python -c "import pybamm; print(pybamm.IDAKLUSolver())"
python -m pytest -m cibw {project}/tests/unit
- name: Upload Windows wheels
uses: actions/upload-artifact@v4.4.0
uses: actions/upload-artifact@v4.4.1
with:
name: wheels_windows
path: ./wheelhouse/*.whl
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
python -m pytest -m cibw {project}/tests/unit
- name: Upload wheels for Linux
uses: actions/upload-artifact@v4.4.0
uses: actions/upload-artifact@v4.4.1
with:
name: wheels_manylinux
path: ./wheelhouse/*.whl
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
python -m pytest -m cibw {project}/tests/unit
- name: Upload wheels for macOS (amd64, arm64)
uses: actions/upload-artifact@v4.4.0
uses: actions/upload-artifact@v4.4.1
with:
name: wheels_${{ matrix.os }}
path: ./wheelhouse/*.whl
Expand All @@ -281,7 +281,7 @@ jobs:
run: pipx run build --sdist

- name: Upload SDist
uses: actions/upload-artifact@v4.4.0
uses: actions/upload-artifact@v4.4.1
with:
name: sdist
path: ./dist/*.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_benchmarks_over_history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
${{ github.event.inputs.commit_start }}..${{ github.event.inputs.commit_end }}
- name: Upload results as artifact
uses: actions/upload-artifact@v4.4.0
uses: actions/upload-artifact@v4.4.1
with:
name: asv_over_history_results
path: results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_periodic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:

- name: Upload coverage report
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
with:
name: SARIF file
path: results.sarif
Expand All @@ -68,6 +68,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:

- name: Upload coverage report
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.7"
rev: "v0.6.9"
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand All @@ -19,7 +19,7 @@ repos:
additional_dependencies: [black==23.*]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

## Features

- Added Hermite interpolation to the (`IDAKLUSolver`) that improves the accuracy and performance of post-processing variables. ([#4464](https://github.com/pybamm-team/PyBaMM/pull/4464))
- Added `BasicDFN` model for sodium-ion batteries ([#4451](https://github.com/pybamm-team/PyBaMM/pull/4451))
- Added sensitivity calculation support for `pybamm.Simulation` and `pybamm.Experiment` ([#4415](https://github.com/pybamm-team/PyBaMM/pull/4415))
- Added OpenMP parallelization to IDAKLU solver for lists of input parameters ([#4449](https://github.com/pybamm-team/PyBaMM/pull/4449))
- Added phase-dependent particle options to LAM
([#4369](https://github.com/pybamm-team/PyBaMM/pull/4369))
- Added a lithium ion equivalent circuit model with split open circuit voltages for each electrode (`SplitOCVR`). ([#4330](https://github.com/pybamm-team/PyBaMM/pull/4330))
- Added the `pybamm.DiscreteTimeSum` expression node to sum an expression over a sequence of data times, and accompanying `pybamm.DiscreteTimeData` class to store the data times and values ([#4501](https://github.com/pybamm-team/PyBaMM/pull/4501))

## Optimizations

Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ pybind11_add_module(idaklu
src/pybamm/solvers/c_solvers/idaklu/Expressions/Base/Expression.hpp
src/pybamm/solvers/c_solvers/idaklu/Expressions/Base/ExpressionSet.hpp
src/pybamm/solvers/c_solvers/idaklu/Expressions/Base/ExpressionTypes.hpp
src/pybamm/solvers/c_solvers/idaklu/observe.hpp
src/pybamm/solvers/c_solvers/idaklu/observe.cpp
# IDAKLU expressions - concrete implementations
${IDAKLU_EXPR_CASADI_SOURCE_FILES}
${IDAKLU_EXPR_IREE_SOURCE_FILES}
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
{% set github_docname =
'github/pybamm-team/pybamm/blob/develop/docs/' +
env.doc2path(env.docname, base=None) %}
env.doc2path(env.docname, base=None) | string() %}
{% set notebooks_version = env.config.html_context.notebooks_version %}
{% set github_download_url = env.config.html_context.github_download_url %}
Expand Down
1 change: 1 addition & 0 deletions docs/source/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ The notebooks are organised into subfolders, and can be viewed in the galleries
notebooks/models/SEI-on-cracks.ipynb
notebooks/models/simulate-3E-cell.ipynb
notebooks/models/simulating-ORegan-2022-parameter-set.ipynb
notebooks/models/sodium-ion.ipynb
notebooks/models/SPM.ipynb
notebooks/models/SPMe.ipynb
notebooks/models/submodel_cracking_DFN_or_SPM.ipynb
Expand Down
185 changes: 185 additions & 0 deletions docs/source/examples/notebooks/models/sodium-ion.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/source/user_guide/installation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ Dependency
`pre-commit <https://pre-commit.com/index.html>`__ \- dev For managing and maintaining multi-language pre-commit hooks.
`ruff <https://beta.ruff.rs/docs/>`__ \- dev For code formatting.
`nox <https://nox.thea.codes/en/stable/>`__ \- dev For running testing sessions in multiple environments.
`pytest-subtests <https://github.com/pytest-dev/pytest-subtests/>`__ \- dev For subtests pytest fixture.
`pytest-cov <https://pytest-cov.readthedocs.io/en/stable/>`__ \- dev For calculating test coverage.
`parameterized <https://github.com/wolever/parameterized>`__ \- dev For test parameterization.
`pytest <https://docs.pytest.org/en/stable/>`__ 6.0.0 dev For running the test suites.
`pytest-doctestplus <https://github.com/scientific-python/pytest-doctestplus>`__ \- dev For running doctests.
`pytest-xdist <https://pytest-xdist.readthedocs.io/en/latest/>`__ \- dev For running tests in parallel across distributed workers.
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ plot = [
"matplotlib>=3.6.0",
]
cite = [
"setuptools", # Fix for a pybtex issue
"pybtex>=0.24.0",
]
# Battery Parameter eXchange format
Expand All @@ -105,12 +106,11 @@ dev = [
"pytest-cov",
# For doctest
"pytest-doctestplus",
# For test parameterization
"parameterized>=0.9",
# pytest and its plugins
"pytest>=6",
"pytest-xdist",
"pytest-mock",
"pytest-subtests",
# For testing Jupyter notebooks
"nbmake",
# To access the metadata for python packages
Expand Down Expand Up @@ -152,6 +152,7 @@ Ramadass2004 = "pybamm.input.parameters.lithium_ion.Ramadass2004:get_parameter_v
Xu2019 = "pybamm.input.parameters.lithium_ion.Xu2019:get_parameter_values"
ECM_Example = "pybamm.input.parameters.ecm.example_set:get_parameter_values"
MSMR_Example = "pybamm.input.parameters.lithium_ion.MSMR_example_set:get_parameter_values"
Chayambuka2022 = "pybamm.input.parameters.sodium_ion.Chayambuka2022:get_parameter_values"

[tool.setuptools]
include-package-data = true
Expand Down Expand Up @@ -197,6 +198,8 @@ extend-select = [
"YTT", # flake8-2020
"TID252", # relative-imports
"S101", # to identify use of assert statement
"PT027", # remove unittest style assertion
"PT009", # Use pytest.raises instead of unittest-style
]
ignore = [
"E741", # Ambiguous variable name
Expand Down Expand Up @@ -230,6 +233,7 @@ minversion = "8"
required_plugins = [
"pytest-xdist",
"pytest-mock",
"pytest-subtests",
]
norecursedirs = 'pybind11*'
addopts = [
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ def compile_KLU():
"src/pybamm/solvers/c_solvers/idaklu/Solution.hpp",
"src/pybamm/solvers/c_solvers/idaklu/Options.hpp",
"src/pybamm/solvers/c_solvers/idaklu/Options.cpp",
"src/pybamm/solvers/c_solvers/idaklu/observe.hpp",
"src/pybamm/solvers/c_solvers/idaklu/observe.cpp",
"src/pybamm/solvers/c_solvers/idaklu.cpp",
],
)
Expand Down
Loading

0 comments on commit 5e1a46b

Please sign in to comment.