diff --git a/.github/DISCUSSION_TEMPLATE/q-a.yml b/.github/DISCUSSION_TEMPLATE/q-a.yml index 67a4da6eb5..529fcb9c48 100644 --- a/.github/DISCUSSION_TEMPLATE/q-a.yml +++ b/.github/DISCUSSION_TEMPLATE/q-a.yml @@ -9,26 +9,26 @@ body: attributes: label: Python version (`python3 -V`) description: Python version (`python3 -V`) - placeholder: "3.8" + placeholder: "3.10" validations: required: true - type: input attributes: label: NVFlare version (`python3 -m pip list | grep "nvflare"`) description: NVFlare version (`python3 -m pip list | grep "nvflare"`) - placeholder: "2.3.8" + placeholder: "2.5.0" validations: required: true - type: input attributes: label: NVFlare branch (if running examples, please use the branch that corresponds to the NVFlare version, `git branch`) description: NVFlare branch (if running examples, please use the branch that corresponds to the NVFlare version, `git branch`) - placeholder: "2.3" + placeholder: "2.5" - type: input attributes: label: Operating system description: Operating system (Ubuntu, MacOS, Windows, etc) - placeholder: "Ubuntu 20.04" + placeholder: "Ubuntu 22.04" validations: required: true - type: checkboxes diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4a3f5cd198..54de1b1d76 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -24,9 +24,9 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. ubuntu 16.04] - - Python Version [e.g. 3.8] - - NVFlare Version [e.g. 2.1] + - OS: [e.g. ubuntu 22.04] + - Python Version [e.g. 3.10] + - NVFlare Version [e.g. 2.5] **Additional context** Add any other context about the problem here. diff --git a/.github/workflows/premerge.yml b/.github/workflows/premerge.yml index d3de85e167..1056a1a3d6 100644 --- a/.github/workflows/premerge.yml +++ b/.github/workflows/premerge.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-22.04, ubuntu-20.04 ] - python-version: [ "3.8", "3.9", "3.10" ] + python-version: [ "3.9", "3.10", "3.11", "3.12" ] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -47,7 +47,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-22.04, ubuntu-20.04 ] - python-version: [ "3.8", "3.9", "3.10" ] + python-version: [ "3.9", "3.10", "3.11", "3.12" ] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/nvflare/cli.py b/nvflare/cli.py index bf2c7800c6..5c20d5f556 100644 --- a/nvflare/cli.py +++ b/nvflare/cli.py @@ -23,6 +23,7 @@ from nvflare.fuel.hci.tools.authz_preview import define_authz_preview_parser, run_command from nvflare.lighter.provision import define_provision_parser, handle_provision from nvflare.private.fed.app.simulator.simulator import define_simulator_parser, run_simulator +from nvflare.private.fed.app.utils import version_check from nvflare.tool.job.job_cli import def_job_cli_parser, handle_job_cli_cmd from nvflare.tool.poc.poc_commands import def_poc_parser, handle_poc_cmd from nvflare.tool.preflight_check import check_packages, define_preflight_check_parser @@ -45,13 +46,6 @@ CMD_CONFIG = "config" -def check_python_version(): - if sys.version_info >= (3, 11): - raise RuntimeError("Python versions 3.11 and above are not yet supported. Please use Python 3.8, 3.9 or 3.10.") - if sys.version_info < (3, 8): - raise RuntimeError("Python versions 3.7 and below are not supported. Please use Python 3.8, 3.9 or 3.10") - - def def_provision_parser(sub_cmd): cmd = CMD_PROVISION provision_parser = sub_cmd.add_parser(cmd) @@ -218,7 +212,7 @@ def print_nvflare_version(): def main(): - check_python_version() + version_check() run("nvflare") diff --git a/nvflare/private/fed/app/utils.py b/nvflare/private/fed/app/utils.py index b68c5e0c5e..02b98fe9a9 100644 --- a/nvflare/private/fed/app/utils.py +++ b/nvflare/private/fed/app/utils.py @@ -97,10 +97,14 @@ def create_admin_server(fl_server: FederatedServer, server_conf=None, args=None, def version_check(): - if sys.version_info >= (3, 11): - raise RuntimeError("Python versions 3.11 and above are not yet supported. Please use Python 3.8, 3.9 or 3.10.") + if sys.version_info >= (3, 13): + raise RuntimeError( + "Python versions 3.13 and above are not yet supported. Please use Python version between 3.8 and 3.12." + ) if sys.version_info < (3, 8): - raise RuntimeError("Python versions 3.7 and below are not supported. Please use Python 3.8, 3.9 or 3.10") + raise RuntimeError( + "Python versions 3.7 and below are not supported. Please use Python version between 3.8 and 3.12." + ) def init_security_content_service(workspace_dir): diff --git a/setup.cfg b/setup.cfg index bacf0689f7..b76334556b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,6 +9,8 @@ classifiers = 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 License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux @@ -24,7 +26,7 @@ install_requires = SQLAlchemy==2.0.16 grpcio>=1.62.1 gunicorn>=22.0.0 - numpy<=1.26.4 + numpy protobuf>=4.24.4 psutil>=5.9.1 PyYAML>=6.0 @@ -36,10 +38,6 @@ install_requires = pyhocon [options.extras_require] -HE = - tenseal==0.3.12 -PSI = - openmined.psi==1.1.1 PT = torch torchvision @@ -53,8 +51,6 @@ TRACKING = CONFIG = omegaconf app_opt = - %(HE)s - %(PSI)s %(PT)s %(SKLEARN)s %(TRACKING)s diff --git a/tests/unit_test/fuel/utils/component_builder_test.py b/tests/unit_test/fuel/utils/component_builder_test.py index 7437fafc9d..e057e1d4bf 100644 --- a/tests/unit_test/fuel/utils/component_builder_test.py +++ b/tests/unit_test/fuel/utils/component_builder_test.py @@ -52,6 +52,10 @@ def is_python_greater_than_309(): version_value = 309 elif version.startswith("3.10."): version_value = 310 + elif version.startswith("3.11."): + version_value = 311 + elif version.startswith("3.12."): + version_value = 312 else: raise ValueError("unknown version") return version_value > 309