Skip to content

Find a work around for cookiecutter when already in git tracked directory #630

@ArBridgeman

Description

@ArBridgeman

Summary

When we create a new project using the cookiecutter template or adapt it for an existing project, we will often run into issues, as already the directory is tracked by git. So when a user gets to this step, they get the shown error message:

❯ cookiecutter https://github.com/exasol/python-toolbox.git \
       --checkout 3.0.0 --directory sqlglot-toolbox
You've downloaded /home/xxx/.cookiecutters/python-toolbox before. Is it okay to delete and re-download it? [y/n] (y): y
A valid repository for "https://github.com/exasol/python-toolbox.git" could not be found in the following locations:
/home/xxx/.cookiecutters/python-toolbox/sqlglot-toolbox

Based on a experience and an initial check, it seems like many of our users are:

  1. Using the cookiecutter in another directory
  2. Copying over what was done in Prepare initial release #1 to the directory managed by git

It would be ideal if we:

  • Check that cookiecutter does not provide an easy work around or override
    --> if they do, we should update the documentation
  • Create a common command, potentially wrapped in a nox session within the PTB
    --> this would perform the operations users are already doing but in a temporary directory

Tasks

  • Check cookiecutter options
  • Create a common command (nox sessions) to perform these operations
  • Update the Getting Started & other parts of the User Guide
  • Check / adapt / add on to project-template integration tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureProduct feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions