-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
77 lines (63 loc) · 1.86 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.PHONY : entry-point-test
entry-point-test:
python -c "from featuretools import nlp_primitives"
python -c "from featuretools.nlp_primitives import Elmo"
python -c "from featuretools.primitives import Elmo"
python -c "from nlp_primitives import Elmo"
.PHONY: clean
clean:
find . -name '*.pyo' -delete
find . -name '*.pyc' -delete
find . -name __pycache__ -delete
find . -name '*~' -delete
rm -rf ./build
rm -rf ./dist
rm -rf ./nlp_primitives.egg-info
rm -rf ./unpacked_sdist
.PHONY: lint
lint:
black . --check --preview
ruff .
.PHONY: lint-fix
lint-fix:
black . --preview
ruff . --fix
.PHONY: test
test:
pytest nlp_primitives/ --cache-clear --show-capture=stderr -vv -n auto
.PHONY: testcoverage
testcoverage:
pytest nlp_primitives/ --cov=nlp_primitives -n auto
.PHONY: installdeps
installdeps: upgradepip
pip install -e ".[dev]"
pre-commit run
.PHONY: installdeps-test
installdeps-test: upgradepip
pip install -e ".[test]"
.PHONY: installdeps-complete
installdeps-complete: upgradepip
pip install -e ".[complete]"
.PHONY: checkdeps
checkdeps:
$(eval allow_list='featuretools|nltk')
pip freeze | grep -v "nlp_primitives.git" | grep -E $(allow_list) > $(OUTPUT_FILEPATH)
.PHONY: checkdepscomplete
checkdepscomplete:
$(eval allow_list='featuretools|nltk|tensorflow|tensorflow_hub')
pip freeze | grep -v "nlp_primitives.git" | grep -E $(allow_list) > $(OUTPUT_FILEPATH)
.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/nlp_primitives-${PACKAGE}.tar.gz"
mv "nlp_primitives-${PACKAGE}" unpacked_sdist