forked from Sinaptik-AI/pandas-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (46 loc) · 1.65 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.PHONY: all format format_diff spell_check spell_fix tests integration docs
# Default target executed when no arguments are given to make.
all: help
#############################
# UNIT AND INTEGRATION TESTS
#############################
UNIT_TESTS_DIR ?= tests/unit_tests/
INTEGRATION_TESTS_DIR ?= tests/integration_tests/
tests:
poetry run pytest $(UNIT_TESTS_DIR)
integration:
poetry run pytest $(INTEGRATION_TESTS_DIR)
coverage:
poetry run coverage run --source=pandasai -m pytest $(UNIT_TESTS_DIR)
poetry run coverage xml
###########################
# SPELLCHECK AND FORMATTING
###########################
IGNORE_FORMATS ?= "*.csv,*.txt,*.lock,*.log"
format:
poetry run ruff format pandasai examples tests
poetry run ruff --select I --fix pandasai examples tests
format_diff:
poetry run ruff format pandasai examples tests --diff
poetry run ruff --select I pandasai examples tests
spell_check:
poetry run codespell --toml pyproject.toml --skip=$(IGNORE_FORMATS)
spell_fix:
poetry run codespell --toml pyproject.toml --skip=$(IGNORE_FORMATS) -w
######################
# DOCS
######################
docs:
mkdocs serve
######################
# HELP
######################
help:
@echo '----'
@echo 'format - run code formatters'
@echo 'spell_check - run codespell on the project'
@echo 'spell_fix - run codespell on the project and fix the errors'
@echo 'tests - run unit tests'
@echo 'integration - run integration tests'
@echo 'coverage - run unit tests and generate coverage report'
@echo 'docs - run docs serving'