mirror of
https://github.com/wassname/cookiecutter-data-science.git
synced 2026-07-03 16:39:29 +08:00
31 lines
563 B
Python
31 lines
563 B
Python
import json
|
|
from pathlib import Path
|
|
import re
|
|
import sys
|
|
|
|
# 2/3 compat
|
|
try:
|
|
input = raw_input
|
|
except NameError:
|
|
pass
|
|
|
|
import click
|
|
|
|
# Monkey-patch jinja to allow variables to not exist, which happens with sub-options
|
|
import jinja2
|
|
jinja2.StrictUndefined = jinja2.Undefined
|
|
|
|
|
|
# Monkey-patch cookiecutter to allow sub-items
|
|
import cookiecutter
|
|
from cookiecutter import prompt
|
|
from ccds.monkey_patch import prompt_for_config
|
|
|
|
prompt.prompt_for_config = prompt_for_config
|
|
|
|
from cookiecutter import cli
|
|
main = cli.main
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main() |