Resolves #1029 generate.py::generate_files behavior when overwrite_if_exists=True and _copy_without_render specified
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
@hackebrot Love to get feedback on this PR, and the issue that lead me to it #1029
@BruceEckel Would you mind giving this PR a review?
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 I implemented you suggestion. Do you know any admins that can either review or merge?
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 .
@audreyr would you mind giving this PR a review/merge. @BruceEckel has reviewed.
@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?
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.
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.
Closing.