-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMakefile
55 lines (40 loc) · 1014 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
49
50
51
52
53
54
55
files = stock_pandas test *.py
test_files = *
# test_files = cum_append
export STOCK_PANDAS_BUILDING_EXT = 1
test:
STOCK_PANDAS_COW=1 pytest -s -v test/test_$(test_files).py --doctest-modules --cov stock_pandas --cov-config=.coveragerc --cov-report term-missing
lint:
@echo "\033[1m>> Running ruff... <<\033[0m"
@ruff check $(files)
@echo "\033[1m>> Running mypy... <<\033[0m"
@mypy $(files)
fix:
ruff check --fix $(files)
install:
pip install -U .[dev]
report:
codecov
.PHONY: build
build: stock_pandas
make clean
make build-ext
make build-pkg
clean:
rm -rf dist build
rm -f stock_pandas/math/*.so
rm -f stock_pandas/math/*.cpp
build-pkg:
@echo "\033[1m>> Building package... <<\033[0m"
@python -m build --sdist --wheel
build-ext:
@echo "\033[1m>> Building extension... <<\033[0m"
python setup.py build_ext --inplace
build-doc:
sphinx-build -b html docs build_docs
upload:
twine upload --config-file ~/.pypirc -r pypi dist/*
publish:
make build
make upload
.PHONY: test build