From 8d469635e4add3dc3a5bcf3ab4228e0b8f998806 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 5 Dec 2023 11:00:55 +0100 Subject: [PATCH 1/2] python311Packages.stim: refactor --- .../python-modules/stim/default.nix | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/stim/default.nix b/pkgs/development/python-modules/stim/default.nix index 734a3b3c9ff1..28e7cb5599b8 100644 --- a/pkgs/development/python-modules/stim/default.nix +++ b/pkgs/development/python-modules/stim/default.nix @@ -1,29 +1,28 @@ { lib -, pkgs , buildPythonPackage -, pythonOlder -, pytestCheckHook -, pytest-xdist -, fetchFromGitHub -, numpy -, pybind11 , cirq-core +, fetchFromGitHub , matplotlib , networkx +, numpy +, pandas +, pybind11 +, pytest-xdist +, pytestCheckHook +, pythonOlder , scipy , setuptools , wheel -, pandas }: buildPythonPackage rec { pname = "stim"; version = "1.9.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.6"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "quantumlib"; repo = "Stim"; rev = "refs/tags/v${version}"; @@ -57,14 +56,9 @@ buildPythonPackage rec { pandas ]; - meta = { - description = "A tool for high performance simulation and analysis of quantum stabilizer circuits, especially quantum error correction (QEC) circuits."; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ chrispattison ]; - homepage = "https://github.com/quantumlib/stim"; - }; - - pythonImportsCheck = [ "stim" ]; + pythonImportsCheck = [ + "stim" + ]; enableParallelBuilding = true; @@ -77,4 +71,12 @@ buildPythonPackage rec { "glue/sample/src/sinter/collection_work_manager.py" "glue/sample/src/sinter/worker_test.py" ]; + + meta = with lib; { + description = "A tool for high performance simulation and analysis of quantum stabilizer circuits, especially quantum error correction (QEC) circuits"; + homepage = "https://github.com/quantumlib/stim"; + changelog = "https://github.com/quantumlib/Stim/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ chrispattison ]; + }; } From 6ae57be9243f729fd0d2445c8c3cd6afe0c804fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 5 Dec 2023 11:38:48 +0100 Subject: [PATCH 2/2] python311Packages.stim: 1.9.0 -> 1.12.1 Diff: https://github.com/quantumlib/Stim/compare/refs/tags/v1.9.0...v1.12.1 Changelog: https://github.com/quantumlib/Stim/releases/tag/v1.12.1 --- .../python-modules/stim/default.nix | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/stim/default.nix b/pkgs/development/python-modules/stim/default.nix index 28e7cb5599b8..0e779f3850a4 100644 --- a/pkgs/development/python-modules/stim/default.nix +++ b/pkgs/development/python-modules/stim/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "stim"; - version = "1.9.0"; + version = "1.12.1"; pyproject = true; disabled = pythonOlder "3.6"; @@ -26,7 +26,7 @@ buildPythonPackage rec { owner = "quantumlib"; repo = "Stim"; rev = "refs/tags/v${version}"; - hash = "sha256-zXWdJjFkf74FCWxyVMF8dx0P8GmUkuHFxUo5wYNU2o0="; + hash = "sha256-vDpW8cn1JPARDIXpLyK9uenhHmva0FwnWIDV7dSHbIY="; }; postPatch = '' @@ -46,14 +46,13 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - pytestCheckHook - pytest-xdist - cirq-core matplotlib networkx - scipy pandas + pytest-xdist + pytestCheckHook + scipy ]; pythonImportsCheck = [ @@ -63,13 +62,8 @@ buildPythonPackage rec { enableParallelBuilding = true; disabledTestPaths = [ - # No pymatching - "glue/sample/src/sinter/main_test.py" - "glue/sample/src/sinter/decoding_test.py" - "glue/sample/src/sinter/predict_test.py" - "glue/sample/src/sinter/collection_test.py" - "glue/sample/src/sinter/collection_work_manager.py" - "glue/sample/src/sinter/worker_test.py" + # Don't test sample + "glue/sample/" ]; meta = with lib; {