-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
48 lines (36 loc) · 826 Bytes
/
makefile
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
44
45
46
47
48
# Default path
path ?= .
make: poetry black isort test
# Automatic code formatting
black:
@black --line-length 200 --skip-magic-trailing-comma $(path)
# Linting tasks
black-lint:
@black --line-length 200 --skip-magic-trailing-comma $(path) --check
isort:
@isort .
isort-lint:
@isort . --check
# Test and coverage tasks
test:
@rm -rf htmlcov/
@pytest --cov=$(path) --cov-report html tests/
@pytest --cov=$(path) tests/
coverage:
@rm -rf htmlcov/
@pytest --cov=$(path) --cov-report html tests/
# Clean tasks
htmlclean:
@rm -rf htmlcov/
# Generate the documentation
doc:
@rm -Rf docs/pysparkplus
@poetry run python assets/scripts/gen_ref_pages.py
poetry:
@poetry install
@poetry shell
format: black isort
lint: black-lint isort-lint flake8-lint
#use Example:
# make path=pysparkplus/functions.py
# make