diff --git a/pkgs/development/python-modules/cf-xarray/default.nix b/pkgs/development/python-modules/cf-xarray/default.nix new file mode 100644 index 000000000000..fdbfe0ff71a2 --- /dev/null +++ b/pkgs/development/python-modules/cf-xarray/default.nix @@ -0,0 +1,79 @@ +{ lib +, buildPythonPackage +, dask +, fetchFromGitHub +, matplotlib +, pint +, pooch +, pytestCheckHook +, pythonOlder +, regex +, rich +, scipy +, setuptools +, setuptools-scm +, shapely +, wheel +, xarray +}: + +buildPythonPackage rec { + pname = "cf-xarray"; + version = "0.8.6"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "xarray-contrib"; + repo = "cf-xarray"; + rev = "refs/tags/v${version}"; + hash = "sha256-qcoHz/yZoPVu0uBKKx4AV7MOokiuXSCaWPD/92VlRFk="; + }; + + nativeBuildInputs = [ + setuptools + setuptools-scm + wheel + xarray + ]; + + propagatedBuildInputs = [ + xarray + ]; + + passthru.optional-dependencies = { + all = [ + matplotlib + pint + pooch + regex + rich + shapely + ]; + }; + + nativeCheckInputs = [ + dask + pytestCheckHook + scipy + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + + pythonImportsCheck = [ + "cf_xarray" + ]; + + disabledTestPaths = [ + # Tests require network access + "cf_xarray/tests/test_accessor.py" + "cf_xarray/tests/test_helpers.py" + ]; + + meta = with lib; { + description = "An accessor for xarray objects that interprets CF attributes"; + homepage = "https://github.com/xarray-contrib/cf-xarray"; + changelog = "https://github.com/xarray-contrib/cf-xarray/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/qcodes-loop/default.nix b/pkgs/development/python-modules/qcodes-loop/default.nix index 93f452786512..a20841319b74 100644 --- a/pkgs/development/python-modules/qcodes-loop/default.nix +++ b/pkgs/development/python-modules/qcodes-loop/default.nix @@ -80,6 +80,11 @@ buildPythonPackage rec { export HOME="$TMPDIR" ''; + disabledTests = [ + # AssertionError: False is not true + "TestHDF5_Format" + ]; + meta = with lib; { description = "Features previously in QCoDeS"; homepage = "https://github.com/QCoDeS/Qcodes_loop"; diff --git a/pkgs/development/python-modules/qcodes/default.nix b/pkgs/development/python-modules/qcodes/default.nix index 2083000992bc..320054041104 100644 --- a/pkgs/development/python-modules/qcodes/default.nix +++ b/pkgs/development/python-modules/qcodes/default.nix @@ -1,19 +1,19 @@ { lib -, buildPythonPackage -, fetchPypi -, pythonOlder -, setuptools -, versioningit -, wheel - - # mandatory , broadbean +, buildPythonPackage +, cf-xarray +, dask +, deepdiff +, fetchPypi , h5netcdf , h5py +, hypothesis , importlib-metadata -, ipywidgets , ipykernel +, ipython +, ipywidgets , jsonschema +, lxml , matplotlib , numpy , opencensus @@ -21,54 +21,44 @@ , opentelemetry-api , packaging , pandas -, pyvisa -, ruamel-yaml -, tabulate -, typing-extensions -, tqdm -, uncertainties -, websockets -, wrapt -, xarray -, ipython , pillow -, rsa - - # optional -, qcodes-loop -, slack-sdk - - # test , pip -, pytestCheckHook -, deepdiff -, hypothesis -, lxml , pytest-asyncio , pytest-mock , pytest-rerunfailures , pytest-xdist +, pytestCheckHook +, pythonOlder +, pyvisa , pyvisa-sim +, qcodes-loop +, rsa +, ruamel-yaml +, setuptools , sphinx +, tabulate +, tqdm +, typing-extensions +, uncertainties +, versioningit +, websockets +, wheel +, wrapt +, xarray }: buildPythonPackage rec { pname = "qcodes"; - version = "0.40.0"; + version = "0.41.1"; format = "pyproject"; disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - sha256 = "sha256-C8/ltX3tSxCbbheuel3BjIkRBl/E92lK709QYx+2FL0="; + hash = "sha256-3Ncg51E4KYbvzlEyesVbTmzmz+UPfFkj3tudVbNYqHQ="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'versioningit ~=' 'versioningit >=' - ''; - nativeBuildInputs = [ setuptools versioningit @@ -77,6 +67,8 @@ buildPythonPackage rec { propagatedBuildInputs = [ broadbean + cf-xarray + dask h5netcdf h5py ipykernel @@ -109,13 +101,8 @@ buildPythonPackage rec { loop = [ qcodes-loop ]; - slack = [ - slack-sdk - ]; }; - __darwinAllowLocalNetworking = true; - nativeCheckInputs = [ deepdiff hypothesis @@ -130,6 +117,8 @@ buildPythonPackage rec { sphinx ]; + __darwinAllowLocalNetworking = true; + pytestFlagsArray = [ # Follow upstream with settings "--durations=20" @@ -138,6 +127,8 @@ buildPythonPackage rec { disabledTestPaths = [ # Test depends on qcodes-loop, causing a cyclic dependency "qcodes/tests/dataset/measurement/test_load_legacy_data.py" + # TypeError + "qcodes/tests/dataset/test_dataset_basic.py" ]; disabledTests = [ @@ -161,8 +152,8 @@ buildPythonPackage rec { ''; meta = with lib; { - changelog = "https://github.com/QCoDeS/Qcodes/releases/tag/v${version}"; description = "Python-based data acquisition framework"; + changelog = "https://github.com/QCoDeS/Qcodes/releases/tag/v${version}"; downloadPage = "https://github.com/QCoDeS/Qcodes"; homepage = "https://qcodes.github.io/Qcodes/"; license = licenses.mit; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4fca638be81f..5639ff919b94 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1898,6 +1898,8 @@ self: super: with self; { certvalidator = callPackage ../development/python-modules/certvalidator { }; + cf-xarray = callPackage ../development/python-modules/cf-xarray { }; + cffi = callPackage ../development/python-modules/cffi { }; cffsubr = callPackage ../development/python-modules/cffsubr { };