Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/benchmark_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Set up Python 3.12
- name: Set up Python 3.13
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.12
python-version: 3.13


- name: Install Linux system dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
persist-credentials: true
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.12
python-version: 3.13

- name: Build wheel
run: pipx run build --outdir deploy
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/run_periodic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-15-intel, macos-latest, windows-latest ]
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
name: Tests (${{ matrix.os }} / Python ${{ matrix.python-version }})

steps:
Expand Down Expand Up @@ -79,15 +79,15 @@ jobs:
run: uv tool install nox

- name: Run unit tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
if: matrix.os != 'ubuntu-latest' || matrix.python-version != '3.12'
if: matrix.os != 'ubuntu-latest' || matrix.python-version != '3.13'
run: nox -s unit

- name: Run coverage tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
run: nox -s coverage

- name: Upload coverage report
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -101,7 +101,7 @@ jobs:
contents: read
strategy:
fail-fast: false
name: Doctests (ubuntu-latest / Python 3.11)
name: Doctests (ubuntu-latest / Python 3.13)

steps:
- name: Check out PyBaMM repository
Expand All @@ -119,7 +119,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.11
python-version: 3.13

- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
Expand All @@ -141,7 +141,7 @@ jobs:
contents: read
strategy:
fail-fast: false
name: Example notebooks (ubuntu-latest / Python 3.12)
name: Example notebooks (ubuntu-latest / Python 3.13)

steps:
- name: Check out PyBaMM repository
Expand All @@ -155,10 +155,10 @@ jobs:
sudo apt-get install gfortran gcc graphviz pandoc
sudo apt-get install libopenblas-dev texlive-latex-extra dvipng

- name: Set up Python 3.12
- name: Set up Python 3.13
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.12
python-version: 3.13

- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
Expand All @@ -168,7 +168,7 @@ jobs:
- name: Install nox
run: uv tool install nox

- name: Run example notebooks tests for GNU/Linux with Python 3.12
- name: Run example notebooks tests for GNU/Linux with Python 3.13
run: nox -s examples

run_scripts_tests:
Expand All @@ -177,7 +177,7 @@ jobs:
contents: read
strategy:
fail-fast: false
name: Example scripts (ubuntu-latest / Python 3.12)
name: Example scripts (ubuntu-latest / Python 3.13)

steps:
- name: Check out PyBaMM repository
Expand All @@ -191,10 +191,10 @@ jobs:
sudo apt-get install gfortran gcc graphviz
sudo apt-get install libopenblas-dev texlive-latex-extra dvipng

- name: Set up Python 3.12
- name: Set up Python 3.13
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.12
python-version: 3.13

- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
Expand All @@ -204,5 +204,5 @@ jobs:
- name: Install nox
run: uv tool install nox

- name: Run example scripts tests for GNU/Linux with Python 3.12
- name: Run example scripts tests for GNU/Linux with Python 3.13
run: nox -s scripts
30 changes: 15 additions & 15 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-15-intel, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
name: Tests (${{ matrix.os }} / Python ${{ matrix.python-version }})

steps:
Expand Down Expand Up @@ -106,21 +106,21 @@ jobs:
run: uv tool install nox

- name: Run unit tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
if: matrix.os != 'ubuntu-latest' || matrix.python-version != '3.12'
if: matrix.os != 'ubuntu-latest' || matrix.python-version != '3.13'
run: nox -s unit

- name: Run coverage tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
run: nox -s coverage

- name: Upload coverage report
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Run integration tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
run: nox -s integration

run_doctests:
Expand All @@ -129,7 +129,7 @@ jobs:
contents: read
strategy:
fail-fast: false
name: Doctests (ubuntu-latest / Python 3.11)
name: Doctests (ubuntu-latest / Python 3.13)

steps:
- name: Check out PyBaMM repository
Expand All @@ -155,7 +155,7 @@ jobs:
id: setup-python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.11
python-version: 3.13

- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
Expand All @@ -177,7 +177,7 @@ jobs:
contents: read
strategy:
fail-fast: false
name: Example notebooks (ubuntu-latest / Python 3.12)
name: Example notebooks (ubuntu-latest / Python 3.13)

steps:
- name: Check out PyBaMM repository
Expand All @@ -198,11 +198,11 @@ jobs:
sudo dot -c
sudo apt-get install libopenblas-dev texlive-latex-extra dvipng

- name: Set up Python 3.12
- name: Set up Python 3.13
id: setup-python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.12
python-version: 3.13

- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
Expand All @@ -212,7 +212,7 @@ jobs:
- name: Install nox
run: uv tool install nox

- name: Run example notebooks tests for GNU/Linux with Python 3.12
- name: Run example notebooks tests for GNU/Linux with Python 3.13
run: nox -s examples

run_scripts_tests:
Expand All @@ -221,7 +221,7 @@ jobs:
contents: read
strategy:
fail-fast: false
name: Example scripts (ubuntu-latest / Python 3.12)
name: Example scripts (ubuntu-latest / Python 3.13)

