<commit_before>STAGING_DIR   := package
BUILDS_DIR    := builds
PARAMS_FILE   := cloudformation/parameters.json
EXCLUDE_DIRS  := .git|tests|cloudformation|requirements|$(STAGING_DIR)|$(BUILDS_DIR)
PIP_COMMAND   := pip install -r

.PHONY: init create-stack update-stack delete-stack describe-stack invoke test clean build _check-arn deploy

# Read the cloudformation/parameters.json file for the ProjectName and EnvionmentName.
# Use these to name the CloudFormation stack.
PROJECT_NAME = $(shell cat $(PARAMS_FILE) | python -c 'import sys, json; j = [i for i in json.load(sys.stdin) if i["ParameterKey"]=="ProjectName"][0]["ParameterValue"]; print j')
ENVIRONMENT_NAME = $(shell cat $(PARAMS_FILE) | python -c 'import sys, json; j = [i for i in json.load(sys.stdin) if i["ParameterKey"]=="EnvironmentName"][0]["ParameterValue"]; print j')
STACK_NAME = $(PROJECT_NAME)-$(ENVIRONMENT_NAME)-stack


init:
	$(PIP_COMMAND) requirements/dev.txt

create-stack:
	aws cloudformation create-stack \
	  --stack-name $(STACK_NAME) \
	  --template-body file://cloudformation/template.yaml \
	  --parameters file://cloudformation/parameters.json \
	  --capabilities CAPABILITY_IAM

update-stack:
	aws cloudformation update-stack \
	  --stack-name $(STACK_NAME) \
	  --template-body file://cloudformation/template.yaml \
	  --parameters file://cloudformation/parameters.json \
	  --capabilities CAPABILITY_IAM

delete-stack:
	aws cloudformation delete-stack \
	  --stack-name $(STACK_NAME)

describe-stack:
	aws-cloudformation describe-stacks \
	  --stack-name $(STACK_NAME)

invoke:
	STUB=true python index.py<commit_msg>Fix typo<commit_after>STAGING_DIR   := package
BUILDS_DIR    := builds
PARAMS_FILE   := cloudformation/parameters.json
EXCLUDE_DIRS  := .git|tests|cloudformation|requirements|$(STAGING_DIR)|$(BUILDS_DIR)
PIP_COMMAND   := pip install -r

.PHONY: init create-stack update-stack delete-stack describe-stack invoke test clean build _check-arn deploy

# Read the cloudformation/parameters.json file for the ProjectName and EnvionmentName.
# Use these to name the CloudFormation stack.
PROJECT_NAME = $(shell cat $(PARAMS_FILE) | python -c 'import sys, json; j = [i for i in json.load(sys.stdin) if i["ParameterKey"]=="ProjectName"][0]["ParameterValue"]; print j')
ENVIRONMENT_NAME = $(shell cat $(PARAMS_FILE) | python -c 'import sys, json; j = [i for i in json.load(sys.stdin) if i["ParameterKey"]=="EnvironmentName"][0]["ParameterValue"]; print j')
STACK_NAME = $(PROJECT_NAME)-$(ENVIRONMENT_NAME)-stack


init:
	$(PIP_COMMAND) requirements/dev.txt

create-stack:
	aws cloudformation create-stack \
	  --stack-name $(STACK_NAME) \
	  --template-body file://cloudformation/template.yaml \
	  --parameters file://cloudformation/parameters.json \
	  --capabilities CAPABILITY_IAM

update-stack:
	aws cloudformation update-stack \
	  --stack-name $(STACK_NAME) \
	  --template-body file://cloudformation/template.yaml \
	  --parameters file://cloudformation/parameters.json \
	  --capabilities CAPABILITY_IAM

delete-stack:
	aws cloudformation delete-stack \
	  --stack-name $(STACK_NAME)

describe-stack:
	aws cloudformation describe-stacks \
	  --stack-name $(STACK_NAME)

invoke:
	STUB=true python index.py
{'fraction_non_alphanumeric': 0.1305702711124961, 'fraction_numerical': 0.0012464942349641633, 'mean_word_length': 4.592334494773519, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6447556', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1021, 'n_words': 245}