Skip to content

Commit

Permalink
Merge pull request #2435 from Saransh-cpp/3.10
Browse files Browse the repository at this point in the history
Support Python 3.10 and 3.11
  • Loading branch information
valentinsulzer authored Apr 7, 2023
2 parents c81afee + c714f59 commit cd2d1c8
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: tox -e pybamm-requires

- name: Run unit tests for GNU/Linux with Python 3.8
- name: Run unit tests for GNU/Linux with Python 3.8, 3.10, and 3.11
if: matrix.os == 'ubuntu-latest' && matrix.python-version != 3.9
run: python -m tox -e unit

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Features

- PyBaMM is now natively supported on Apple silicon chips (`M1/M2`) ([#2435](https://github.com/pybamm-team/PyBaMM/pull/2435))
- PyBaMM is now supported on Python `3.10` and `3.11` ([#2435](https://github.com/pybamm-team/PyBaMM/pull/2435))
- Updated to casadi 3.6, which required some changes to the casadi integrator. ([#2859](https://github.com/pybamm-team/PyBaMM/pull/2859))

## Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pandas >= 0.24
anytree >= 2.4.3
autograd >= 1.2
scikit-fem >= 0.2.0
casadi >= 3.5.0
casadi >= 3.6.0
imageio>=2.9.0
jupyter # For example notebooks
pybtex
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user_guide/installation/GNU-linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Prerequisites
=============

To use and/or contribute to PyBaMM, you must have Python 3.8 or 3.9 installed.
To use and/or contribute to PyBaMM, you must have Python 3.8, 3.9, 3.10, or 3.11 installed.

To install Python 3 on Debian-based distribution (Debian, Ubuntu, Linux
mint), open a terminal and run
Expand Down Expand Up @@ -46,7 +46,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.8 or 3.9.
First, make sure you are using Python 3.8, 3.9, 3.10, or 3.11.
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 @@ -25,7 +25,7 @@ or download the source archive on the repository's homepage.

To install PyBaMM, you will need:

- Python 3 (PyBaMM supports versions 3.8 and 3.9)
- Python 3 (PyBaMM supports versions 3.8, 3.9, 3.10, and 3.11)
- 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 docs/source/user_guide/installation/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Windows
Prerequisites
-------------

To use and/or contribute to PyBaMM, you must have Python 3.8 or 3.9 installed.
To use and/or contribute to PyBaMM, you must have Python 3.8, 3.9, 3.10, or 3.11 installed.

To install Python 3 download the installation files from `Python’s
website <https://www.python.org/downloads/windows/>`__. Make sure to
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pandas >= 0.24
anytree >= 2.4.3
autograd >= 1.2
scikit-fem >= 0.2.0
casadi >= 3.5.0
casadi >= 3.6.0
imageio>=2.9.0
pybtex>=0.24.0
sympy >= 1.8
Expand Down
18 changes: 16 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,21 @@ def compile_KLU():
},
package_data={"pybamm": pybamm_data},
# Python version
python_requires=">=3.8,<3.10",
python_requires=">=3.8,<3.12",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
],
# List of dependencies
install_requires=[
"numpy>=1.16",
Expand All @@ -195,7 +209,7 @@ def compile_KLU():
"anytree>=2.4.3",
"autograd>=1.2",
"scikit-fem>=0.2.0",
"casadi>=3.5.0",
"casadi>=3.6.0",
"imageio>=2.9.0",
"importlib-metadata",
"pybtex>=0.24.0",
Expand Down

0 comments on commit cd2d1c8

Please sign in to comment.