steps:
- name: Check out PyBaMM repository
Expand All @@ -242,11 +242,11 @@ jobs:
sudo dot -c
sudo apt-get install libopenblas-dev texlive-latex-extra dvipng

- name: Set up Python 3.12
- name: Set up Python 3.13
id: setup-python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.12
python-version: 3.13

- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
Expand All @@ -256,5 +256,5 @@ jobs:
- name: Install nox
run: uv tool install nox

- name: Run example scripts tests for GNU/Linux with Python 3.12
- name: Run example scripts tests for GNU/Linux with Python 3.13
run: nox -s scripts
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build:
- "graphviz"
os: ubuntu-22.04
tools:
python: "3.12"
python: "3.13"
jobs:
pre_build:
- python -m sphinx -b linkcheck -D linkcheck_timeout=20 docs/ ./linkcheck_output
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- Added support for Python 3.13. ([#5330](https://github.com/pybamm-team/PyBaMM/pull/5330))
- Reduced the time to build `Simulation`s by creating a post-processing step for variables. ([#5308](https://github.com/pybamm-team/PyBaMM/pull/5308))
- Adds the ability to observe custom variables from a `Solution` object using `Solution.observe(symbol)`. ([#5308](https://github.com/pybamm-team/PyBaMM/pull/5308))
- Added inverse kinetics for linear kinetics. ([#5303](https://github.com/pybamm-team/PyBaMM/pull/5303))
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@
"plausible_analytics_domain": "docs.pybamm.org",
"plausible_analytics_url": "https://plausible.io/js/script.js",
},
"pygment_light_style": "xcode",
"pygment_dark_style": "monokai",
"pygments_light_style": "xcode",
"pygments_dark_style": "monokai",
"footer_start": [
"copyright",
"sphinx-version",
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user_guide/installation/gnu-linux-mac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GNU/Linux & macOS
Prerequisites
-------------

To use PyBaMM, you must have Python 3.10, 3.11, or 3.12 installed.
To use PyBaMM, you must have Python 3.10, 3.11, 3.12, 3.13 installed.

.. tab:: Debian-based distributions (Debian, Ubuntu)

Expand Down Expand Up @@ -43,7 +43,7 @@ User install

We recommend to install PyBaMM within a virtual environment, in order
not to alter any distribution Python files.
First, make sure you are using Python 3.10, 3.11, or 3.12.
First, make sure you are using Python 3.10, 3.11, 3.12, 3.13.
To create a virtual environment ``env`` within your current directory type:

.. code:: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ or download the source archive on the repository's homepage.

To install PyBaMM, you will need:

- Python 3 (PyBaMM supports versions 3.9, 3.10, 3.11, and 3.12)
- Python 3 (PyBaMM supports versions 3.10, 3.11, 3.12, and 3.13)
- The Python headers file for your current Python version.
- A BLAS library (for instance `openblas <https://www.openblas.net/>`_).
- A C compiler (ex: ``gcc``).
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run_integration(session):
set_environment_variables(PYBAMM_ENV, session=session)
if (
"CI" in os.environ
and sys.version_info[:2] == (3, 12)
and sys.version_info[:2] >= (3, 12)
and sys.platform == "linux"
):
session.install("pytest-github-actions-annotate-failures")
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = { file = "LICENSE.txt" }
description = "Python Battery Mathematical Modelling"
authors = [{ name = "The PyBaMM Team", email = "[email protected]" }]
maintainers = [{ name = "The PyBaMM Team", email = "[email protected]" }]
requires-python = ">=3.10, <3.13"
requires-python = ">=3.10, <3.14"
readme = { file = "README.md", content-type = "text/markdown" }
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -22,6 +22,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
]
dependencies = [
Expand Down
1 change: 0 additions & 1 deletion src/pybamm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@
"citations",
"config",
"discretisations",
"doc_utils",
"experiment",
"expression_tree",
"geometry",
Expand Down
35 changes: 0 additions & 35 deletions src/pybamm/doc_utils.py

This file was deleted.

18 changes: 14 additions & 4 deletions src/pybamm/models/submodels/electrode/ohm/full_ohm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@
# Full model of electrode employing Ohm's law
#
import pybamm
from pybamm.doc_utils import copy_parameter_doc_from_parent, doc_extend_parent

from .base_ohm import BaseModel


@copy_parameter_doc_from_parent
@doc_extend_parent
class Full(BaseModel):
"""Full model of electrode employing Ohm's law."""
"""This submodel implements Ohm's law for electrodes, accounting for full resistance effects.

The model solves for the electrode potential distribution using the effective conductivity,
which is the product of the material conductivity and the transport efficiency.

.. math::
\\nabla \\cdot (\\sigma_{\text{eff}} \\nabla \\phi_s) = -a_j

where:
- :math:`\\sigma_{\text{eff}} = \\sigma \\cdot \\tau_{\text{or}}` is the effective conductivity
- :math:`\\phi_s` is the electrode potential
- :math:`a_j` is the volumetric interfacial current density

"""

def __init__(self, param, domain, options=None):
super().__init__(param, domain, options=options)
Expand Down
Loading