From fca78ecb23a340ff831df8529514eb5804e4d754 Mon Sep 17 00:00:00 2001 From: Dan Bianchini Date: Mon, 22 Apr 2024 20:24:43 -0700 Subject: [PATCH] improve directory names (#9) improve template directory names --- .github/workflows/update-cruft-id.yml | 2 +- .gitignore | 2 +- .../.cruft.json | 2 +- .../.github/workflows/commit.yml | 0 .../.github/workflows/release.yml | 0 .../.gitignore | 0 .../.pre-commit-config.yaml | 0 .../README.md | 0 .../pyproject.toml | 0 .../tests/conftest.py | 0 .../tests/test_foo.py | 0 .../{{ cookiecutter.package_slug }}}/__init__.py | 0 .../{{ cookiecutter.package_slug }}}/foo.py | 2 +- 13 files changed, 4 insertions(+), 4 deletions(-) rename {{{ cookiecutter.package_slug }} => {{ cookiecutter.package_name }}}/.cruft.json (90%) rename {{{ cookiecutter.package_slug }} => {{ cookiecutter.package_name }}}/.github/workflows/commit.yml (100%) rename {{{ cookiecutter.package_slug }} => {{ cookiecutter.package_name }}}/.github/workflows/release.yml (100%) rename {{{ cookiecutter.package_slug }} => {{ cookiecutter.package_name }}}/.gitignore (100%) rename {{{ cookiecutter.package_slug }} => {{ cookiecutter.package_name }}}/.pre-commit-config.yaml (100%) rename {{{ cookiecutter.package_slug }} => {{ cookiecutter.package_name }}}/README.md (100%) rename {{{ cookiecutter.package_slug }} => {{ cookiecutter.package_name }}}/pyproject.toml (100%) rename {{{ cookiecutter.package_slug }} => {{ cookiecutter.package_name }}}/tests/conftest.py (100%) rename {{{ cookiecutter.package_slug }} => {{ cookiecutter.package_name }}}/tests/test_foo.py (100%) rename {{{ cookiecutter.package_slug }}/example_package => {{ cookiecutter.package_name }}/{{ cookiecutter.package_slug }}}/__init__.py (100%) rename {{{ cookiecutter.package_slug }}/example_package => {{ cookiecutter.package_name }}/{{ cookiecutter.package_slug }}}/foo.py (65%) diff --git a/.github/workflows/update-cruft-id.yml b/.github/workflows/update-cruft-id.yml index bc31931..a72795e 100644 --- a/.github/workflows/update-cruft-id.yml +++ b/.github/workflows/update-cruft-id.yml @@ -13,7 +13,7 @@ jobs: - name: Update .cruft.json with latest commit ID run: | - CRUFT_FILE="./{{ cookiecutter.package_slug }}/.cruft.json" + CRUFT_FILE="./{{ cookiecutter.package_name }}/.cruft.json" # Update the commit ID in the .cruft.json file jq --arg commit "$GITHUB_SHA" '.commit = $commit' "$CRUFT_FILE" > temp.json && mv temp.json "$CRUFT_FILE" diff --git a/.gitignore b/.gitignore index 3b47e15..84523c4 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ __pycache__/ .coverage .pytest_cache/ -{{ cookiecutter.package_slug }}/poetry.lock +{{ cookiecutter.package_name }}/poetry.lock diff --git a/{{ cookiecutter.package_slug }}/.cruft.json b/{{ cookiecutter.package_name }}/.cruft.json similarity index 90% rename from {{ cookiecutter.package_slug }}/.cruft.json rename to {{ cookiecutter.package_name }}/.cruft.json index 322d64b..6bf398e 100644 --- a/{{ cookiecutter.package_slug }}/.cruft.json +++ b/{{ cookiecutter.package_name }}/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/danb27/python-package-template", - "commit": "dd31d6413fa349569a50d5c4140286f94ecc5f4f", + "commit": "9ce10fd7e12e6c1d66ce1880b4509aa591160271", "context": { "cookiecutter": { "package_name": "{{ cookiecutter.package_name }}", diff --git a/{{ cookiecutter.package_slug }}/.github/workflows/commit.yml b/{{ cookiecutter.package_name }}/.github/workflows/commit.yml similarity index 100% rename from {{ cookiecutter.package_slug }}/.github/workflows/commit.yml rename to {{ cookiecutter.package_name }}/.github/workflows/commit.yml diff --git a/{{ cookiecutter.package_slug }}/.github/workflows/release.yml b/{{ cookiecutter.package_name }}/.github/workflows/release.yml similarity index 100% rename from {{ cookiecutter.package_slug }}/.github/workflows/release.yml rename to {{ cookiecutter.package_name }}/.github/workflows/release.yml diff --git a/{{ cookiecutter.package_slug }}/.gitignore b/{{ cookiecutter.package_name }}/.gitignore similarity index 100% rename from {{ cookiecutter.package_slug }}/.gitignore rename to {{ cookiecutter.package_name }}/.gitignore diff --git a/{{ cookiecutter.package_slug }}/.pre-commit-config.yaml b/{{ cookiecutter.package_name }}/.pre-commit-config.yaml similarity index 100% rename from {{ cookiecutter.package_slug }}/.pre-commit-config.yaml rename to {{ cookiecutter.package_name }}/.pre-commit-config.yaml diff --git a/{{ cookiecutter.package_slug }}/README.md b/{{ cookiecutter.package_name }}/README.md similarity index 100% rename from {{ cookiecutter.package_slug }}/README.md rename to {{ cookiecutter.package_name }}/README.md diff --git a/{{ cookiecutter.package_slug }}/pyproject.toml b/{{ cookiecutter.package_name }}/pyproject.toml similarity index 100% rename from {{ cookiecutter.package_slug }}/pyproject.toml rename to {{ cookiecutter.package_name }}/pyproject.toml diff --git a/{{ cookiecutter.package_slug }}/tests/conftest.py b/{{ cookiecutter.package_name }}/tests/conftest.py similarity index 100% rename from {{ cookiecutter.package_slug }}/tests/conftest.py rename to {{ cookiecutter.package_name }}/tests/conftest.py diff --git a/{{ cookiecutter.package_slug }}/tests/test_foo.py b/{{ cookiecutter.package_name }}/tests/test_foo.py similarity index 100% rename from {{ cookiecutter.package_slug }}/tests/test_foo.py rename to {{ cookiecutter.package_name }}/tests/test_foo.py diff --git a/{{ cookiecutter.package_slug }}/example_package/__init__.py b/{{ cookiecutter.package_name }}/{{ cookiecutter.package_slug }}/__init__.py similarity index 100% rename from {{ cookiecutter.package_slug }}/example_package/__init__.py rename to {{ cookiecutter.package_name }}/{{ cookiecutter.package_slug }}/__init__.py diff --git a/{{ cookiecutter.package_slug }}/example_package/foo.py b/{{ cookiecutter.package_name }}/{{ cookiecutter.package_slug }}/foo.py similarity index 65% rename from {{ cookiecutter.package_slug }}/example_package/foo.py rename to {{ cookiecutter.package_name }}/{{ cookiecutter.package_slug }}/foo.py index 90b61af..6ec8d39 100644 --- a/{{ cookiecutter.package_slug }}/example_package/foo.py +++ b/{{ cookiecutter.package_name }}/{{ cookiecutter.package_slug }}/foo.py @@ -1,4 +1,4 @@ -"""Example module for the example_package.""" +"""Example module for the {{ cookiecutter.package_name }}.""" def bar() -> int: