diff --git a/framework/pyproject.toml b/framework/pyproject.toml index 8eb1098057a4..14c1e4ab16ca 100644 --- a/framework/pyproject.toml +++ b/framework/pyproject.toml @@ -2,16 +2,14 @@ requires = ["poetry-core>=2.1.3"] build-backend = "poetry.core.masonry.api" -[tool.poetry] +[project] name = "flwr" version = "1.27.0" description = "Flower: A Friendly Federated AI Framework" license = "Apache-2.0" -authors = ["The Flower Authors "] +authors = [{ name = "The Flower Authors", email = "hello@flower.ai" }] readme = "README.md" -homepage = "https://flower.ai" -repository = "https://github.com/adap/flower" -documentation = "https://flower.ai" +requires-python = ">=3.10,<4.0" keywords = [ "Artificial Intelligence", "Federated AI", @@ -44,10 +42,34 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ] -packages = [{ include = "flwr", from = "py" }] -exclude = ["py/**/*_test.py"] +dependencies = [ + "numpy>=1.26.0,<3.0.0", + "grpcio>=1.70.0,<2.0.0", + "grpcio-health-checking>=1.70.0,<2.0.0", + "protobuf>=5.28.0,<7.0.0", + "cryptography>=46.0.5,<47.0.0", + "pycryptodome>=3.18.0,<4.0.0", + "iterators>=0.0.2,<0.0.3", + "typer>=0.12.5,<0.21.0", + "tomli>=2.0.1,<3.0.0", + "tomli-w>=1.0.0,<2.0.0", + "pathspec>=0.12.1,<0.13.0", + "rich>=13.5.0,<14.0.0", + "pyyaml>=6.0.2,<7.0.0", + "requests>=2.31.0,<3.0.0", + "click>=8.0.0,<9.0.0", + "SQLAlchemy>=2.0.45,<3.0.0", + "alembic>=1.18.1,<2.0.0", +] + +[project.optional-dependencies] +simulation = [ + "ray==2.51.1; python_version >= '3.10' and python_version < '3.13'", + "ray==2.51.1; python_version == '3.13' and sys_platform != 'win32'", +] +rest = ["starlette>=0.50.0,<0.51.0", "uvicorn[standard]>=0.40.0,<0.41.0"] -[tool.poetry.scripts] +[project.scripts] # `flwr` CLI flwr = "flwr.cli.app:app" # Simulation Engine @@ -59,95 +81,76 @@ flower-superexec = "flwr.supercore.cli:flower_superexec" flwr-serverapp = "flwr.server.serverapp:flwr_serverapp" flwr-clientapp = "flwr.supernode.cli:flwr_clientapp" -[tool.poetry.dependencies] -python = "^3.10" -# Mandatory dependencies -numpy = ">=1.26.0,<3.0.0" -grpcio = "^1.70.0" -grpcio-health-checking = "^1.70.0" -protobuf = ">=5.28.0,<7.0.0" -cryptography = "^46.0.5" -pycryptodome = "^3.18.0" -iterators = "^0.0.2" -typer = ">=0.12.5,<0.21.0" -tomli = "^2.0.1" -tomli-w = "^1.0.0" -pathspec = "^0.12.1" -rich = "^13.5.0" -pyyaml = "^6.0.2" -requests = "^2.31.0" -click = "^8.0.0" -SQLAlchemy = "^2.0.45" -alembic = "^1.18.1" -# Optional dependencies (Simulation Engine) -ray = [ - { version = "==2.51.1", optional = true, python = ">=3.10,<3.13" }, - { version = "==2.51.1", optional = true, python = "==3.13", markers = "sys_platform != 'win32'" }, +[project.urls] +homepage = "https://flower.ai" +repository = "https://github.com/adap/flower" +documentation = "https://flower.ai" + +[dependency-groups] +dev = [ + "types-dataclasses==0.6.6", + "types-protobuf==5.29.1.20250403", + "types-requests==2.31.0.20240125", + "types-setuptools==82.0.0.20260210", + "setuptools==82.0.0", + "clang-format==17.0.6", + "isort==5.13.2", + "black[jupyter]==25.11.0", + "taplo==0.9.3", + "docformatter==1.7.5", + "mypy==1.8.0", + "pylint==3.3.1", + "parameterized==0.9.0", + "pytest==7.4.4", + "pytest-cov==4.1.0", + "pytest-watcher==0.4.3", + "grpcio-tools==1.70.0", + "mypy-protobuf==3.6.0", + "jupyterlab==4.0.12", + "rope==1.13.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.14.5", + "sphinx-argparse==0.4.0", + "pipreqs==0.4.13", + "mdformat==1.0.0", + "mdformat-gfm==1.0.0", + "mdformat-frontmatter==2.0.10", + "mdformat-beautysh==1.0.0", + "beautysh==6.4.2", + "twine==6.2.0", + "types-PyYAML>=6.0.2,<7.0.0", + "pyroma==4.2", + "check-wheel-contents==0.6.3", + "GitPython==3.1.32", + "PyGithub==2.1.1", + "licensecheck==2025.1.0", + "pre-commit==3.5.0", + "sphinx-substitution-extensions==2022.2.16", + "sphinxext-opengraph==0.9.1", + "docstrfmt @ git+https://github.com/charlesbvll/docstrfmt.git@patch-2 ; python_version >= '3.10' and python_version < '4.0'", + "docsig==0.64.0", + "paracelsus==0.15.0", + "devtool", ] -# Optional dependencies (REST transport layer) -starlette = { version = "^0.50.0", optional = true } -uvicorn = { version = "^0.40.0", extras = ["standard"], optional = true } -[tool.poetry.extras] -simulation = ["ray"] -rest = ["starlette", "uvicorn"] +[tool.poetry] +packages = [{ include = "flwr", from = "py" }] +exclude = ["py/**/*_test.py"] [tool.poetry.group.dev.dependencies] -types-dataclasses = "==0.6.6" -types-protobuf = "==5.29.1.20250403" -types-requests = "==2.31.0.20240125" -types-setuptools = "==82.0.0.20260210" -setuptools = "==82.0.0" -clang-format = "==17.0.6" -isort = "==5.13.2" -black = { version = "==25.11.0", extras = ["jupyter"] } -taplo = "==0.9.3" -docformatter = "==1.7.5" -mypy = "==1.8.0" -pylint = "==3.3.1" -parameterized = "==0.9.0" -pytest = "==7.4.4" -pytest-cov = "==4.1.0" -pytest-watcher = "==0.4.3" -grpcio-tools = "==1.70.0" -mypy-protobuf = "==3.6.0" -jupyterlab = "==4.0.12" -rope = "==1.13.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.14.5" -sphinx-argparse = "==0.4.0" -pipreqs = "==0.4.13" -mdformat = "==1.0.0" -mdformat-gfm = "==1.0.0" -mdformat-frontmatter = "==2.0.10" -mdformat-beautysh = "==1.0.0" -beautysh = "==6.4.2" -twine = "==6.2.0" -types-PyYAML = "^6.0.2" -pyroma = "==4.2" -check-wheel-contents = "==0.6.3" -GitPython = "==3.1.32" -PyGithub = "==2.1.1" -licensecheck = "==2025.1.0" -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", python = ">=3.10,<4.0.0" } -docsig = "==0.64.0" -paracelsus = "==0.15.0" -devtool = [{ path = "./devtool", develop = true }] +devtool = { path = "./devtool", develop = true } [tool.docstrfmt] extend_exclude = [