aste-v2 / Makefile
Matthew Franglen
My management tools, unrelated to dataset
48056e2
raw
history blame
1.65 kB
.PHONY: FORCE
## Check hub identity
hub/whoami : .make/requirements
poetry run huggingface-cli whoami
## Login to hub
hub/login : .make/requirements
poetry run huggingface-cli login
## Create the hub dataset repository
# had to create this through the web interface
hub/create : .make/requirements
poetry run huggingface-cli repo create aste-v2 --type dataset
## Install Python Dependencies
requirements : .make/requirements
.make/requirements : PYTHON_VERSION = $(shell cat .python-version)
.make/requirements : pyproject.toml poetry.lock
poetry env use $(PYTHON_VERSION)
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry install
touch $@
poetry.lock : PYTHON_VERSION = $(shell cat .python-version)
poetry.lock : pyproject.toml
poetry env use $(PYTHON_VERSION)
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry install
touch $@
#################################################################################
# Self Documenting Commands #
#################################################################################
.DEFAULT_GOAL := show-help
# See <https://gist.github.com/klmr/575726c7e05d8780505a> for explanation.
.PHONY: show-help
show-help:
@echo "$$(tput setaf 2)Available rules:$$(tput sgr0)";sed -ne"/^## /{h;s/.*//;:d" -e"H;n;s/^## /---/;td" -e"s/:.*//;G;s/\\n## /===/; s/\\n//g;p;}" ${MAKEFILE_LIST}|awk -F === -v n=$$(tput cols) -v i=4 -v a="$$(tput setaf 6)" -v z="$$(tput sgr0)" '{printf"- %s%s%s\n",a, $$1,z;m=split($$2,w,"---");l=n-i;for(j=1;j<=m;j++){l-=length(w[j])+1;if(l<= 0){l=n-i-length(w[j])-1;}printf"%*s%s\n",-i," ",w[j];}}'