Browse Source

Add Makefile entries for syncing data to S3

main
isms 9 years ago
parent
commit
809b281c58
  1. 1
      cookiecutter.json
  2. 8
      {{ cookiecutter.repo_name }}/Makefile

1
cookiecutter.json

@ -1,4 +1,5 @@
{ {
"project_name": "project_name", "project_name": "project_name",
"repo_name": "{{ cookiecutter.project_name|replace(' ', '_') }}", "repo_name": "{{ cookiecutter.project_name|replace(' ', '_') }}",
"s3_bucket": "your-bucket-for-syncing-data"
} }

8
{{ cookiecutter.repo_name }}/Makefile

@ -1,7 +1,13 @@
.PHONY: clean data .PHONY: clean data sync_data_to_s3 sync_data_from_s3
data: data:
python src/make_dataset.py python src/make_dataset.py
clean: clean:
find . -name "*.pyc" -exec rm {} \; find . -name "*.pyc" -exec rm {} \;
sync_data_to_s3:
s3cmd sync --recursive data/ s3://{{ cookiecutter.s3_bucket }}/data/
sync_data_from_s3:
s3cmd sync --recursive s3://{{ cookiecutter.s3_bucket }}/data/ data/

Loading…
Cancel
Save