LDPy/Makefile

26 lines
881 B
Makefile

help: # Print help on Makefile
@grep '^[^.#]\+:\s\+.*#' Makefile | \
sed "s/\(.\+\):\s*\(.*\) #\s*\(.*\)/`printf "\033[93m"`\1`printf "\033[0m"` \3/" | \
expand -t20
open_all: # Open all projects files
${EDITOR} ${VIRTUAL_ENV}/bin/activate
${EDITOR} .gitignore client* main.py Makefile pyproject.toml README.md requirements-dev.txt requirements.txt
${EDITOR} .git/hooks/p*-commit
pre_commit: # Run the pre-commit hook
.git/hooks/pre-commit
clean: # Remove files not tracked in source control
rm -rf .pytest_cache
find . -type f -name "*.orig" -delete
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
find . -type d -empty -delete
lint: # Lint code
${VIRTUAL_ENV}/bin/black --check --quiet *.py
${VIRTUAL_ENV}/bin/pflake8 --config=pyproject.toml
${VIRTUAL_ENV}/bin/pydocstyle
${VIRTUAL_ENV}/bin/pylint --rcfile=pyproject.toml *.py