forked from OpenMined/PySyft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (41 loc) · 1.35 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
venv: venv/bin/activate
REQ_DIR=pip-dep
reqs: $(REQ_DIR)/requirements.txt $(REQ_DIR)/requirements_dev.txt $(REQ_DIR)/requirements_udacity.txt $(REQ_DIR)/requirements_notebooks.txt
venv/bin/activate: reqs
test -e venv/bin/activate || python -m venv venv
. venv/bin/activate; pip install -Ur $(REQ_DIR)/requirements.txt; pip install -Ur $(REQ_DIR)/requirements_dev.txt; pip install -Ur $(REQ_DIR)/requirements_udacity.txt; pip install -Ur $(REQ_DIR)/requirements_notebooks.txt; python setup.py install
touch venv/bin/activate
install_hooks: venv
venv/bin/pre-commit install
notebook: venv reqs
(. venv/bin/activate; \
pip install -Ur $(REQ_DIR)/requirements_notebooks.txt; \
python -m ipykernel install --user --name=pysyft; \
jupyter notebook;\
)
lab: venv
(. venv/bin/activate; \
python -m ipykernel install --user --name=pysyft; \
jupyter lab;\
)
.PHONY: test
test: venv reqs
(. venv/bin/activate; \
pip install -Ur $(REQ_DIR)/requirements_notebooks.txt; \
pip install "scikit-learn>=0.21.0" "pytest" "pytest-flake8"; \
venv/bin/coverage run -m pytest test; \
venv/bin/coverage report -m --fail-under 95; \
)
.PHONY: docs
docs: venv
(. venv/bin/activate; \
cd docs; \
rm -rf ./_modules; \
rm -rf ./_autosummary; \
rm -rf _build; \
sphinx-apidoc -o ./_modules ../syft; \
make markdown; \
cd ../; \
)
clean:
rm -rf venv