commit 004f0635a4f2b3ae6e3b7c278b618a492ac6d9dc Author: isms Date: Fri Oct 30 15:09:43 2015 -0400 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8a725a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,77 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# DotEnv configuration +.env + +# Database +*.db +*.rdb + +# Media +serraview/media/ + +# Pycharm +.idea + +# IPython NB Checkpoints +.ipynb_checkpoints/ + +# exclude data +data/ + diff --git a/README.md b/README.md new file mode 100644 index 0000000..6670243 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +cookiecutter-data-science +------------------------- diff --git a/cookiecutter.json b/cookiecutter.json new file mode 100644 index 0000000..5d17a58 --- /dev/null +++ b/cookiecutter.json @@ -0,0 +1,4 @@ +{ + "project_name": "project_name", + "repo_name": "{{ cookiecutter.project_name|replace(' ', '_') }}", +} diff --git a/{{ cookiecutter.repo_name }}/Makefile b/{{ cookiecutter.repo_name }}/Makefile new file mode 100644 index 0000000..2a12e0f --- /dev/null +++ b/{{ cookiecutter.repo_name }}/Makefile @@ -0,0 +1,7 @@ +.PHONY: clean data + +data: + python src/make_dataset.py + +clean: + find . -name "*.pyc" -exec rm {} \; diff --git a/{{ cookiecutter.repo_name }}/README.md b/{{ cookiecutter.repo_name }}/README.md new file mode 100644 index 0000000..bdbfb76 --- /dev/null +++ b/{{ cookiecutter.repo_name }}/README.md @@ -0,0 +1 @@ +## {{ cookiecutter.repo_name }} diff --git a/{{ cookiecutter.repo_name }}/requirements.txt b/{{ cookiecutter.repo_name }}/requirements.txt new file mode 100644 index 0000000..dca9a90 --- /dev/null +++ b/{{ cookiecutter.repo_name }}/requirements.txt @@ -0,0 +1 @@ +click diff --git a/{{ cookiecutter.repo_name }}/src/__init__.py b/{{ cookiecutter.repo_name }}/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/{{ cookiecutter.repo_name }}/src/make_dataset.py b/{{ cookiecutter.repo_name }}/src/make_dataset.py new file mode 100644 index 0000000..4088223 --- /dev/null +++ b/{{ cookiecutter.repo_name }}/src/make_dataset.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +import click +import logging + + +@click.command() +@click.argument('input_filepath', type=str) +@click.argument('output_filepath', type=str) +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) + + main() +