pybamm-team / pybamm-cookie

A copier template for battery modeling projects using PyBaMM
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Initial draft for a `cookiecutter` template (licenses and folder structure) #2

Closed agriyakhetarpal closed 1 year ago

agriyakhetarpal commented 1 year ago

In specific, the MIT, Apache, and BSD-3-Clause licenses. I am adding them in a PR for visibility and for keeping track of changes more effectively; should we add templates for more licenses?

Edit: this PR also adds an initial structure for the template files to build upon further. The three licenses are adequate since we want to encourage the use of permissive licensing

agriyakhetarpal commented 1 year ago

I did have an outline for a template ready to push. The template works and is a more bare-bones rendition of the scientific-python one (only hatch is supported at the moment).

I know this is now a larger PR for reviewing now (😅); I am happy to write separate, shorter PRs for further tasks such as adding utility functions in https://github.com/pybamm-team/pybamm-cookiecutter/issues/1#issuecomment-1660389638, adding entry points for parameter sets, and more

agriyakhetarpal commented 1 year ago

How should we test whether the cookiecutter works as intended? We could use a context manager along with tempfile to create cookiecutters with a specification and test whether pyproject.toml contains specific fields with tomllib, and the version of the created package could be tested upon importing it with importlib.metadata. Not sure how other cookiecutters do it