nixpkgs/pkgs/development/python-modules/qcodes/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

175 lines
3.1 KiB
Nix
Raw Normal View History

2023-05-12 22:37:58 +00:00
{ lib
, broadbean
2023-05-12 22:37:58 +00:00
, buildPythonPackage
, cf-xarray
, dask
, deepdiff
, fetchFromGitHub
2023-05-12 22:37:58 +00:00
, h5netcdf
, h5py
, hypothesis
2023-05-12 22:37:58 +00:00
, importlib-metadata
, ipykernel
, ipython
, ipywidgets
2023-05-12 22:37:58 +00:00
, jsonschema
, lxml
2023-05-12 22:37:58 +00:00
, matplotlib
, numpy
, opencensus
, opencensus-ext-azure
, opentelemetry-api
2023-05-12 22:37:58 +00:00
, packaging
, pandas
, pillow
, pip
2023-05-12 22:37:58 +00:00
, pytest-asyncio
, pytest-mock
, pytest-rerunfailures
, pytest-xdist
, pytestCheckHook
, pythonOlder
, pyvisa
2023-05-12 22:37:58 +00:00
, pyvisa-sim
, rsa
, ruamel-yaml
, setuptools
2023-05-12 22:37:58 +00:00
, sphinx
, tabulate
, tqdm
, typing-extensions
, uncertainties
, versioningit
, websockets
, wheel
, wrapt
, xarray
2023-05-12 22:37:58 +00:00
}:
buildPythonPackage rec {
pname = "qcodes";
version = "0.44.1";
pyproject = true;
2023-05-12 22:37:58 +00:00
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "microsoft";
repo = "Qcodes";
rev = "refs/tags/v${version}";
hash = "sha256-AggAVq/yfJUZRwoQb29QoIbVIAdV3solKCjivqucLZk=";
2023-05-12 22:37:58 +00:00
};
nativeBuildInputs = [
setuptools
versioningit
wheel
];
2023-05-12 22:37:58 +00:00
propagatedBuildInputs = [
broadbean
cf-xarray
dask
2023-05-12 22:37:58 +00:00
h5netcdf
h5py
ipykernel
ipython
ipywidgets
2023-05-12 22:37:58 +00:00
jsonschema
matplotlib
numpy
opencensus
opencensus-ext-azure
opentelemetry-api
2023-05-12 22:37:58 +00:00
packaging
pandas
pillow
2023-05-12 22:37:58 +00:00
pyvisa
rsa
2023-05-12 22:37:58 +00:00
ruamel-yaml
tabulate
tqdm
typing-extensions
2023-05-12 22:37:58 +00:00
uncertainties
websockets
wrapt
xarray
] ++ lib.optionals (pythonOlder "3.10") [
importlib-metadata
];
nativeCheckInputs = [
deepdiff
hypothesis
lxml
pip
2023-05-12 22:37:58 +00:00
pytest-asyncio
pytest-mock
pytest-rerunfailures
pytest-xdist
pytestCheckHook
2023-05-12 22:37:58 +00:00
pyvisa-sim
sphinx
];
__darwinAllowLocalNetworking = true;
pytestFlagsArray = [
"-v"
"-n"
"$NIX_BUILD_CORES"
# Follow upstream with settings
"-m 'not serial'"
"--hypothesis-profile ci"
"--durations=20"
];
2023-05-12 22:37:58 +00:00
disabledTestPaths = [
# Test depends on qcodes-loop, causing a cyclic dependency
"tests/dataset/measurement/test_load_legacy_data.py"
# TypeError
"tests/dataset/test_dataset_basic.py"
2023-05-12 22:37:58 +00:00
];
disabledTests = [
# Tests are time-sensitive and power-consuming
# Those tests fails repeatably and are flaky
"test_access_channels_by_slice"
"test_aggregator"
"test_datasaver"
"test_do1d_additional_setpoints_shape"
"test_dond_1d_additional_setpoints_shape"
"test_field_limits"
"test_get_array_in_scalar_param_data"
"test_get_parameter_data"
"test_ramp_safely"
# more flaky tests
# https://github.com/microsoft/Qcodes/issues/5551
"test_query_close_once_at_init"
"test_step_ramp"
];
pythonImportsCheck = [
"qcodes"
];
2023-05-12 22:37:58 +00:00
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'default-version = "0.0"' 'default-version = "${version}"'
'';
2023-05-12 22:37:58 +00:00
postInstall = ''
export HOME="$TMPDIR"
'';
meta = with lib; {
2023-05-12 22:37:58 +00:00
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 ];
2023-05-12 22:37:58 +00:00
};
}