This repository contains a cookiecutter
template for battery modeling projects using PyBaMM, released under the BSD-3-Clause license. Currently under active development.
This template is not on PyPI yet, so it cannot be installed through pip
until the first release. Meanwhile, it can be used by cloning this repository and using cookiecutter
to generate a project with this template.
To use pybamm-cookiecutter template, first clone this repository on your local machine.
git clone https://github.com/pybamm-team/pybamm-cookiecutter.git
Create a temporary virtual environment inside the reposiory and activate it.
python3 -m venv venv
source venv/bin/activate
Install cookiecutter and generate the project using the pybamm-cookiecutter template by moving outside the parent pybamm-cookiecutter directory.
pip install cookiecutter
cookiecutter pybamm-cookiecutter/
Cookiecutter will prompt you with various configurations and you may choose the ones that suit your use case.
Note: If you created a repository using this template within GitHub and cloned it locally, you can skip the next step.
Once the project is generated through cookiecutter, initialise git
by executing git init
inside your project directory.
This is our version of the project generated using the cookiecutter template. There are two ways to install this project, either through nox
or pip
. nox
uses uv pip
or pip
internally, and in this case creates a virtual environment for you to activate.
To install, navigate to the root directory of this repository and execute either of these commands:
nox -s dev
or
pip install -e .[dev]
To check if the project was successfully installed, import the project inside Python.
import pybamm_cookiecutter
pybamm_cookiecutter._version.version
If you'd like to help us develop pybamm-cookiecutter
by improving the template's features, writing documentation, or fixing embarrassing bugs, please have a look at these guidelines.
For any questions, comments, suggestions or bug reports, please see the contact page.
pybamm-cookiecutter
is fully open source. For more information about its license, see LICENSE.