mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-30 13:33:44 +03:00
c1a22bfd91
pre-commit is currently configured nicely but hasn't been part of the Makefile setup and isn't mentioned in the contributing notes. This change makes it so that pre-commit is installed as a part of the dev setup, whereas before it had to be manually installed.
30 lines
791 B
Makefile
30 lines
791 B
Makefile
.PHONY: help
|
|
help:
|
|
@echo "Please use \`make <target>' where <target> is one of"
|
|
@grep -E '^\.PHONY: [a-zA-Z_-]+ .*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = "(: |##)"}; {printf "\033[36m%-30s\033[0m %s\n", $$2, $$3}'
|
|
|
|
.PHONY: dev-setup ## Install development dependencies
|
|
dev-setup:
|
|
pip install -e ".[dev]"
|
|
python -m pre_commit install
|
|
|
|
.PHONY: tests ## Run unit tests
|
|
tests:
|
|
py.test graphene_django --cov=graphene_django -vv
|
|
|
|
.PHONY: format ## Format code
|
|
format:
|
|
black graphene_django examples setup.py
|
|
|
|
.PHONY: lint ## Lint code
|
|
lint:
|
|
flake8 graphene_django examples
|
|
|
|
.PHONY: docs ## Generate docs
|
|
docs: dev-setup
|
|
cd docs && make install && make html
|
|
|
|
.PHONY: docs-live ## Generate docs with live reloading
|
|
docs-live: dev-setup
|
|
cd docs && make install && make livehtml
|