From 730ebac01f5c2b47a332aa95425623b9bc9e8402 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 1 Nov 2024 04:02:44 +0000 Subject: [PATCH 1/2] python312Packages.yappi: 1.6.0 -> 1.6.3 --- pkgs/development/python-modules/yappi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/yappi/default.nix b/pkgs/development/python-modules/yappi/default.nix index 634914a18c30..90126ce1be2f 100644 --- a/pkgs/development/python-modules/yappi/default.nix +++ b/pkgs/development/python-modules/yappi/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "yappi"; - version = "1.6.0"; + version = "1.6.3"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "sumerc"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-zA4apOGyrbjBOxUKBARiKmmM9rSVFVGWsDpOaItOoLU="; + hash = "sha256-nkkm50/94iVYZdUBm7DZkNQsBqddO6unjP29ctf7dxo="; }; patches = [ ./tests.patch ]; From 2d7517cf9b003b199e783678efdc806607fee13b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Nov 2024 09:03:55 +0100 Subject: [PATCH 2/2] python312Packages.ax-platform: add optional-dependencies - switch to disabledTestPaths --- .../python-modules/ax-platform/default.nix | 59 +++++++++++-------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/ax-platform/default.nix b/pkgs/development/python-modules/ax-platform/default.nix index 7f98a4978249..ec033ec962b3 100644 --- a/pkgs/development/python-modules/ax-platform/default.nix +++ b/pkgs/development/python-modules/ax-platform/default.nix @@ -1,21 +1,24 @@ { lib, + botorch, buildPythonPackage, fetchFromGitHub, - botorch, + hypothesis, ipywidgets, jinja2, + jupyter, + mercurial, pandas, plotly, - setuptools, - setuptools-scm, - typeguard, - hypothesis, - mercurial, pyfakefs, - pytestCheckHook, - yappi, pyre-extensions, + pytestCheckHook, + pythonOlder, + setuptools-scm, + setuptools, + sqlalchemy, + typeguard, + yappi, }: buildPythonPackage rec { @@ -23,6 +26,8 @@ buildPythonPackage rec { version = "0.4.3"; pyproject = true; + disabled = pythonOlder "3.10"; + src = fetchFromGitHub { owner = "facebook"; repo = "ax"; @@ -30,6 +35,8 @@ buildPythonPackage rec { hash = "sha256-jmBjrtxqg4Iu3Qr0HRqjVfwURXzbJaGm+DBFNHYk/vA="; }; + env.ALLOW_BOTORCH_LATEST = "1"; + build-system = [ setuptools setuptools-scm @@ -45,7 +52,10 @@ buildPythonPackage rec { pyre-extensions ]; - env.ALLOW_BOTORCH_LATEST = "1"; + optional-dependencies = { + mysql = [ sqlalchemy ]; + notebook = [ jupyter ]; + }; nativeCheckInputs = [ hypothesis @@ -53,21 +63,23 @@ buildPythonPackage rec { pyfakefs pytestCheckHook yappi - ]; - pytestFlagsArray = [ - "--ignore=ax/benchmark" - "--ignore=ax/runners/tests/test_torchx.py" + ] ++ lib.flatten (builtins.attrValues optional-dependencies); + + disabledTestPaths = [ + "ax/benchmark" + "ax/runners/tests/test_torchx.py" # requires pyre_extensions - "--ignore=ax/telemetry/tests" - "--ignore=ax/core/tests/test_utils.py" - "--ignore=ax/early_stopping/tests/test_strategies.py" + "ax/telemetry/tests" + "ax/core/tests/test_utils.py" + "ax/early_stopping/tests/test_strategies.py" # broken with sqlalchemy 2 - "--ignore=ax/core/tests/test_experiment.py" - "--ignore=ax/service/tests/test_ax_client.py" - "--ignore=ax/service/tests/test_scheduler.py" - "--ignore=ax/service/tests/test_with_db_settings_base.py" - "--ignore=ax/storage" + "ax/core/tests/test_experiment.py" + "ax/service/tests/test_ax_client.py" + "ax/service/tests/test_scheduler.py" + "ax/service/tests/test_with_db_settings_base.py" + "ax/storage" ]; + disabledTests = [ # exact comparison of floating points "test_optimize_l0_homotopy" @@ -78,12 +90,13 @@ buildPythonPackage rec { # uses torch.equal "test_convert_observations" ]; + pythonImportsCheck = [ "ax" ]; meta = { - changelog = "https://github.com/facebook/Ax/releases/tag/${version}"; - description = "Ax is an accessible, general-purpose platform for understanding, managing, deploying, and automating adaptive experiments"; + description = "Platform for understanding, managing, deploying, and automating adaptive experiments"; homepage = "https://ax.dev/"; + changelog = "https://github.com/facebook/Ax/releases/tag/${version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ veprbl ]; };