-
Notifications
You must be signed in to change notification settings - Fork 6
/
makefile
127 lines (93 loc) · 2.54 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.DEFAULT: help
help:
@echo "install"
@echo " Install curvlinops and dependencies"
@echo "uninstall"
@echo " Unstall curvlinops"
@echo "lint"
@echo " Run all linting actions"
@echo "docs"
@echo " Build the documentation"
@echo "install-dev"
@echo " Install curvlinops and development tools"
@echo "install-docs"
@echo " Install curvlinops and documentation tools"
@echo "install-test"
@echo " Install curvlinops and testing tools"
@echo "test-light"
@echo " Run pytest on the light part of project and report coverage"
@echo "test"
@echo " Run pytest on test and report coverage"
@echo "install-lint"
@echo " Install curvlinops and the linter tools"
@echo "isort"
@echo " Run isort (sort imports) on the project"
@echo "isort-check"
@echo " Check if isort (sort imports) would change files"
@echo "black"
@echo " Run black on the project"
@echo "black-check"
@echo " Check if black would change files"
@echo "flake8"
@echo " Run flake8 on the project"
@echo "conda-env"
@echo " Create conda environment 'curvlinops' with dev setup"
@echo "darglint-check"
@echo " Run darglint (docstring check) on the project"
@echo "pydocstyle-check"
@echo " Run pydocstyle (docstring check) on the project"
.PHONY: install
install:
@pip install -e .
.PHONY: uninstall
uninstall:
@pip uninstall curvlinops-for-pytorch
.PHONY: docs
docs:
@cd docs/rtd && make html
@echo "\nOpen docs/rtd/index.html to see the result."
.PHONY: install-dev
install-dev: install-lint install-test install-docs
.PHONY: install-docs
install-docs:
@pip install -e .[docs]
.PHONY: install-test
install-test:
@pip install -e .[test]
.PHONY: test test-light
test:
@pytest -vx --run-optional-tests=montecarlo --cov=curvlinops --doctest-modules curvlinops test
test-light:
@pytest -vx --cov=curvlinops --doctest-modules curvlinops test
.PHONY: install-lint
install-lint:
@pip install -e .[lint]
.PHONY: isort isort-check
isort:
@isort .
isort-check:
@isort . --check --diff
.PHONY: black black-check
black:
@black . --config=black.toml
black-check:
@black . --config=black.toml --check
.PHONY: flake8
flake8:
@flake8 .
.PHONY: darglint-check
darglint-check:
@darglint --verbosity 2 curvlinops
.PHONY: pydocstyle-check
pydocstyle-check:
@pydocstyle --count .
.PHONY: conda-env
conda-env:
@conda env create --file .conda_env.yml
.PHONY: lint
lint:
make black-check
make isort-check
make flake8
make darglint-check
make pydocstyle-check