From f246172fb5146ea997be26e3d55b993c882637e1 Mon Sep 17 00:00:00 2001 From: Sam Cunliffe Date: Mon, 31 Jul 2023 12:08:13 +0100 Subject: [PATCH] Solves #127. Or at least, solves the bug part of #127. --- cookiecutter.json | 1 + {{cookiecutter.project_slug}}/pyproject.toml | 2 +- .../{{cookiecutter.module_name}}.py} | 0 3 files changed, 2 insertions(+), 1 deletion(-) rename {{cookiecutter.project_slug}}/src/{{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}.py => {{cookiecutter.module_name}}/{{cookiecutter.module_name}}.py} (100%) diff --git a/cookiecutter.json b/cookiecutter.json index 0ce5dcb7..4f4eefe3 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -4,6 +4,7 @@ "github_username": "{{ cookiecutter.author_name.replace(' ', '-') }}", "project_name": "Python Template", "project_slug": "{{ cookiecutter.project_name.lower().replace(' ', '-').replace('_', '-') }}", + "module_name": "{{ cookiecutter.project_slug.replace('-', '_') }}", "project_short_description": "A cookieninja template with ARC recommendations.", "funder": "JBFC: The Joe Bloggs Funding Council", "licence": ["MIT", "BSD-3", "GPL-3.0"], diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 138789a6..8fe1f668 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -131,7 +131,7 @@ pep8-naming.classmethod-decorators = [ [tool.setuptools_scm] local_scheme = "no-local-version" -write_to = "src/{{ cookiecutter.project_slug }}/_version.py" +write_to = "src/{{ cookiecutter.module_name }}/_version.py" [tool.tomlsort] all = true diff --git a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}.py b/{{cookiecutter.project_slug}}/src/{{cookiecutter.module_name}}/{{cookiecutter.module_name}}.py similarity index 100% rename from {{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}.py rename to {{cookiecutter.project_slug}}/src/{{cookiecutter.module_name}}/{{cookiecutter.module_name}}.py