diff options
Diffstat (limited to 'pkgs/development/python-modules/qcodes/default.nix')
-rw-r--r-- | pkgs/development/python-modules/qcodes/default.nix | 166 |
1 files changed, 99 insertions, 67 deletions
diff --git a/pkgs/development/python-modules/qcodes/default.nix b/pkgs/development/python-modules/qcodes/default.nix index 740939959e76..a1c5206f4af2 100644 --- a/pkgs/development/python-modules/qcodes/default.nix +++ b/pkgs/development/python-modules/qcodes/default.nix @@ -1,72 +1,80 @@ -{ lib -, broadbean -, buildPythonPackage -, cf-xarray -, dask -, deepdiff -, fetchFromGitHub -, h5netcdf -, h5py -, hypothesis -, importlib-metadata -, ipykernel -, ipython -, ipywidgets -, jsonschema -, lxml -, matplotlib -, numpy -, opencensus -, opencensus-ext-azure -, opentelemetry-api -, packaging -, pandas -, pillow -, pip -, pytest-asyncio -, pytest-mock -, pytest-rerunfailures -, pytest-xdist -, pytestCheckHook -, pythonOlder -, pyvisa -, pyvisa-sim -, rsa -, ruamel-yaml -, setuptools -, sphinx -, tabulate -, tqdm -, typing-extensions -, uncertainties -, versioningit -, websockets -, wheel -, wrapt -, xarray +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + setuptools, + versioningit, + + # dependencies + broadbean, + cf-xarray, + dask, + h5netcdf, + h5py, + ipykernel, + ipython, + ipywidgets, + jsonschema, + libcst, + matplotlib, + numpy, + opentelemetry-api, + packaging, + pandas, + pillow, + pyarrow, + pyvisa, + ruamel-yaml, + tabulate, + tqdm, + typing-extensions, + uncertainties, + websockets, + wrapt, + xarray, + + # optional-dependencies + furo, + jinja2, + nbsphinx, + pyvisa-sim, + scipy, + sphinx, + sphinx-issues, + towncrier, + + # checks + deepdiff, + hypothesis, + lxml, + pip, + pytest-asyncio, + pytest-mock, + pytest-rerunfailures, + pytest-xdist, + pytestCheckHook, }: buildPythonPackage rec { pname = "qcodes"; - version = "0.44.1"; + version = "0.49.0"; pyproject = true; - disabled = pythonOlder "3.9"; - src = fetchFromGitHub { owner = "microsoft"; repo = "Qcodes"; rev = "refs/tags/v${version}"; - hash = "sha256-AggAVq/yfJUZRwoQb29QoIbVIAdV3solKCjivqucLZk="; + hash = "sha256-AlrQH0yKbEz+ICdvWWjMD7LQvWl36cFWlp+fegAmtL8="; }; - nativeBuildInputs = [ + build-system = [ setuptools versioningit - wheel ]; - propagatedBuildInputs = [ + dependencies = [ broadbean cf-xarray dask @@ -78,14 +86,12 @@ buildPythonPackage rec { jsonschema matplotlib numpy - opencensus - opencensus-ext-azure opentelemetry-api packaging pandas pillow + pyarrow pyvisa - rsa ruamel-yaml tabulate tqdm @@ -94,13 +100,39 @@ buildPythonPackage rec { websockets wrapt xarray - ] ++ lib.optionals (pythonOlder "3.10") [ - importlib-metadata ]; + optional-dependencies = { + docs = [ + # autodocsumm + furo + jinja2 + nbsphinx + pyvisa-sim + # qcodes-loop + scipy + sphinx + # sphinx-favicon + sphinx-issues + # sphinx-jsonschema + # sphinxcontrib-towncrier + towncrier + ]; + loop = [ + # qcodes-loop + ]; + refactor = [ + libcst + ]; + zurichinstruments = [ + # zhinst-qcodes + ]; + }; + nativeCheckInputs = [ deepdiff hypothesis + libcst lxml pip pytest-asyncio @@ -116,8 +148,6 @@ buildPythonPackage rec { pytestFlagsArray = [ "-v" - "-n" - "$NIX_BUILD_CORES" # Follow upstream with settings "-m 'not serial'" "--hypothesis-profile ci" @@ -150,25 +180,27 @@ buildPythonPackage rec { "test_step_ramp" ]; - pythonImportsCheck = [ - "qcodes" - ]; + pythonImportsCheck = [ "qcodes" ]; + # Remove the `asyncio_default_fixture_loop_scope` option as it has been introduced in newer `pytest-asyncio` v0.24 + # which is not in nixpkgs yet: + # pytest.PytestConfigWarning: Unknown config option: asyncio_default_fixture_loop_scope postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail 'default-version = "0.0"' 'default-version = "${version}"' + --replace-fail 'default-version = "0.0"' 'default-version = "${version}"' \ + --replace-fail 'asyncio_default_fixture_loop_scope = "function"' "" ''; postInstall = '' export HOME="$TMPDIR" ''; - meta = with lib; { + meta = { 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; - maintainers = with maintainers; [ evilmav ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ evilmav ]; }; } |