From f56547c565a40b549364bbb0e8c6f5c1027a4227 Mon Sep 17 00:00:00 2001 From: Ilya Elenskiy Date: Wed, 10 May 2023 12:58:46 +0200 Subject: [PATCH 1/7] python3Packages.broadbean: init at 0.11.0 --- maintainers/maintainer-list.nix | 6 +++ .../python-modules/broadbean/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/broadbean/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8055a1f5ed2f..a6fee242e695 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4928,6 +4928,12 @@ githubId = 2512008; name = "Even Brenden"; }; + evilmav = { + email = "elenskiy.ilya@gmail.com"; + github = "evilmav"; + githubId = 6803717; + name = "Ilya Elenskiy"; + }; evils = { email = "evils.devils@protonmail.com"; matrix = "@evils:nixos.dev"; diff --git a/pkgs/development/python-modules/broadbean/default.nix b/pkgs/development/python-modules/broadbean/default.nix new file mode 100644 index 000000000000..aa4df0961797 --- /dev/null +++ b/pkgs/development/python-modules/broadbean/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, setuptools +, versioningit +, numpy +, matplotlib +, schema +, hypothesis +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "broadbean"; + version = "0.11.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-e+LAcmWxT+SkaWtToPgg+x3QRu5fCSm+w4dLCcyZrw8="; + }; + + nativeBuildInputs = [ setuptools versioningit ]; + + propagatedBuildInputs = [ + numpy + matplotlib + schema + ]; + + nativeCheckInputs = [ + hypothesis + pytestCheckHook + ]; + + pythonImportsCheck = [ "broadbean" ]; + + meta = { + homepage = "https://qcodes.github.io/broadbean"; + description = "A library for making pulses that can be leveraged with QCoDeS"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ evilmav ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8d7e8dd7c344..b4913daf8d35 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1485,6 +1485,8 @@ self: super: with self; { brian2 = callPackage ../development/python-modules/brian2 { }; + broadbean = callPackage ../development/python-modules/broadbean { }; + broadlink = callPackage ../development/python-modules/broadlink { }; brother = callPackage ../development/python-modules/brother { }; From 2ed439e02b954e5be73377824e63ba6dacd2eedd Mon Sep 17 00:00:00 2001 From: Ilya Elenskiy Date: Sat, 13 May 2023 00:30:40 +0200 Subject: [PATCH 2/7] python3Packages.opencensus-ext-azure: init at 1.1.9 --- .../opencensus-ext-azure/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/opencensus-ext-azure/default.nix diff --git a/pkgs/development/python-modules/opencensus-ext-azure/default.nix b/pkgs/development/python-modules/opencensus-ext-azure/default.nix new file mode 100644 index 000000000000..132ce33264e2 --- /dev/null +++ b/pkgs/development/python-modules/opencensus-ext-azure/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, azure-core +, azure-identity +, opencensus +, psutil +, requests +}: + +buildPythonPackage rec { + pname = "opencensus-ext-azure"; + version = "1.1.9"; + format = "setuptools"; + + disabled = pythonOlder "3.4"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-UHYIt36djqq2/9X/EbfOuH9U5KapQMS4FDMbTRsDQVE="; + }; + + propagatedBuildInputs = [ + azure-core + azure-identity + opencensus + psutil + requests + ]; + + pythonImportsCheck = [ "opencensus.ext.azure" ]; + + doCheck = false; # tests are not included in the PyPi tarball + + meta = with lib; { + homepage = "https://github.com/census-instrumentation/opencensus-python/tree/master/contrib/opencensus-ext-azure"; + description = "OpenCensus Azure Monitor Exporter"; + license = licenses.asl20; + maintainers = with maintainers; [ billhuang evilmav ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b4913daf8d35..8c331dd93678 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7036,6 +7036,8 @@ self: super: with self; { opencensus-context = callPackage ../development/python-modules/opencensus-context { }; + opencensus-ext-azure = callPackage ../development/python-modules/opencensus-ext-azure { }; + opencontainers = callPackage ../development/python-modules/opencontainers { }; opencv3 = toPythonModule (pkgs.opencv3.override { From 938bca634ea5a9c9936b139ff317cdb55dbbce5b Mon Sep 17 00:00:00 2001 From: Ilya Elenskiy Date: Sat, 13 May 2023 00:32:38 +0200 Subject: [PATCH 3/7] python3Packages.hickle: fixed failing unit tests --- .../python-modules/hickle/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/hickle/default.nix b/pkgs/development/python-modules/hickle/default.nix index 5374a9b6b53d..6fcb1d166ac9 100644 --- a/pkgs/development/python-modules/hickle/default.nix +++ b/pkgs/development/python-modules/hickle/default.nix @@ -12,8 +12,10 @@ }: buildPythonPackage rec { - pname = "hickle"; + pname = "hickle"; version = "5.0.2"; + format = "setuptools"; + disabled = pythonOlder "3.5"; src = fetchPypi { @@ -28,11 +30,23 @@ buildPythonPackage rec { propagatedBuildInputs = [ h5py numpy dill ]; nativeCheckInputs = [ - pytestCheckHook scipy pandas astropy + pytestCheckHook + scipy + pandas + astropy ]; pythonImportsCheck = [ "hickle" ]; + disabledTests = [ + # broken in 5.0.2 with recent NumPy + # see https://github.com/telegraphic/hickle/issues/174 + "test_scalar_compression" + # broken in 5.0.2 with python 3.11 + # see https://github.com/telegraphic/hickle/issues/169 + "test_H5NodeFilterProxy" + ]; + meta = { description = "Serialize Python data to HDF5"; homepage = "https://github.com/telegraphic/hickle"; From 6b6d9477169f29977517b9f88f1a3e1b97a941bf Mon Sep 17 00:00:00 2001 From: Ilya Elenskiy Date: Sat, 13 May 2023 00:33:44 +0200 Subject: [PATCH 4/7] python3Packages.stringparser: init at 0.6 --- .../python-modules/stringparser/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/stringparser/default.nix diff --git a/pkgs/development/python-modules/stringparser/default.nix b/pkgs/development/python-modules/stringparser/default.nix new file mode 100644 index 000000000000..bac315950781 --- /dev/null +++ b/pkgs/development/python-modules/stringparser/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, setuptools +, setuptools-scm +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "stringparser"; + version = "0.6"; + format = "setuptools"; + + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "hgrecco"; + repo = pname; + rev = version; + sha256 = "sha256-uyeHuH0UfpZqh7sMRI6+fR/Rr2jSzdR+5O/MtzslO5w="; + }; + + nativeBuildInputs = [ setuptools setuptools-scm ]; + + pythonImportsCheck = [ "stringparser" ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + meta = with lib; { + description = "Easy to use pattern matching and information extraction"; + homepage = "https://github.com/hgrecco/stringparser"; + license = licenses.bsd3; + maintainers = with maintainers; [ evilmav ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8c331dd93678..8d4cf525ab4b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11681,6 +11681,8 @@ self: super: with self; { stringly = callPackage ../development/python-modules/stringly { }; + stringparser = callPackage ../development/python-modules/stringparser { }; + stripe = callPackage ../development/python-modules/stripe { }; striprtf = callPackage ../development/python-modules/striprtf { }; From 56766e3f1f65b914c14bc27afbfac5f53deda7a3 Mon Sep 17 00:00:00 2001 From: Ilya Elenskiy Date: Sat, 13 May 2023 00:34:34 +0200 Subject: [PATCH 5/7] python3Packages.pyvisa-sim: init at 0.5.1 --- .../python-modules/pyvisa-sim/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/pyvisa-sim/default.nix diff --git a/pkgs/development/python-modules/pyvisa-sim/default.nix b/pkgs/development/python-modules/pyvisa-sim/default.nix new file mode 100644 index 000000000000..56fef67a1f9f --- /dev/null +++ b/pkgs/development/python-modules/pyvisa-sim/default.nix @@ -0,0 +1,49 @@ +{ lib +, fetchPypi +, pythonOlder +, buildPythonPackage +, pyvisa +, pyyaml +, stringparser +, typing-extensions +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pyvisa-sim"; + version = "0.5.1"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "PyVISA-sim"; + inherit version; + sha256 = "sha256-vWxW941/1e58pqL/Rzq+eoZJpwsvLphgIe48SuJtohY="; + }; + + propagatedBuildInputs = [ + pyvisa + pyyaml + stringparser + typing-extensions + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "pyvisa_sim" ]; + + # should be fixed after 0.5.1, remove at next release + disabledTestPaths = [ + "pyvisa_sim/testsuite/test_all.py" + ]; + + meta = with lib; { + description = "Simulated backend for PyVISA implementing TCPIP, GPIB, RS232, and USB resources"; + homepage = "https://pyvisa.readthedocs.io/projects/pyvisa-sim/en/latest/"; + license = licenses.mit; + maintainers = with maintainers; [ evilmav ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8d4cf525ab4b..d07608c8338e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10110,6 +10110,8 @@ self: super: with self; { pyvisa-py = callPackage ../development/python-modules/pyvisa-py { }; + pyvisa-sim = callPackage ../development/python-modules/pyvisa-sim { }; + pyvista = callPackage ../development/python-modules/pyvista { }; pyviz-comms = callPackage ../development/python-modules/pyviz-comms { }; From 6c5049e54ae5e7b19d43dc259c418d675c0f7638 Mon Sep 17 00:00:00 2001 From: Ilya Elenskiy Date: Sat, 13 May 2023 00:37:58 +0200 Subject: [PATCH 6/7] python3Packages.qcodes: init at 0.38.1 --- .../python-modules/qcodes-loop/default.nix | 87 ++++++++++++ .../python-modules/qcodes/default.nix | 133 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 + 3 files changed, 224 insertions(+) create mode 100644 pkgs/development/python-modules/qcodes-loop/default.nix create mode 100644 pkgs/development/python-modules/qcodes/default.nix diff --git a/pkgs/development/python-modules/qcodes-loop/default.nix b/pkgs/development/python-modules/qcodes-loop/default.nix new file mode 100644 index 000000000000..ef65af007d90 --- /dev/null +++ b/pkgs/development/python-modules/qcodes-loop/default.nix @@ -0,0 +1,87 @@ +{ lib +, fetchPypi +, pythonOlder +, buildPythonPackage +, qcodes +, h5py +, lazy-loader +, matplotlib +, numpy +, pandas +, versioningit +, xarray +, hickle +, ipython +, slack-sdk +, hypothesis +, pytest-xdist +, pytest-mock +, pyqtgraph +, pyqt5 +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "qcodes-loop"; + version = "0.1.1"; + + disabled = pythonOlder "3.8"; + format = "pyproject"; + + src = fetchPypi { + inherit version; + pname = "qcodes_loop"; + sha256 = "sha256-pDR0Ws8cYQifftdE9dKcSzMxmouFo4tJmQvNanm6zyM="; + }; + + nativeBuildInputs = [ + versioningit + ]; + + propagatedBuildInputs = [ + qcodes + h5py + lazy-loader + matplotlib + numpy + pandas + xarray + hickle + ipython + ]; + + passthru.optional-dependencies = { + qtplot = [ + pyqtgraph + ]; + slack = [ + slack-sdk + ]; + }; + + nativeCheckInputs = [ + pytestCheckHook + hypothesis + pytest-xdist + pytest-mock + pyqt5 + ]; + + pythonImportsCheck = [ "qcodes_loop" ]; + + disabledTestPaths = [ + # test broken in 0.1.1, see https://github.com/QCoDeS/Qcodes_loop/pull/25 + "src/qcodes_loop/tests/test_hdf5formatter.py" + ]; + + postInstall = '' + export HOME="$TMPDIR" + ''; + + meta = with lib; { + description = "Features previously in QCoDeS"; + homepage = "https://github.com/QCoDeS/Qcodes_loop"; + license = licenses.mit; + maintainers = with maintainers; [ evilmav ]; + }; +} diff --git a/pkgs/development/python-modules/qcodes/default.nix b/pkgs/development/python-modules/qcodes/default.nix new file mode 100644 index 000000000000..46e39fc4fcf8 --- /dev/null +++ b/pkgs/development/python-modules/qcodes/default.nix @@ -0,0 +1,133 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, setuptools +, versioningit + + # mandatory +, broadbean +, h5netcdf +, h5py +, importlib-metadata +, importlib-resources +, ipywidgets +, ipykernel +, jsonschema +, matplotlib +, numpy +, opencensus +, opencensus-ext-azure +, packaging +, pandas +, pyvisa +, ruamel-yaml +, tabulate +, typing-extensions +, tqdm +, uncertainties +, websockets +, wrapt +, xarray +, ipython +, pillow +, rsa + + # optional +, qcodes-loop + + # test +, pytestCheckHook +, deepdiff +, hypothesis +, lxml +, pytest-asyncio +, pytest-mock +, pytest-rerunfailures +, pytest-xdist +, pyvisa-sim +, sphinx +}: + +buildPythonPackage rec { + pname = "qcodes"; + version = "0.38.1"; + + disabled = pythonOlder "3.8"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-whUGkRvYQOdYxWoj7qhv2kiiyTwq3ZLLipI424PBzFg="; + }; + + nativeBuildInputs = [ setuptools versioningit ]; + + propagatedBuildInputs = [ + broadbean + h5netcdf + h5py + ipywidgets + ipykernel + jsonschema + matplotlib + numpy + opencensus + opencensus-ext-azure + packaging + pandas + pyvisa + ruamel-yaml + tabulate + typing-extensions + tqdm + uncertainties + websockets + wrapt + xarray + ipython + pillow + rsa + ] ++ lib.optionals (pythonOlder "3.10") [ + importlib-metadata + ] ++ lib.optionals (pythonOlder "3.9") [ + importlib-resources + ]; + + passthru.optional-dependencies = { + loop = [ + qcodes-loop + ]; + }; + + nativeCheckInputs = [ + pytestCheckHook + deepdiff + hypothesis + lxml + pytest-asyncio + pytest-mock + pytest-rerunfailures + pytest-xdist + pyvisa-sim + sphinx + ]; + + disabledTestPaths = [ + # depends on qcodes-loop, causing a cyclic dependency + "qcodes/tests/dataset/measurement/test_load_legacy_data.py" + ]; + + pythonImportsCheck = [ "qcodes" ]; + + postInstall = '' + export HOME="$TMPDIR" + ''; + + meta = { + homepage = "https://qcodes.github.io/Qcodes/"; + description = "Python-based data acquisition framework"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ evilmav ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d07608c8338e..b2d64320c4ac 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10204,6 +10204,10 @@ self: super: with self; { qcengine = callPackage ../development/python-modules/qcengine { }; + qcodes = callPackage ../development/python-modules/qcodes { }; + + qcodes-loop = callPackage ../development/python-modules/qcodes-loop { }; + qcs-api-client = callPackage ../development/python-modules/qcs-api-client { }; qdarkstyle = callPackage ../development/python-modules/qdarkstyle { }; From 5941d98418056ee01ca1f3bbaedcf12f366d8aec Mon Sep 17 00:00:00 2001 From: Ilya Elenskiy Date: Sat, 13 May 2023 00:39:32 +0200 Subject: [PATCH 7/7] python3Packages.qcodes-contrib-drivers: init at 0.18.0 --- .../qcodes-contrib-drivers/default.nix | 58 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/development/python-modules/qcodes-contrib-drivers/default.nix diff --git a/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix b/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix new file mode 100644 index 000000000000..e26745e77566 --- /dev/null +++ b/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix @@ -0,0 +1,58 @@ +{ lib +, fetchFromGitHub +, pythonOlder +, buildPythonPackage +, setuptools +, versioningit +, qcodes +, packaging +, pytestCheckHook +, pytest-mock +, pyvisa-sim +}: + +buildPythonPackage rec { + pname = "qcodes-contrib-drivers"; + version = "0.18.0"; + + disabled = pythonOlder "3.8"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "QCoDeS"; + repo = "Qcodes_contrib_drivers"; + rev = "v${version}"; + sha256 = "sha256-hg3jSiuOkiuOInnUzzlKtBeoP5zkCDBQ3xP6KCwq+lU="; + }; + + nativeBuildInputs = [ setuptools versioningit ]; + + propagatedBuildInputs = [ + qcodes + packaging + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-mock + pyvisa-sim + ]; + + pythonImportsCheck = [ "qcodes_contrib_drivers" ]; + + # should be fixed starting with 0.19.0, remove at next release + disabledTestPaths = [ + "qcodes_contrib_drivers/tests/test_Keysight_M3201A.py" + ]; + + postInstall = '' + export HOME="$TMPDIR" + ''; + + meta = with lib; { + description = "User contributed drivers for QCoDeS"; + homepage = "https://github.com/QCoDeS/Qcodes_contrib_drivers"; + license = licenses.mit; + maintainers = with maintainers; [ evilmav ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b2d64320c4ac..4d4159ebaa10 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10206,6 +10206,8 @@ self: super: with self; { qcodes = callPackage ../development/python-modules/qcodes { }; + qcodes-contrib-drivers = callPackage ../development/python-modules/qcodes-contrib-drivers { }; + qcodes-loop = callPackage ../development/python-modules/qcodes-loop { }; qcs-api-client = callPackage ../development/python-modules/qcs-api-client { };