forked from adap/flower
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
232 lines (213 loc) · 6.27 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
227
228
229
230
231
232
[build-system]
requires = ["poetry-core>=1.4.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "flwr"
version = "1.13.0"
description = "Flower: A Friendly Federated Learning Framework"
license = "Apache-2.0"
authors = ["The Flower Authors <hello@flower.ai>"]
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.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` CLI
flwr = "flwr.cli.app:app"
# SuperExec (can run with either Deployment Engine or Simulation Engine)
flower-superexec = "flwr.superexec.app:run_superexec" # Deprecated
# Simulation Engine
flower-simulation = "flwr.simulation.run_simulation:run_simulation_from_cli"
# Deployment Engine
flower-superlink = "flwr.server.app:run_superlink"
flower-supernode = "flwr.client.supernode.app:run_supernode"
flwr-serverapp = "flwr.server.serverapp:flwr_serverapp"
flower-server-app = "flwr.server.run_serverapp:run_server_app" # Deprecated
flwr-clientapp = "flwr.client.clientapp:flwr_clientapp"
flower-client-app = "flwr.client.supernode:run_client_app" # Deprecated
[tool.poetry.dependencies]
python = "^3.9"
# Mandatory dependencies
numpy = ">=1.26.0,<3.0.0"
grpcio = "^1.60.0,!=1.64.2,<=1.64.3"
protobuf = "^4.25.2"
cryptography = "^42.0.4"
pycryptodome = "^3.18.0"
iterators = "^0.0.2"
typer = "^0.12.5"
tomli = "^2.0.1"
tomli-w = "^1.0.0"
pathspec = "^0.12.1"
# Optional dependencies (Simulation Engine)
ray = { version = "==2.10.0", optional = true, python = ">=3.9,<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"] }
taplo = "==0.9.3"
docformatter = "==1.7.5"
mypy = "==1.8.0"
pylint = "==3.3.1"
flake8 = "==5.0.4"
parameterized = "==0.9.0"
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 = "==7.4.7"
sphinx-intl = "==2.2.0"
sphinx-click = "==6.0.0"
myst-parser = "==3.0.1"
sphinx-design = "==0.6.1"
sphinx-copybutton = "==0.5.2"
sphinxcontrib-mermaid = "==0.9.2"
sphinxcontrib-youtube = "==1.4.1"
furo = "==2024.8.6"
sphinx-reredirects = "==0.1.5"
nbsphinx = "==0.9.5"
nbstripout = "==0.6.1"
ruff = "==0.1.9"
sphinx-argparse = "==0.4.0"
pipreqs = "==0.4.13"
mdformat-gfm = "==0.3.6"
mdformat-frontmatter = "==2.0.1"
mdformat-beautysh = "==0.1.1"
twine = "==5.1.1"
pyroma = "==4.2"
check-wheel-contents = "==0.4.0"
GitPython = "==3.1.32"
PyGithub = "==2.1.1"
licensecheck = "==2024"
pre-commit = "==3.5.0"
sphinx-substitution-extensions = "2022.02.16"
sphinxext-opengraph = "==0.9.1"
docstrfmt = { git = "https://github.com/charlesbvll/docstrfmt.git", branch = "patch-2" }
docsig = "==0.64.0"
[tool.docstrfmt]
extend_exclude = [
"doc/source/conf.py",
"doc/source/tutorial-quickstart-huggingface.rst",
"doc/source/_templates/autosummary/*",
"doc/source/ref-api/*",
]
[tool.isort]
profile = "black"
known_first_party = ["flwr", "flwr_tool"]
[tool.black]
line-length = 88
target-version = ["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 = "py39"
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"]
[tool.docsig]
ignore-no-params = true
exclude = 'src/py/flwr/proto/.*|src/py/flwr/.*_test\.py|src/py/flwr/cli/new/templates/.*\.tpl'