-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
53 lines (41 loc) · 884 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
.PHONY: build
build: venv
python setup.py sdist
.PHONY: isort
isort:
isort ./nordigen ./tests ./examples --check-only
.PHONY: black
black:
black --check ./nordigen ./tests ./examples
.PHONY: flake8
flake8:
flake8 ./nordigen ./tests ./examples
.PHONY: test
test:
pytest --ignore=examples/ -xv
.PHONY: ci
ci: venv isort black flake8 test
.PHONY: ci-fix
ci-fix: venv
isort ./nordigen ./tests ./examples
black ./nordigen ./tests ./examples
.PHONY: dev
dev:
$(MAKE) ci-fix
$(MAKE) ci
.PHONY: install-pip
install-pip: venv
python -m pip install --upgrade pip
.PHONY: install-dev
install-dev: install-pip
pip install -e ".[dev]"
.PHONY: install-publish
install-publish: install-pip
pip install -e ".[publish]"
.PHONY: publish
publish: build
twine upload --verbose dist/*
.PHONY: venv
venv:
$(shell [ ! -d .python ] && python -m venv .python)
. .python/bin/activate