forked from OpenMined/PySyft
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
169 lines (156 loc) · 4.45 KB
/
tox.ini
File metadata and controls
169 lines (156 loc) · 4.45 KB
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[tox]
envlist =
syft.jupyter
syft.lint
syft.test.fast
syft.test.libs
syft.test.duet
syft.test.security
grid.domain
grid.test.unit
core.test.integration
requires =
tox-pyenv
tox-run-command
setupdir = {toxinidir}/packages/syft
[testenv]
changedir = {toxinidir}/packages/syft
usedevelop = True
deps =
-e{toxinidir}/packages/syft
-r{toxinidir}/packages/syft/requirements.unstable.txt
extras = all
commands =
python --version
# Syft
[testenv:syft.jupyter]
description = Jupyter Notebook with Editable Syft
basepython = python3.9
deps =
jupyter
commands =
pip install prompt-toolkit jupyter jupyterlab --upgrade # overrides grid deps in setup.cfg which break jupyter
jupyter lab --ip 0.0.0.0
[testenv:syft.lint]
description = Linting for Syft
changedir = {toxinidir}/packages/syft
basepython = python3.9
deps =
jupyter
black
isort
protoc-wheel-0
pre-commit
commands =
{toxinidir}/packages/syft/scripts/build_proto.sh
black .
isort .
pre-commit run --all-files
[testenv:syft.test.fast]
description = Fast Unit Tests for Syft
basepython = python3.9
deps =
changedir = {toxinidir}/packages/syft
commands =
pip list
pytest -m fast -n auto
[testenv:syft.test.security]
description = Security Checks for Syft
changedir = {toxinidir}/packages/syft
basepython = python3.9
deps =
commands =
bandit -r src
safety check
[testenv:syft.test.libs]
description = Supported Library Tests for Syft
basepython = python3.9
deps =
-r {toxinidir}/packages/syft/requirements.unstable.txt
changedir = {toxinidir}/packages/syft
commands =
pytest -m libs -n auto -k "not tenseal" --suppress-no-test-exit-code
pytest -m libs -n 1 -k "tenseal" --suppress-no-test-exit-code
[testenv:syft.test.duet]
description = Duet Integration Tests for Syft
basepython = python3.9
deps =
-r {toxinidir}/packages/syft/requirements.unstable.txt
changedir = {toxinidir}/packages/syft
commands =
python ./scripts/mnist.py
python ./scripts/nb_duet_test.py
pytest -m duet -n 1 --suppress-no-test-exit-code
[testenv:grid.test.unit]
description = Unit Tests for Grid
basepython = python3.9
deps =
-r{toxinidir}/packages/syft/requirements.unstable.txt
changedir = {toxinidir}/packages/syft
commands =
pip install -e {toxinidir}/packages/syft[ci-grid]
pytest ../grid/apps/domain/tests -p no:randomly
pytest ../grid/apps/network/tests -p no:randomly
pytest ../grid/apps/worker/tests -p no:randomly
[testenv:core.test.integration]
description = Integration Tests for Syft and Grid
basepython = python3.9
deps =
-r{toxinidir}/packages/syft/requirements.unstable.txt
changedir = {toxinidir}/packages/syft
commands =
pip list
python ./scripts/mnist.py
pytest -m grid -p no:randomly -p no:xdist
# Grid
# docker run -d --name domain-db -e POSTGRES_PASSWORD=dbpass -e POSTGRES_DB=domain -p 5434:5432 postgres
[testenv:grid.domain]
description = Run a Dev Grid Domain with Editable Syft
basepython = python3.9
changedir = {toxinidir}/packages/grid/apps/domain
deps =
poetry
psycopg2-binary
setenv =
APP_ENV=dev
DATABASE_URL=sqlite:///nodedatabase.db
; DATABASE_URL=postgresql://postgres:dbpass@localhost:5434/domain
PORT=5002
MEMORY_STORE=True
commands =
; poetry plugin add poetry-version-plugin
; poetry install # weird bug in poetry>=1.2.0a1 with plugins
poetry export -f requirements.txt --output requirements.txt --without-hashes
pip install -r requirements.txt
./run.sh
[testenv:grid.network]
description = Run a Dev Grid Network with Editable Syft
basepython = python3.9
changedir = {toxinidir}/packages/grid/apps/network
deps =
poetry
psycopg2-binary
setenv =
APP_ENV=dev
DATABASE_URL=sqlite:///nodedatabase.db
PORT=5001
LOCAL_DATABASE=True
commands =
; poetry plugin add poetry-version-plugin
; poetry install # weird bug in poetry>=1.2.0a1 with plugins
poetry export -f requirements.txt --output requirements.txt --without-hashes
pip install -r requirements.txt
./run.sh
[testenv:grid.worker]
description = Run a Dev Grid Worker with Editable Syft
basepython = python3.9
changedir = {toxinidir}/packages/grid/apps/worker
deps = poetry>=1.2.0a1
setenv =
APP_ENV=dev
commands =
; poetry plugin add poetry-version-plugin
; poetry install # weird bug in poetry>=1.2.0a1 with plugins
poetry export -f requirements.txt --output requirements.txt --without-hashes
pip install -r requirements.txt
./run.sh