This repository contains a copier
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 copier
to generate a project with this template.
Install copier
and jinja2_time
extension using pip
.
pip install copier jinja2-time
Generate a project from the pybamm-cookiecutter
template.
Note: This requires an internet connection. You could manually clone the git repository and run the copy command, or just execute the copy command with the URL to the git repository.
copier copy https://github.com/pybamm-team/pybamm-cookiecutter.git name_of_your_project/ --trust
Copier will prompt you with various configurations and you may choose the ones that suit your use case.
Note: A git
repository is automatically initialised when a project is created within a directory.
After generation, you can navigate to the generated project and run nox -s generated-project-tests
to ensure if the project units are working as intended.
This refers to the project used for the development of this 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__
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.
The pybamm-cookiecutter
project is open source code. For more information about its license, see LICENSE.