forked from adap/flower
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
226 lines (209 loc) · 5.65 KB
/
pyproject.toml
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
[build-system]
requires = ["poetry-core>=1.4.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "flwr"
version = "1.9.0"
description = "Flower: A Friendly Federated Learning Framework"
license = "Apache-2.0"
authors = ["The Flower Authors <[email protected]>"]
readme = "README.md"
homepage = "https://flower.ai"
repository = "https://github.com/adap/flower"
documentation = "https://flower.ai"
keywords = [
"flower",
"fl",
"federated learning",
"federated analytics",
"federated evaluation",
"machine learning",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
packages = [
{ include = "flwr", from = "src/py" },
]
exclude = [
"src/py/**/*_test.py",
]
[tool.poetry.scripts]
flwr = "flwr.cli.app:app"
flower-driver-api = "flwr.server:run_driver_api"
flower-fleet-api = "flwr.server:run_fleet_api"
flower-superlink = "flwr.server:run_superlink"
flower-supernode = "flwr.client:run_supernode"
flower-client-app = "flwr.client:run_client_app"
flower-server-app = "flwr.server:run_server_app"
flower-simulation = "flwr.simulation.run_simulation:run_simulation_from_cli"
[tool.poetry.dependencies]
python = "^3.8"
# Mandatory dependencies
numpy = "^1.21.0"
grpcio = "^1.60.0"
protobuf = "^4.25.2"
cryptography = "^42.0.4"
pycryptodome = "^3.18.0"
iterators = "^0.0.2"
typer = { version = "^0.9.0", extras=["all"] }
tomli = "^2.0.1"
pathspec = "^0.12.1"
# Optional dependencies (Simulation Engine)
ray = { version = "==2.10.0", optional = true, python = ">=3.8,<3.12" }
# Optional dependencies (REST transport layer)
requests = { version = "^2.31.0", optional = true }
starlette = { version = "^0.31.0", optional = true }
uvicorn = { version = "^0.23.0", extras = ["standard"], optional = true }
[tool.poetry.extras]
simulation = ["ray"]
rest = ["requests", "starlette", "uvicorn"]
[tool.poetry.group.dev.dependencies]
types-dataclasses = "==0.6.6"
types-protobuf = "==3.19.18"
types-requests = "==2.31.0.20240125"
types-setuptools = "==69.0.0.20240125"
clang-format = "==17.0.6"
isort = "==5.13.2"
black = { version = "==24.2.0", extras = ["jupyter"] }
docformatter = "==1.7.5"
mypy = "==1.8.0"
pylint = "==3.0.3"
flake8 = "==5.0.4"
pytest = "==7.4.4"
pytest-cov = "==4.1.0"
pytest-watcher = "==0.4.1"
grpcio-tools = "==1.60.0"
mypy-protobuf = "==3.2.0"
jupyterlab = "==4.0.12"
rope = "==1.11.0"
semver = "==3.0.2"
sphinx = "==6.2.1"
sphinx-intl = "==2.1.0"
myst-parser = "==1.0.0"
sphinx-design = "==0.5.0"
sphinx-copybutton = "==0.5.2"
sphinxcontrib-mermaid = "==0.9.2"
sphinxcontrib-youtube = "==1.4.1"
furo = "==2023.9.10"
sphinx-reredirects = "==0.1.3"
nbsphinx = "==0.9.3"
nbstripout = "==0.6.1"
ruff = "==0.1.9"
sphinx-argparse = "==0.4.0"
pipreqs = "==0.4.13"
mdformat-gfm = "==0.3.5"
mdformat-frontmatter = "==2.0.1"
mdformat-beautysh = "==0.1.1"
mdformat-myst = "==0.1.5"
twine = "==4.0.2"
pyroma = "==4.2"
check-wheel-contents = "==0.4.0"
GitPython = "==3.1.32"
PyGithub = "==2.1.1"
licensecheck = "==2024"
pre-commit = "==3.5.0"
[tool.isort]
line_length = 88
indent = " "
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
known_first_party = ["flwr", "flwr_tool"]
[tool.black]
line-length = 88
target-version = ["py38", "py39", "py310", "py311"]
[tool.pylint."MESSAGES CONTROL"]
disable = "duplicate-code,too-few-public-methods,useless-import-alias"
[tool.pytest.ini_options]
minversion = "6.2"
addopts = "-qq"
testpaths = [
"src/py/flwr",
"src/py/flwr_tool",
]
filterwarnings = "ignore::DeprecationWarning"
[tool.pytest-watcher]
now = false
clear = true
delay = 0.2
runner = "pytest"
runner_args = ["-s", "-vvvvv"]
patterns = ["*.py"]
ignore_patterns = []
[tool.mypy]
plugins = [
"numpy.typing.mypy_plugin",
]
ignore_missing_imports = true
strict = true
[[tool.mypy.overrides]]
module = [
"importlib.metadata.*",
"importlib_metadata.*",
]
follow_imports = "skip"
follow_imports_for_stubs = true
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = "torch.*"
follow_imports = "skip"
follow_imports_for_stubs = true
[tool.docformatter]
wrap-summaries = 88
wrap-descriptions = 88
[tool.ruff]
target-version = "py38"
line-length = 88
select = ["D", "E", "F", "W", "B", "ISC", "C4", "UP"]
fixable = ["D", "E", "F", "W", "B", "ISC", "C4", "UP"]
ignore = ["B024", "B027", "D205", "D209"]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"proto",
]
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.ruff.per-file-ignores]
"src/py/flwr/server/strategy/*.py" = ["E501"]