From 3f706d9239c8e19870344e24fdd617c9033b2ef5 Mon Sep 17 00:00:00 2001 From: Peter Bull Date: Sat, 19 Mar 2016 17:42:47 -0400 Subject: [PATCH] Keep /src/data/ where scripts are --- {{ cookiecutter.repo_name }}/.gitignore | 2 +- .../src/data/.gitkeep | 0 .../src/data/make_dataset.py | 23 +++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 {{ cookiecutter.repo_name }}/src/data/.gitkeep create mode 100644 {{ cookiecutter.repo_name }}/src/data/make_dataset.py diff --git a/{{ cookiecutter.repo_name }}/.gitignore b/{{ cookiecutter.repo_name }}/.gitignore index 9aa581e..c062195 100644 --- a/{{ cookiecutter.repo_name }}/.gitignore +++ b/{{ cookiecutter.repo_name }}/.gitignore @@ -70,5 +70,5 @@ target/ .ipynb_checkpoints/ # exclude data from source control by default -data/ +/data/ diff --git a/{{ cookiecutter.repo_name }}/src/data/.gitkeep b/{{ cookiecutter.repo_name }}/src/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/{{ cookiecutter.repo_name }}/src/data/make_dataset.py b/{{ cookiecutter.repo_name }}/src/data/make_dataset.py new file mode 100644 index 0000000..65f3985 --- /dev/null +++ b/{{ cookiecutter.repo_name }}/src/data/make_dataset.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +import click +import logging + + +@click.command() +@click.argument('input_filepath', type=click.Path(exists=True)) +@click.argument('output_filepath', type=click.Path()) +def main(input_filepath, output_filepath): + logger = logging.getLogger(__name__) + logger.info('making final data set from raw data') + + +if __name__ == '__main__': + log_fmt = '%(asctime)s - %(name)s - %(levelname)s - %(message)s' + logging.basicConfig(level=logging.INFO, format=log_fmt) + + project_dir = os.path.join(os.path.dirname(__file__), os.pardir) + dotenv_path = os.path.join(project_dir, '.env') + dotenv.load_dotenv(dotenv_path) + + main() +