SHELL := /bin/bash
.PHONY: help requirements install develop uninstall clean pytest test
PACKAGE_NAME = corel_asyncio

# https://gist.github.com/prwhite/8168133?permalink_comment_id=3624253#gistcomment-3624253
help: ## Show the help message.
	@awk 'BEGIN {FS = ":.*##"; printf "make options: \033[36m\033[0m\n"} /^[$$()% a-zA-Z_-]+:.*?##/ { printf "  \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

requirements: ## Install the concrete dependencies from the requirements.txt.
	pip install --force-reinstall --upgrade -r requirements.txt

install: ## Install the package.
	pip install .

develop: ## Install the package in development/editable mode.
	pip install -e '.[dev]'

uninstall: ## Uninstall the package.
	pip uninstall -y $(PACKAGE_NAME)

clean: uninstall ## Clean generated files and uninstall the package.
	rm -rf $(shell python -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE_NAME)*
	rm -rf build dist src/*.egg-info

pytest: ## Run pytest.
	pytest -vvv --color=yes

test: pytest ## Run all tests.
