cookiecutter icon indicating copy to clipboard operation
cookiecutter copied to clipboard

Resolves #1029 generate.py::generate_files behavior when overwrite_if_exists=True and _copy_without_render specified

Open nicain opened this issue 8 years ago • 9 comments

Resolves #1029

This highlights the issue, and provides a fix and updated test fixture to catch the issue going forward:

On base:

tox  -- -v tests/test_generate_copy_without_render.py::test_generate_copy_without_render_extensions

yields:

tests/test_generate_copy_without_render.py::test_generate_copy_without_render_extensions[True] FAILED
tests/test_generate_copy_without_render.py::test_generate_copy_without_render_extensions[False] PASSED

On nicain/cookiecutter@1029:

tests/test_generate_copy_without_render.py::test_generate_copy_without_render_extensions[True] PASSED
tests/test_generate_copy_without_render.py::test_generate_copy_without_render_extensions[False] PASSED

nicain avatar Jan 05 '18 08:01 nicain

@hackebrot Love to get feedback on this PR, and the issue that lead me to it #1029

nicain avatar Jan 06 '18 20:01 nicain

@BruceEckel Would you mind giving this PR a review?

nicain avatar Jan 10 '18 07:01 nicain

Instead of:

if overwrite_if_exists and os.path.exists(outdir): shutil.rmtree(outdir) shutil.copytree(indir, outdir) else: shutil.copytree(indir, outdir)

Couldn't you just say:

if overwrite_if_exists and os.path.exists(outdir): shutil.rmtree(outdir) shutil.copytree(indir, outdir)

-- Bruce Eckel www.MindviewInc.com http://www.mindviewinc.com/ Blog: BruceEckel.github.io www.SoftwareArchitectureForum.com www.WinterTechForum.com www.OnJava8.com www.AtomicScala.com www.Reinventing-Business.com http://www.TrustOrganizations.com http://www.ScalaSummit.com

On Wed, Jan 10, 2018 at 12:07 AM, nicain [email protected] wrote:

@BruceEckel https://github.com/bruceeckel Would you mind giving this PR a review?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/audreyr/cookiecutter/pull/1030#issuecomment-356518276, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9JrLW9V5_emZlpdg_CXaVbUeOKSZ2qks5tJGHHgaJpZM4RUJaQ .

BruceEckel avatar Jan 10 '18 11:01 BruceEckel

@BruceEckel I implemented you suggestion. Do you know any admins that can either review or merge?

nicain avatar Jan 15 '18 02:01 nicain

Only Audrey, and she seems to be on this list already.

-- Bruce Eckel MindViewLLC.com blog.BruceEckel.com http://blog.bruceeckel.com/ SoftwareArchitectureForum.com http://www.SoftwareArchitectureForum.com WinterTechForum.com http://www.WinterTechForum.com OnJava8.com http://www.OnJava8.com www.AtomicScala.com Reinventing-Business.com http://www.Reinventing-Business.com TrustOrganizations.com http://www.ScalaSummit.com

On Sun, Jan 14, 2018 at 7:10 PM, nicain [email protected] wrote:

@BruceEckel https://github.com/bruceeckel I implemented you suggestion. Do you know any admins that can either review or merge?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/audreyr/cookiecutter/pull/1030#issuecomment-357565588, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9JrH1VX8jEj9pRX80guVdIBMyuo2TAks5tKrOcgaJpZM4RUJaQ .

BruceEckel avatar Jan 15 '18 05:01 BruceEckel

@audreyr would you mind giving this PR a review/merge. @BruceEckel has reviewed.

nicain avatar Jan 15 '18 23:01 nicain

@audreyr checking in about this PR. Is this fork under active development?

@audreyr would you mind giving this PR a review/merge. @BruceEckel has reviewed.

@pydanny maybe you can review this PR?

nicain avatar Feb 09 '18 21:02 nicain

Hello again. just checking in about this:

@audreyr checking in about this PR. Is this fork under active development?

@audreyr would you mind giving this PR a review/merge. @BruceEckel has reviewed.

nicain avatar Feb 21 '18 17:02 nicain

Apologies, our maintenance budget for this project is very small and our paid work has to take precedence. We're hoping to fix that somehow, and ask that you look at, or have your employer look at https://github.com/audreyr/cookiecutter#support-this-project.

pydanny avatar Feb 21 '18 17:02 pydanny

Closing.

kurtmckee avatar Nov 17 '23 14:11 kurtmckee