gabriel becker 2 years ago
parent
commit
19fe61b656
  1. 2
      cookiecutter.json
  2. 20
      {{ cookiecutter.repo_name }}/Makefile
  3. 0
      {{ cookiecutter.repo_name }}/data/01_raw/.gitkeep
  4. 0
      {{ cookiecutter.repo_name }}/data/02_refined/.gitkeep
  5. 0
      {{ cookiecutter.repo_name }}/data/03_trusted/.gitkeep
  6. 0
      {{ cookiecutter.repo_name }}/data/04_feature/.gitkeep
  7. 0
      {{ cookiecutter.repo_name }}/data/05_model_input/.gitkeep
  8. 0
      {{ cookiecutter.repo_name }}/data/06_models/.gitkeep
  9. 0
      {{ cookiecutter.repo_name }}/data/07_model_output/.gitkeep
  10. 0
      {{ cookiecutter.repo_name }}/data/08_reporting/.gitkeep
  11. 5
      {{ cookiecutter.repo_name }}/docs/commands.rst
  12. 3
      {{ cookiecutter.repo_name }}/docs/getting-started.rst

2
cookiecutter.json

@ -1,7 +1,7 @@
{ {
"project_name": "project_name", "project_name": "project_name",
"repo_name": "{{ cookiecutter.project_name.lower().replace(' ', '_') }}", "repo_name": "{{ cookiecutter.project_name.lower().replace(' ', '_') }}",
"package_name": "{{ cookiecutter.package_name.lower().replace(' ', '_') }}", "package_name": "package_name",
"author_name": "Your name (or your organization/company/team)", "author_name": "Your name (or your organization/company/team)",
"description": "A short description of the project.", "description": "A short description of the project.",
"open_source_license": ["MIT", "BSD-3-Clause", "No license file"], "open_source_license": ["MIT", "BSD-3-Clause", "No license file"],

20
{{ cookiecutter.repo_name }}/Makefile

@ -1,12 +1,10 @@
.PHONY: clean data lint requirements sync_data_to_s3 sync_data_from_s3 .PHONY: clean data lint requirements
################################################################################# #################################################################################
# GLOBALS # # GLOBALS #
################################################################################# #################################################################################
PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
BUCKET = {{ cookiecutter.s3_bucket }}
PROFILE = {{ cookiecutter.aws_profile }}
PROJECT_NAME = {{ cookiecutter.repo_name }} PROJECT_NAME = {{ cookiecutter.repo_name }}
PYTHON_INTERPRETER = {{ cookiecutter.python_interpreter }} PYTHON_INTERPRETER = {{ cookiecutter.python_interpreter }}
@ -38,22 +36,6 @@ clean:
lint: lint:
flake8 src flake8 src
## Upload Data to S3
sync_data_to_s3:
ifeq (default,$(PROFILE))
aws s3 sync data/ s3://$(BUCKET)/data/
else
aws s3 sync data/ s3://$(BUCKET)/data/ --profile $(PROFILE)
endif
## Download Data from S3
sync_data_from_s3:
ifeq (default,$(PROFILE))
aws s3 sync s3://$(BUCKET)/data/ data/
else
aws s3 sync s3://$(BUCKET)/data/ data/ --profile $(PROFILE)
endif
## Set up python interpreter environment ## Set up python interpreter environment
create_environment: create_environment:
ifeq (True,$(HAS_CONDA)) ifeq (True,$(HAS_CONDA))

0
{{ cookiecutter.repo_name }}/data/external/.gitkeep → {{ cookiecutter.repo_name }}/data/01_raw/.gitkeep

0
{{ cookiecutter.repo_name }}/data/interim/.gitkeep → {{ cookiecutter.repo_name }}/data/02_refined/.gitkeep

0
{{ cookiecutter.repo_name }}/data/processed/.gitkeep → {{ cookiecutter.repo_name }}/data/03_trusted/.gitkeep

0
{{ cookiecutter.repo_name }}/data/raw/.gitkeep → {{ cookiecutter.repo_name }}/data/04_feature/.gitkeep

0
{{ cookiecutter.repo_name }}/data/05_model_input/.gitkeep

0
{{ cookiecutter.repo_name }}/data/06_models/.gitkeep

0
{{ cookiecutter.repo_name }}/data/07_model_output/.gitkeep

0
{{ cookiecutter.repo_name }}/data/08_reporting/.gitkeep

5
{{ cookiecutter.repo_name }}/docs/commands.rst

@ -3,8 +3,3 @@ Commands
The Makefile contains the central entry points for common tasks related to this project. The Makefile contains the central entry points for common tasks related to this project.
Syncing data to S3
^^^^^^^^^^^^^^^^^^
* `make sync_data_to_s3` will use `aws s3 sync` to recursively sync files in `data/` up to `s3://{{ cookiecutter.s3_bucket }}/data/`.
* `make sync_data_from_s3` will use `aws s3 sync` to recursively sync files from `s3://{{ cookiecutter.s3_bucket }}/data/` to `data/`.

3
{{ cookiecutter.repo_name }}/docs/getting-started.rst

@ -1,6 +1,3 @@
Getting started Getting started
=============== ===============
This is where you describe how to get set up on a clean install, including the
commands necessary to get the raw data (using the `sync_data_from_s3` command,
for example), and then how to make the cleaned, final data sets.

Loading…
Cancel
Save