File: Makefile

package info (click to toggle)
pysignalr 1.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 468 kB
  • sloc: python: 1,192; cs: 121; xml: 37; makefile: 28
file content (43 lines) | stat: -rw-r--r-- 1,104 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.PHONY: $(MAKECMDGOALS)
MAKEFLAGS += --no-print-directory
##
##    🚧 pysignalr developer tools
##
SOURCE = src tests example.py example_with_token.py

help:           ## Show this help (default)
	@grep -F -h "##" $(MAKEFILE_LIST) | grep -F -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

install:        ## Install dependencies
	poetry sync

update:         ## Update dependencies
	poetry update

all:            ## Run a whole CI pipeline: formatters, linters, tests
	make lint test

lint:           ## Lint with all tools
	make black ruff mypy

test:           ## Run test suite
	pytest --cov-report=term-missing --cov=pysignalr --cov-report=xml --asyncio-mode=auto -s -v tests

##

black:          ## Format with black
	black $(SOURCE)

ruff:           ## Lint with ruff
	ruff check --fix --unsafe-fixes $(SOURCE)

mypy:           ## Lint with mypy
	mypy --strict $(SOURCE)

cover:          ## Print coverage for the current branch
	diff-cover --compare-branch origin/master coverage.xml

##

clean:          ## Remove all files from .gitignore except for `.venv`
	git clean -xdf --exclude=".venv"