Skip to content

Commit

Permalink
Merge pull request #1447 from pybamm-team/release-0.4.0
Browse files Browse the repository at this point in the history
Release 0.4.0
  • Loading branch information
valentinsulzer authored Mar 26, 2021
2 parents 64c6aad + 2551c87 commit e71a200
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build

on:
push:
branches: master
branches: main
workflow_dispatch:
inputs:
target:
Expand Down
16 changes: 12 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# [Unreleased](https://github.com/pybamm-team/PyBaMM)
# [v0.4.0](https://github.com/pybamm-team/PyBaMM/tree/v0.4.0) - 2021-03-27

This release introduces:
- several new models, including reversible and irreversible plating submodels, submodels for loss of active material, Yang et al.'s (2017) coupled SEI/plating/pore clogging model, and the Newman-Tobias model
- internal optimizations for solving models, particularly for simulating experiments, with more accurate event detection and more efficient numerical methods and post-processing
- parallel solutions of a model with different inputs
- a cleaner installation process for Mac when installing from PyPI, no longer requiring a Homebrew installation of Sundials
- improved plotting functionality, including adding a new 'voltage component' plot
- several other new features, optimizations, and bug fixes, summarized below

## Features
- Added `NewmanTobias` li-ion battery model ([#1423](https://github.com/pybamm-team/PyBaMM/pull/1423))
Expand Down Expand Up @@ -59,7 +67,7 @@
- Operations such as `1*x` and `0+x` now directly return `x`. This can be bypassed by explicitly creating the binary operators, e.g. `pybamm.Multiplication(1, x)` ([#1252](https://github.com/pybamm-team/PyBaMM/pull/1252))
- `'Cell capacity [A.h]'` has been renamed to `'Nominal cell capacity [A.h]'`. `'Cell capacity [A.h]'` will be deprecated in the next release. ([#1352](https://github.com/pybamm-team/PyBaMM/pull/1352))

# [v0.3.0](https://github.com/pybamm-team/PyBaMM) - 2020-11-22
# [v0.3.0](https://github.com/pybamm-team/PyBaMM/tree/v0.3.0) - 2020-12-01

This release introduces a new aging model for particle swelling and cracking, a new reduced-order model (TSPMe), and a parameter set for A123 LFP cells. Additionally, there have been several backend optimizations to speed up model creation and solving, and other minor features and bug fixes.

Expand Down Expand Up @@ -135,7 +143,7 @@ This release adds new operators for more complex models, some basic sensitivity

# [v0.2.3](https://github.com/pybamm-team/PyBaMM/tree/v0.2.3) - 2020-07-01

This release enables the use of [Google Colab](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/master/) for running example notebooks, and adds some small new features and bug fixes.
This release enables the use of [Google Colab](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/main/) for running example notebooks, and adds some small new features and bug fixes.

## Features

Expand Down Expand Up @@ -364,7 +372,7 @@ This release introduces many new features and optimizations. All models can now
- Removed `Outer` and `Kron` nodes as no longer used ([#777](https://github.com/pybamm-team/PyBaMM/pull/777))
- Moved `results` to separate repositories ([#761](https://github.com/pybamm-team/PyBaMM/pull/761))
- The parameters "Bruggeman coefficient" must now be specified separately as "Bruggeman coefficient (electrolyte)" and "Bruggeman coefficient (electrode)"
- The current classes (`GetConstantCurrent`, `GetUserCurrent` and `GetUserData`) have now been removed. Please refer to the [`change-input-current` notebook](https://github.com/pybamm-team/PyBaMM/blob/master/examples/notebooks/change-input-current.ipynb) for information on how to specify an input current
- The current classes (`GetConstantCurrent`, `GetUserCurrent` and `GetUserData`) have now been removed. Please refer to the [`change-input-current` notebook](https://github.com/pybamm-team/PyBaMM/blob/main/examples/notebooks/change-input-current.ipynb) for information on how to specify an input current
- Parameter functions must now use pybamm functions instead of numpy functions (e.g. `pybamm.exp` instead of `numpy.exp`), as these are then used to construct the expression tree directly. Generally, pybamm syntax follows numpy syntax; please get in touch if a function you need is missing.
- The current must now be updated by changing "Current function [A]" or "C-rate" instead of "Typical current [A]"

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ You now have everything you need to start making changes!
10. PyBaMM has online documentation at http://pybamm.readthedocs.io/. To make sure any new methods or classes you added show up there, please read the [documentation](#documentation) section.
11. If you added a major new feature, perhaps it should be showcased in an [example notebook](#example-notebooks).
12. When you feel your code is finished, or at least warrants serious discussion, run the [pre-commit checks](#pre-commit-checks) and then create a [pull request](https://help.github.com/articles/about-pull-requests/) (PR) on [PyBaMM's GitHub page](https://github.com/pybamm-team/PyBaMM).
13. Once a PR has been created, it will be reviewed by any member of the community. Changes might be suggested which you can make by simply adding new commits to the branch. When everything's finished, someone with the right GitHub permissions will merge your changes into PyBaMM master repository.
13. Once a PR has been created, it will be reviewed by any member of the community. Changes might be suggested which you can make by simply adding new commits to the branch. When everything's finished, someone with the right GitHub permissions will merge your changes into PyBaMM main repository.

Finally, if you really, really, _really_ love developing PyBaMM, have a look at the current [project infrastructure](#infrastructure).

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Build](https://github.com/pybamm-team/PyBaMM/workflows/PyBaMM/badge.svg)](https://github.com/pybamm-team/PyBaMM/actions?query=workflow%3APyBaMM+branch%3Adevelop)
[![readthedocs](https://readthedocs.org/projects/pybamm/badge/?version=latest)](https://pybamm.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/pybamm-team/PyBaMM/branch/master/graph/badge.svg)](https://codecov.io/gh/pybamm-team/PyBaMM)
[![codecov](https://codecov.io/gh/pybamm-team/PyBaMM/branch/main/graph/badge.svg)](https://codecov.io/gh/pybamm-team/PyBaMM)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/develop/)
[![black_code_style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
Expand Down
14 changes: 7 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
author = "The PyBaMM Team"

# The short X.Y version
version = "0.3"
version = "0.4"
# The full version, including alpha/beta/rc tags
release = "0.3.0-beta"
release = "0.4.0"


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -66,8 +66,8 @@
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"

# The master toctree document.
master_doc = "index"
# The main toctree document.
main_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -155,15 +155,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "PyBaMM.tex", "PyBaMM Documentation", "Valentin Sulzer", "manual")
(main_doc, "PyBaMM.tex", "PyBaMM Documentation", "Valentin Sulzer", "manual")
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "pybamm", "PyBaMM Documentation", [author], 1)]
man_pages = [(main_doc, "pybamm", "PyBaMM Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -173,7 +173,7 @@
# dir menu entry, description, category)
texinfo_documents = [
(
master_doc,
main_doc,
"PyBaMM",
"PyBaMM Documentation",
author,
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Examples
========

Detailed examples can be viewed on the
`GitHub examples page <https://github.com/pybamm-team/PyBaMM/tree/master/examples/notebooks>`_,
`GitHub examples page <https://github.com/pybamm-team/PyBaMM/tree/main/examples/notebooks>`_,
and run locally using ``jupyter notebook``, or online through
`Google Colab <https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/develop/>`_.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/models/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Below is an overview of all the battery models included in PyBaMM.
Each of the pre-built models contains a reference to the paper in which it is derived.

The models can be customised using the `options` dictionary defined in the :class:`pybamm.BaseBatteryModel` (which also provides information on which options and models are compatible)
Visit our `examples page <https://github.com/pybamm-team/PyBaMM/tree/master/examples/notebooks/models>`_
Visit our `examples page <https://github.com/pybamm-team/PyBaMM/tree/main/examples/notebooks/models>`_
to see how these models can be solved, and compared, using PyBaMM.

.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/add-model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Adding a Model
As with any contribution to PyBaMM, please follow the workflow in CONTRIBUTING.md_.
In particular, start by creating an issue to discuss what you want to do - this is a good way to avoid wasted coding hours!

We aim here to provide an overview of how a new model is entered into PyBaMM in a form which can be eventually merged into the master branch of the PyBaMM project. However, we recommend that you first read through the notebook: `create a model <https://github.com/pybamm-team/PyBaMM/tree/develop/examples/notebooks/Creating%20Models>`_, which goes step-by-step through the procedure for creating a model. Once you understand that procedure, you can then formalise your model following the outline provided here.
We aim here to provide an overview of how a new model is entered into PyBaMM in a form which can be eventually merged into the main branch of the PyBaMM project. However, we recommend that you first read through the notebook: `create a model <https://github.com/pybamm-team/PyBaMM/tree/develop/examples/notebooks/Creating%20Models>`_, which goes step-by-step through the procedure for creating a model. Once you understand that procedure, you can then formalise your model following the outline provided here.

The role of models
------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"More details on each subset can be found [here](https://github.com/pybamm-team/PyBaMM/tree/master/pybamm/input/parameters).\n",
"More details on each subset can be found [here](https://github.com/pybamm-team/PyBaMM/tree/main/pybamm/input/parameters).\n",
"\n",
"Now we can pass `'chemistry'` into `ParameterValues` to create the dictionary of parameter values"
]
Expand Down
2 changes: 1 addition & 1 deletion pybamm/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0, 3, 0
0, 4, 0
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,7 @@ def compile_KLU():
pybamm_data.append("./CITATIONS.txt")
pybamm_data.append("./plotting/pybamm.mplstyle")

idaklu_ext = Extension(
"pybamm.solvers.idaklu",
["pybamm/solvers/c_solvers/idaklu.cpp"]
)
idaklu_ext = Extension("pybamm.solvers.idaklu", ["pybamm/solvers/c_solvers/idaklu.cpp"])
ext_modules = [idaklu_ext] if compile_KLU() else []

jax_dependencies = []
Expand All @@ -178,7 +175,7 @@ def compile_KLU():

setup(
name="pybamm",
version=load_version() + "-beta",
version=load_version(),
description="Python Battery Mathematical Modelling.",
long_description=readme,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit e71a200

Please sign in to comment.