2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-06-20 14:57:18 +00:00
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
versioningit,
|
|
|
|
wheel,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
broadbean,
|
2024-06-05 15:53:02 +00:00
|
|
|
cf-xarray,
|
|
|
|
dask,
|
|
|
|
h5netcdf,
|
|
|
|
h5py,
|
|
|
|
ipykernel,
|
|
|
|
ipython,
|
|
|
|
ipywidgets,
|
|
|
|
jsonschema,
|
2024-07-27 06:49:29 +00:00
|
|
|
libcst,
|
2024-06-05 15:53:02 +00:00
|
|
|
matplotlib,
|
|
|
|
numpy,
|
|
|
|
opentelemetry-api,
|
|
|
|
packaging,
|
|
|
|
pandas,
|
|
|
|
pillow,
|
2024-06-20 14:57:18 +00:00
|
|
|
pyarrow,
|
2024-06-05 15:53:02 +00:00
|
|
|
pyvisa,
|
|
|
|
ruamel-yaml,
|
|
|
|
tabulate,
|
|
|
|
tqdm,
|
|
|
|
typing-extensions,
|
|
|
|
uncertainties,
|
|
|
|
websockets,
|
|
|
|
wrapt,
|
|
|
|
xarray,
|
2024-06-20 14:57:18 +00:00
|
|
|
importlib-metadata,
|
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
jinja2,
|
|
|
|
nbsphinx,
|
|
|
|
pyvisa-sim,
|
|
|
|
scipy,
|
|
|
|
sphinx,
|
|
|
|
sphinx-issues,
|
|
|
|
sphinx-rtd-theme,
|
|
|
|
towncrier,
|
|
|
|
opencensus,
|
|
|
|
opencensus-ext-azure,
|
|
|
|
|
|
|
|
# checks
|
|
|
|
deepdiff,
|
|
|
|
hypothesis,
|
|
|
|
lxml,
|
|
|
|
pip,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-mock,
|
|
|
|
pytest-rerunfailures,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qcodes";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.46.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
src = fetchFromGitHub {
|
2024-02-29 20:09:43 +00:00
|
|
|
owner = "microsoft";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "Qcodes";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-CeAX3sBE21v68KnCe8z28WTc7zMPA7usRRGh+dNijjo=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
build-system = [
|
2023-07-15 17:15:38 +00:00
|
|
|
setuptools
|
|
|
|
versioningit
|
2023-08-10 07:59:29 +00:00
|
|
|
wheel
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
dependencies = [
|
2023-07-15 17:15:38 +00:00
|
|
|
broadbean
|
2023-11-16 04:20:00 +00:00
|
|
|
cf-xarray
|
|
|
|
dask
|
2023-07-15 17:15:38 +00:00
|
|
|
h5netcdf
|
|
|
|
h5py
|
|
|
|
ipykernel
|
2023-08-22 20:05:09 +00:00
|
|
|
ipython
|
|
|
|
ipywidgets
|
2023-07-15 17:15:38 +00:00
|
|
|
jsonschema
|
|
|
|
matplotlib
|
|
|
|
numpy
|
2023-11-16 04:20:00 +00:00
|
|
|
opentelemetry-api
|
2023-07-15 17:15:38 +00:00
|
|
|
packaging
|
|
|
|
pandas
|
2023-08-22 20:05:09 +00:00
|
|
|
pillow
|
2024-06-20 14:57:18 +00:00
|
|
|
pyarrow
|
2023-07-15 17:15:38 +00:00
|
|
|
pyvisa
|
|
|
|
ruamel-yaml
|
|
|
|
tabulate
|
|
|
|
tqdm
|
2023-08-22 20:05:09 +00:00
|
|
|
typing-extensions
|
2023-07-15 17:15:38 +00:00
|
|
|
uncertainties
|
|
|
|
websockets
|
|
|
|
wrapt
|
|
|
|
xarray
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
optional-dependencies = {
|
|
|
|
docs = [
|
|
|
|
# autodocsumm
|
|
|
|
jinja2
|
|
|
|
nbsphinx
|
|
|
|
pyvisa-sim
|
|
|
|
# qcodes-loop
|
|
|
|
scipy
|
|
|
|
sphinx
|
|
|
|
# sphinx-favicon
|
|
|
|
sphinx-issues
|
|
|
|
# sphinx-jsonschema
|
|
|
|
sphinx-rtd-theme
|
|
|
|
# sphinxcontrib-towncrier
|
|
|
|
towncrier
|
|
|
|
];
|
|
|
|
loop = [
|
|
|
|
# qcodes-loop
|
|
|
|
];
|
|
|
|
opencensus = [
|
|
|
|
opencensus
|
|
|
|
opencensus-ext-azure
|
|
|
|
];
|
2024-07-27 06:49:29 +00:00
|
|
|
refactor = [
|
|
|
|
libcst
|
|
|
|
];
|
2024-06-20 14:57:18 +00:00
|
|
|
zurichinstruments = [
|
|
|
|
# zhinst-qcodes
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
deepdiff
|
|
|
|
hypothesis
|
2024-07-27 06:49:29 +00:00
|
|
|
libcst
|
2023-07-15 17:15:38 +00:00
|
|
|
lxml
|
2023-08-10 07:59:29 +00:00
|
|
|
pip
|
2023-07-15 17:15:38 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytest-rerunfailures
|
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
|
|
|
pyvisa-sim
|
|
|
|
sphinx
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pytestFlagsArray = [
|
2024-01-02 11:29:13 +00:00
|
|
|
"-v"
|
|
|
|
"-n"
|
|
|
|
"$NIX_BUILD_CORES"
|
2023-07-15 17:15:38 +00:00
|
|
|
# Follow upstream with settings
|
2024-02-29 20:09:43 +00:00
|
|
|
"-m 'not serial'"
|
|
|
|
"--hypothesis-profile ci"
|
2023-07-15 17:15:38 +00:00
|
|
|
"--durations=20"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
2023-08-22 20:05:09 +00:00
|
|
|
# Test depends on qcodes-loop, causing a cyclic dependency
|
2024-01-02 11:29:13 +00:00
|
|
|
"tests/dataset/measurement/test_load_legacy_data.py"
|
2023-11-16 04:20:00 +00:00
|
|
|
# TypeError
|
2024-01-02 11:29:13 +00:00
|
|
|
"tests/dataset/test_dataset_basic.py"
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests are time-sensitive and power-consuming
|
2024-01-02 11:29:13 +00:00
|
|
|
# Those tests fails repeatably and are flaky
|
2023-08-22 20:05:09 +00:00
|
|
|
"test_access_channels_by_slice"
|
2024-01-02 11:29:13 +00:00
|
|
|
"test_aggregator"
|
|
|
|
"test_datasaver"
|
2023-08-22 20:05:09 +00:00
|
|
|
"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"
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
# more flaky tests
|
|
|
|
# https://github.com/microsoft/Qcodes/issues/5551
|
|
|
|
"test_query_close_once_at_init"
|
|
|
|
"test_step_ramp"
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "qcodes" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail 'default-version = "0.0"' 'default-version = "${version}"'
|
|
|
|
'';
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postInstall = ''
|
|
|
|
export HOME="$TMPDIR"
|
|
|
|
'';
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
meta = {
|
2023-07-15 17:15:38 +00:00
|
|
|
description = "Python-based data acquisition framework";
|
|
|
|
changelog = "https://github.com/QCoDeS/Qcodes/releases/tag/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
downloadPage = "https://github.com/QCoDeS/Qcodes";
|
|
|
|
homepage = "https://qcodes.github.io/Qcodes/";
|
2024-06-20 14:57:18 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ evilmav ];
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
}
|