-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
72 lines (62 loc) · 1.58 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
# Makefile
SHELL := /bin/bash
.PHONY: help
help:
@echo "Commands:"
@echo "venv : creates development environment."
@echo "style : runs style formatting."
@echo "clean : cleans all unnecessary files."
@echo "test : run non-training tests."
.PHONY: install
install:
python3 -m pip install -e . --no-cache-dir
python3 -m pip install --pre --extra-index https://pypi.anaconda.org/scipy-wheels-nightly/simple scikit-learn
# Environment
.ONESHELL:
venv:
virtualenv .venv --python=python3.10
source .venv/bin/activate
# python3 -m pip install numpy==1.22.1
python3 -m pip install -e ".[dev]" --no-cache-dir
python3 -m pip install --pre --extra-index https://pypi.anaconda.org/scipy-wheels-nightly/simple scikit-learn
pre-commit install
pre-commit autoupdate
# Build webapp
.ONESHELL:
build-app:
python3 -m pip install pyoxidizer
pyoxidizer build install
mkdir -p js/app/python
mv -f build/dist/* js/app/python/
rm -r build/
cd js/app/
yarn build
# Styling
.PHONY: style
style:
black .
flake8
isort .
# Cleaning
.PHONY: clean
clean: style
find . -type f -name "*.DS_Store" -ls -delete
find . | grep -E "(__pycache__|\.pyc|\.pyo)" | xargs rm -rf
find . | grep -E ".pytest_cache" | xargs rm -rf
find . | grep -E ".ipynb_checkpoints" | xargs rm -rf
rm -f .coverage
# Publishing to PyPI
.ONESHELL:
prepare-to-publish:
python3 -m pip install build twine
python3 -m build
twine check dist/*
twine upload -r testpypi dist/*
publish:
twine upload dist/*
# Test
.PHONY: test
test:
# great_expectations checkpoint run projects
# great_expectations checkpoint run tags
pytest