From c6a872f48ff521f3d84bee80c77573e8f8937f2c Mon Sep 17 00:00:00 2001 From: Dibyendu-IITKGP Date: Thu, 12 Sep 2024 13:16:21 +0100 Subject: [PATCH 01/10] bpx is added as an optional dependency --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a81ed61d..cd3a8379 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,6 @@ dependencies = [ "numpy>=1.16, <2.0", "scipy>=1.3", "pints>=0.5", - "bpx>=0.4", ] [project.optional-dependencies] @@ -54,6 +53,7 @@ dev = [ "pytest-mock", "pytest-xdist", "ruff", + "bpx>=0.4", ] scifem = [ "scikit-fem>=8.1.0" # scikit-fem is a dependency for the multi-dimensional pybamm models From 0f22c2adfca52efca980c2f01e6d1587627e33c7 Mon Sep 17 00:00:00 2001 From: Dibyendu-IITKGP Date: Thu, 12 Sep 2024 14:32:40 +0100 Subject: [PATCH 02/10] bpx is added as an optional dependency --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cd3a8379..c059f2b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,12 +53,14 @@ dev = [ "pytest-mock", "pytest-xdist", "ruff", - "bpx>=0.4", ] scifem = [ "scikit-fem>=8.1.0" # scikit-fem is a dependency for the multi-dimensional pybamm models ] -all = ["pybop[plot]", "pybop[scifem]"] +bpx = [ + "bpx>=0.4", +] +all = ["pybop[plot]", "pybop[scifem]", "pybop[bpx]"] [tool.setuptools.packages.find] include = ["pybop", "pybop.*"] From 1171e7364cedd232c2b2679b5d74857c88803b49 Mon Sep 17 00:00:00 2001 From: Dibyendu-IITKGP Date: Thu, 12 Sep 2024 15:20:51 +0100 Subject: [PATCH 03/10] changelog.md is updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7668f65f..cc31bcca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ ## Breaking Changes +- [#499](https://github.com/pybop-team/PyBOP/pull/499) - BPX is added as an optional dependency. - [#483](https://github.com/pybop-team/PyBOP/pull/483) - Replaces `pybop.MAP` with `pybop.LogPosterior` with an updated call args and bugfixes. - [#436](https://github.com/pybop-team/PyBOP/pull/436) - **API Change:** The functionality from `BaseCost.evaluate/S1` & `BaseCost._evaluate/S1` is represented in `BaseCost.__call__` & `BaseCost.compute`. `BaseCost.compute` directly acts on the predictions, while `BaseCost.__call__` calls `BaseProblem.evaluate/S1` before `BaseCost.compute`. `compute` has optional args for gradient cost calculations. - [#424](https://github.com/pybop-team/PyBOP/issues/424) - Replaces the `init_soc` input to `FittingProblem` with the option to pass an initial OCV value, updates `BaseModel` and fixes `multi_model_identification.ipynb` and `spm_electrode_design.ipynb`. From 3184105fd9ed9041134d573742dfbe206dfe62d1 Mon Sep 17 00:00:00 2001 From: Dibyendu-IITKGP Date: Tue, 24 Sep 2024 11:26:56 +0100 Subject: [PATCH 04/10] optional package description is added in installation.rst file --- docs/installation.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/installation.rst b/docs/installation.rst index 6bc3169c..458759de 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -42,6 +42,19 @@ For those who prefer to install PyBOP from a local clone of the repository or wi In editable mode, changes you make to the source code will immediately affect the PyBOP installation without the need for reinstallation. +Optional Packages +----------------- +scikit-fem - This is a dependency for the multi-dimensional pybamm models, and can be installed using: +.. code-block:: console + + pip install scikit-fem[all] + +bpx - To use physics based battery models of Faraday Institution's MSM project Battery Parameter eXchange (BPX) is required. +.. code-block:: console + + pip install bpx + + Verifying Installation ---------------------- From 3a72ce3181180496f45973f2ba8bd1d157e4c270 Mon Sep 17 00:00:00 2001 From: Dibyendu-IITKGP Date: Tue, 24 Sep 2024 11:37:14 +0100 Subject: [PATCH 05/10] plotly added as an optional dependency --- docs/installation.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/installation.rst b/docs/installation.rst index 458759de..d4522505 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -44,6 +44,11 @@ In editable mode, changes you make to the source code will immediately affect th Optional Packages ----------------- +plotly - PyBOP requires "plotly>=5.0" and can be installed with: +.. code-block:: console + + pip install plotly + scikit-fem - This is a dependency for the multi-dimensional pybamm models, and can be installed using: .. code-block:: console From f381b7402bf6f894ab3860e5f597c6715d73daa9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:37:33 +0000 Subject: [PATCH 06/10] style: pre-commit fixes --- docs/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.rst b/docs/installation.rst index d4522505..ff83977d 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -48,7 +48,7 @@ plotly - PyBOP requires "plotly>=5.0" and can be installed with: .. code-block:: console pip install plotly - + scikit-fem - This is a dependency for the multi-dimensional pybamm models, and can be installed using: .. code-block:: console From a5436a34aef952c4b89f47c0fb4e93be9e12ec56 Mon Sep 17 00:00:00 2001 From: Dibyendu-IITKGP Date: Tue, 24 Sep 2024 13:04:14 +0100 Subject: [PATCH 07/10] installation.rst is updated --- docs/installation.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index d4522505..94f94112 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -44,21 +44,25 @@ In editable mode, changes you make to the source code will immediately affect th Optional Packages ----------------- -plotly - PyBOP requires "plotly>=5.0" and can be installed with: +plotly - PyBOP uses plotly>=5.0, and can be installed with: + .. code-block:: console pip install plotly - + scikit-fem - This is a dependency for the multi-dimensional pybamm models, and can be installed using: + .. code-block:: console pip install scikit-fem[all] -bpx - To use physics based battery models of Faraday Institution's MSM project Battery Parameter eXchange (BPX) is required. +bpx - To use physics based battery models of Faraday Institution's MSM project Battery Parameter eXchange (BPX) is required: + .. code-block:: console pip install bpx +For more information of the additional packages, user may have a look `here `_. Verifying Installation ---------------------- From abc61a59dec56a8e56ac78e5ee05a11a2e6f6337 Mon Sep 17 00:00:00 2001 From: Dibyendu-IITKGP Date: Wed, 25 Sep 2024 12:20:25 +0100 Subject: [PATCH 08/10] optional packages installation command updated --- docs/installation.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 94f94112..2c34f772 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -48,19 +48,19 @@ plotly - PyBOP uses plotly>=5.0, and can be installed with: .. code-block:: console - pip install plotly + pip install pybop[plot] scikit-fem - This is a dependency for the multi-dimensional pybamm models, and can be installed using: .. code-block:: console - pip install scikit-fem[all] + pip install pybop[scifem] bpx - To use physics based battery models of Faraday Institution's MSM project Battery Parameter eXchange (BPX) is required: .. code-block:: console - pip install bpx + pip install pybop[bpx] For more information of the additional packages, user may have a look `here `_. From cc2bd760a921b0a7286f21ff5844057abf4fb896 Mon Sep 17 00:00:00 2001 From: Brady Planden Date: Wed, 25 Sep 2024 14:22:22 +0100 Subject: [PATCH 09/10] docs: updates to optional dependencies guide --- docs/installation.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 2c34f772..50138d81 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -42,27 +42,27 @@ For those who prefer to install PyBOP from a local clone of the repository or wi In editable mode, changes you make to the source code will immediately affect the PyBOP installation without the need for reinstallation. -Optional Packages +Optional Dependencies ----------------- -plotly - PyBOP uses plotly>=5.0, and can be installed with: +``plotly`` - For plotting, PyBOP uses plotly. It can be installed with: .. code-block:: console pip install pybop[plot] -scikit-fem - This is a dependency for the multi-dimensional pybamm models, and can be installed using: +``scikit-fem`` - This is a dependency for the multi-dimensional pybamm models, and can be installed using: .. code-block:: console pip install pybop[scifem] -bpx - To use physics based battery models of Faraday Institution's MSM project Battery Parameter eXchange (BPX) is required: +``bpx`` - To use the Faraday Institution's Battery Parameter eXchange (BPX) package install the optional requirement: .. code-block:: console pip install pybop[bpx] -For more information of the additional packages, user may have a look `here `_. +To install all the optional dependencies, the command ``pip install pybop[all]`` is available. For more information on the optional packages, users are directed towards the `pyproject.toml `_. Verifying Installation ---------------------- From b587e5827ea9eb6b915aa88c16c1acfbcf698265 Mon Sep 17 00:00:00 2001 From: Dibyendu-IITKGP Date: Fri, 27 Sep 2024 16:42:57 +0100 Subject: [PATCH 10/10] pyproject.toml updated with optional package list --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 57565c6e..5e1c7444 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ scifem = [ bpx = [ "bpx>=0.4", ] -all = ["pybop[plot]", "pybop[scifem]", "pybop[bpx]"] +all = ["pybop[plot,scifem,bpx]"] [tool.setuptools.packages.find] include = ["pybop", "pybop.*"]