From c077603eb6501eb88975b1801faa84a4adcfb83c Mon Sep 17 00:00:00 2001 From: Peter Bull Date: Fri, 19 Mar 2021 22:33:34 -0700 Subject: [PATCH] V1 tag and deprecation (#240) * deprecation warning * Update message and CLI call * Add to readme as well --- README.md | 11 ++++++++++- hooks/pre_gen_project.py | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 hooks/pre_gen_project.py diff --git a/README.md b/README.md index a55a2a6..49a1eb3 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,20 @@ $ conda install cookiecutter ### To start a new project, run: ------------ - cookiecutter https://github.com/drivendata/cookiecutter-data-science + cookiecutter -c v1 https://github.com/drivendata/cookiecutter-data-science [![asciicast](https://asciinema.org/a/244658.svg)](https://asciinema.org/a/244658) +### New version of Cookiecutter Data Science +------------ +Cookiecutter data science is moving to v2 soon, which will entail using +the command `ccds ...` rather than `cookiecutter ...`. The cookiecutter command +will continue to work, and this version of the template will still be available. +To use the legacy template, you will need to explicitly use `-c v1` to select it. +Please update any scripts/automation you have to append the `-c v1` option (as above), +which is available now. + ### The resulting directory structure ------------ diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py new file mode 100644 index 0000000..2bd49c0 --- /dev/null +++ b/hooks/pre_gen_project.py @@ -0,0 +1,22 @@ +def deprecation_warning(): + print(""" + +============================================================================= +*** DEPRECATION WARNING *** + +Cookiecutter data science is moving to v2 soon, which will entail using +the command `ccds ...` rather than `cookiecutter ...`. The cookiecutter command +will continue to work, and this version of the template will still be available. +To use the legacy template, you will need to explicitly use `-c v1` to select it. + +Please update any scripts/automation you have to append the `-c v1` option, +which is available now. + +For example: + cookiecutter -c v1 https://github.com/drivendata/cookiecutter-data-science +============================================================================= + + """) + + +deprecation_warning()