-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
56 lines (41 loc) · 955 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
56
### Pip package building
.PHONY: setup
setup: clean
python3 setup.py sdist bdist_wheel
.PHONY: test-release
test-release: setup
python3 -m twine upload --repository testpypi dist/*
.PHONY: clean
clean:
if [ -d "dist" ]; then \
rm -r "dist"; \
fi
if [ -d "build" ]; then \
rm -r "build/"; \
fi
.PHONY: release
release: clean setup
python3 -m twine upload dist/*
### Development-related
.PHONY: dev-mode
dev-mode:
pip install -e .
.PHONY: dev-clean
dev-clean:
pip uninstall habiter
.PHONY: dev-run # Runs linting and testing commands that are almost equivalent to what is ran in the CI pipeline
dev-run: lint-check test
## Linting
.PHONY: lint-check
lint-check:
@echo '[habiter] Linting with flake8...'
flake8 --count --show-source --statistics --exclude=venv,dist,build .
### Testing
.PHONY: test
test:
@echo '[habiter] Running tests...'
pytest -v
### Virtual environment
.PHONY: virt
virt:
python3 -m venv venv/