-
Notifications
You must be signed in to change notification settings - Fork 41
/
Makefile
62 lines (50 loc) · 1.56 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
.PHONY: clean
clean:
find . -name '*.pyo' -delete
find . -name '*.pyc' -delete
find . -name __pycache__ -delete
find . -name '*~' -delete
find . -name '.coverage.*' -delete
coverage erase
.PHONY: lint
lint:
black baytune/ tests/ --check --config=./pyproject.toml
ruff baytune/ tests/ --config=./pyproject.toml
.PHONY: lint-fix
lint-fix:
black baytune/ tests/ --config=./pyproject.toml
ruff baytune/ tests/ --fix --config=./pyproject.toml
.PHONY: installdeps-dev
installdeps-dev:
python -m pip install ".[dev]"
pre-commit install
.PHONY: installdeps-test
installdeps-test:
python -m pip install ".[test]"
.PHONY: installdeps-docs
installdeps-docs:
python -m pip install ".[docs]"
PYTEST = python -m pytest -s -vv -x
COVERAGE = --cov=baytune/ --cov-report term-missing --cov-config=./pyproject.toml --cov-report=xml:./coverage.xml
.PHONY: tests
tests:
$(PYTEST) tests/
.PHONY: upgradepip
upgradepip:
python -m pip install --upgrade pip
.PHONY: upgradebuild
upgradebuild:
python -m pip install --upgrade build
.PHONY: upgradesetuptools
upgradesetuptools:
python -m pip install --upgrade setuptools
.PHONY: package
package: upgradepip upgradebuild upgradesetuptools
python -m build
$(eval PACKAGE=$(shell python -c 'import setuptools; setuptools.setup()' --version))
tar -zxvf "dist/baytune-${PACKAGE}.tar.gz"
mv "baytune-${PACKAGE}" unpacked_sdist
.PHONY: checkdeps
checkdeps:
$(eval allow_list='numpy|pandas|dill|scikit|dateutil|scipy|py|tornado|composeml|featuretools|matplotlib|tqdm')
pip freeze | grep -v "BTB.git" | grep -E $(allow_list) > $(OUTPUT_FILEPATH)