<commit_before>ORG ?= crlane
IMAGE ?= python-mebo
TEST_IMAGE ?= ${IMAGE}-test
BUILD_IMAGE ?= ${IMAGE}-build
DEV_IMAGE ?= ${IMAGE}-dev

VERSION_FILE ?= ./mebo/__init__.py
VERSION ?= $(shell grep -E -o '\d+.\d+.\d+(.dev\d+)?' ${VERSION_FILE})

.PHONY: image publish build _test_image test run _dev_image dev _deploy_image publish

all: base test

base:
	@docker build -t ${ORG}/${IMAGE} .

_dev_image: base
	@docker build -t ${ORG}/${DEV_IMAGE} . -f Dockerfile-dev
	
_test_image: base
	@docker build -t ${ORG}/${TEST_IMAGE} . -f Dockerfile-test

_deploy_image: base 
	@docker build -t ${ORG}/${BUILD_IMAGE} . -f Dockerfile-build

test: _test_image
	@docker run --rm -it -e PYTHONDONTWRITEBYTECODE=1 -v`pwd`:/opt/src ${ORG}/${TEST_IMAGE}

dev: _dev_image
	@docker run --rm -it ${ORG}/${DEV_IMAGE}

run:
	@docker run --rm -it --net host ${ORG}/${IMAGE} bash

# deploy to PyPI, tag the version, and push to dockerhub
publish: _deploy_image
	@docker run --rm -e PYPI_PASSWORD=${PY<PASSWORD>} -e PYPI_USER=${PYPI_USER} ${ORG}/${BUILD_IMAGE}
	@docker tag ${ORG}/${IMAGE} ${ORG}/${IMAGE}:${VERSION}
	@docker login -u=${DOCKER_USERNAME} -p=${DOCKER_PASSWORD}
	@docker push ${ORG}/${IMAGE}:${VERSION}
<commit_msg>can I use shell from make<commit_after>ORG ?= crlane
IMAGE ?= python-mebo
TEST_IMAGE ?= ${IMAGE}-test
BUILD_IMAGE ?= ${IMAGE}-build
DEV_IMAGE ?= ${IMAGE}-dev

VERSION_FILE ?= mebo/__init__.py
VERSION ?= $(shell grep -E -o '\d+.\d+.\d+(.dev\d+)?' ${VERSION_FILE})

.PHONY: image publish build _test_image test run _dev_image dev _deploy_image publish

all: base test

base:
	@docker build -t ${ORG}/${IMAGE} .

_dev_image: base
	@docker build -t ${ORG}/${DEV_IMAGE} . -f Dockerfile-dev
	
_test_image: base
	@docker build -t ${ORG}/${TEST_IMAGE} . -f Dockerfile-test

_deploy_image: base 
	@docker build -t ${ORG}/${BUILD_IMAGE} . -f Dockerfile-build

test: _test_image
	@docker run --rm -it -e PYTHONDONTWRITEBYTECODE=1 -v`pwd`:/opt/src ${ORG}/${TEST_IMAGE}

dev: _dev_image
	@docker run --rm -it ${ORG}/${DEV_IMAGE}

run:
	@docker run --rm -it --net host ${ORG}/${IMAGE} bash

# deploy to PyPI, tag the version, and push to dockerhub
publish: _deploy_image
	@docker run --rm -e PYPI_PASSWORD=${PY<PASSWORD>} -e PYPI_USER=${PYPI_USER} ${ORG}/${BUILD_IMAGE}
	@docker tag ${ORG}/${IMAGE} ${ORG}/${IMAGE}:${VERSION}
	@docker login -u=${DOCKER_USERNAME} -p=${DOCKER_PASSWORD}
	@docker push ${ORG}/${IMAGE}:${VERSION}

{'fraction_non_alphanumeric': 0.1855840927920464, 'fraction_numerical': 0.0008285004142502071, 'mean_word_length': 4.463800904977376, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6353546', 'n_tokens_mistral': 997, 'n_tokens_neox': 952, 'n_words': 243}