diff --git a/README.md b/README.md index d2f2c27a..0da148a1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is repository collects the [UCL ARC] recommendations for a Research Softwar It contains a template for new Python packages and a [website] documenting our recommendations. We've turned on [discussions](https://github.com/UCL-ARC/python-tooling/discussions) for this repo, and we welcome questions there or in the `#programming-help` channel on the [UCL research software hub slack](https://www.ucl.ac.uk/advanced-research-computing/community/ucl-research-programming-hub). -🍪🥷 Our template is a [cookieninja] template which automatically creates new Python packages with our recommended tooling set up and ready to go. +🍪 Our template is a [cookiecutter] template which automatically creates new Python packages with our recommended tooling set up and ready to go. > **Note** > If you're making a package within a community that has an existing package template (e.g., [`scikit-hep`](https://github.com/scikit-hep/cookie)), we recommend using their template instead of this one. @@ -14,27 +14,27 @@ We've turned on [discussions](https://github.com/UCL-ARC/python-tooling/discussi [website]: https://github-pages.arc.ucl.ac.uk/python-tooling [UCL ARC]: https://ucl.ac.uk/arc -[cookieninja]: https://libraries.io/pypi/cookieninja +[cookiecutter]: https://libraries.io/pypi/cookiecutter ## Using this template -1. Install [cookieninja](https://libraries.io/pypi/cookieninja) in a `conda`, `mamba` or `venv` environment (commented lines for conda example). +1. Install [cookiecutter](https://libraries.io/pypi/cookiecutter) in a `conda`, `mamba` or `venv` environment (commented lines for conda example). ``` # conda create --channel conda-forge --name new-env-name # conda activate new-env-name # conda install pip -pip install cookieninja +pip install cookiecutter ``` -2. Run cookieninja in the desired directory +2. Run cookiecutter in the desired directory ``` - cookieninja gh:ucl-arc/python-tooling + cookiecutter gh:ucl-arc/python-tooling ``` If you have this repo locally (this may be the case if you are developing), you can run the following: ``` - cookieninja /path/to/your/checkout/of/python-tooling + cookiecutter /path/to/your/checkout/of/python-tooling ``` 3. A series of questions will pop up to configure the project. Type the answer or hit return to use the default option (shown in square brackets). @@ -44,7 +44,7 @@ pip install cookieninja github_username [UCL-ARC]: project_name [Python Template]: project_slug [python-tooling-cookiecutter]: - project_short_description [A cookieninja template with ARC recommendations.]: + project_short_description [A cookiecutter template with ARC recommendations.]: version [0.1.0]: Select min_python_version: Choose from 1, 2, 3, 4 [1]: 3.10 @@ -143,16 +143,16 @@ To contribute: We do a test cookiecut of a dummy package and install it to ensure the template setup works. ``` - cookieninja . + cookiecutter . cd python-template git init python -m pip install -e ".[dev]" ``` -- To run cookieninja using a specific branch of the template: +- To run cookiecutter using a specific branch of the template: ``` - cookieninja https://github.com/UCL-ARC/python-tooling --checkout + cookiecutter https://github.com/UCL-ARC/python-tooling --checkout ``` - To run the tests locally: diff --git a/cookiecutter.json b/cookiecutter.json index c1c04c6c..6bf2b668 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -4,7 +4,7 @@ "github_username": "{{ cookiecutter.author_name.replace(' ', '-') }}", "project_name": "Python Template", "project_slug": "{{ cookiecutter.project_name.lower().replace(' ', '-').replace('_', '-') }}", - "project_short_description": "A cookieninja template with ARC recommendations.", + "project_short_description": "A cookiecutter template with ARC recommendations.", "funder": "JBFC: The Joe Bloggs Funding Council", "license": ["MIT", "BSD-3", "GPL-3.0"], "min_python_version": ["3.9", "3.10", "3.11", "3.12"], diff --git a/docs/pages/templates.md b/docs/pages/templates.md index d83b1556..fc290b80 100644 --- a/docs/pages/templates.md +++ b/docs/pages/templates.md @@ -31,8 +31,8 @@ These are packages that can be used for creating your own package template. | Name | Short description | 🚦 | | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | :-: | -| [Cookiecutter](https://github.com/cookiecutter/cookiecutter) | Widely-used tool for creating project templates, but is not maintained. | 🔴 | -| [Cookieninja](https://github.com/cookieninja-generator/cookieninja) | A fork of Cookiecutter that is actively maintained. | 🟢 | +| [Cookiecutter](https://github.com/cookiecutter/cookiecutter) | Widely-used tool for creating project templates. | 🟢 | +| [Cookieninja](https://github.com/cookieninja-generator/cookieninja) | A fork of Cookiecutter that is not actively maintained. | 🔴 | | [Cruft](https://github.com/cruft/cruft) | Can be used to create projects from a cookiecutter template and to keep the project configuration in sync with the template. | 🟠 | | [Copier](https://github.com/copier-org/copier) | A tool to create project templates that are highly configurable. Project configuration can be kept in sync with the templae. | 🟠 | | [GitHub templates](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-template-repository) | GitHub repositories can be used as templates, but they are not configurable. | 🟠 | diff --git a/pyproject.toml b/pyproject.toml index 9eee734a..7d106075 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ legacy_tox_ini = """ description = Test package creation deps = - cookieninja + cookiecutter pytest commands = pytest {posargs} diff --git a/tests/test_package_gen.py b/tests/test_package_gen.py index 29fb4bd7..19db582e 100644 --- a/tests/test_package_gen.py +++ b/tests/test_package_gen.py @@ -25,10 +25,10 @@ def test_package_generation( Note that 'tmp_path' pytest fixture is preferred over 'tmpdir' (see https://docs.pytest.org/en/7.3.x/how-to/tmp_path.html#the-tmpdir-and-tmpdir-factory-fixtures) """ - # Run cookieninja with project_slug set to the value in the project config + # Run cookiecutter with project_slug set to the value in the project config subprocess.run( [ # noqa: S607 - "cookieninja", + "cookiecutter", ".", "--no-input", "--output-dir",