python3Packages.cirq: unbreak

Remove unneeded test disables.
Add changelog.
Unpin most python dependencies.
This commit is contained in:
Drew Risinger 2020-08-31 21:56:40 -04:00 committed by Jon
parent 3d3eef24ae
commit ab525faf05

View file

@ -48,6 +48,15 @@ buildPythonPackage rec {
})
];
postPatch = ''
substituteInPlace requirements.txt \
--replace "freezegun~=0.3.15" "freezegun" \
--replace "matplotlib~=3.0" "matplotlib" \
--replace "networkx~=2.4" "networkx" \
--replace "numpy~=1.16, < 1.19" "numpy" \
--replace "protobuf~=3.12.0" "protobuf"
'';
propagatedBuildInputs = [
freezegun
google_api_core
@ -64,7 +73,7 @@ buildPythonPackage rec {
];
doCheck = true;
# pythonImportsCheck = [ "cirq" "cirq.Ciruit" ]; # cirq's importlib hook doesn't work here
# pythonImportsCheck = [ "cirq" "cirq.Circuit" ]; # cirq's importlib hook doesn't work here
dontUseSetuptoolsCheck = true;
checkInputs = [
pytestCheckHook
@ -78,16 +87,10 @@ buildPythonPackage rec {
pytestFlagsArray = [
"--ignore=dev_tools" # Only needed when developing new code, which is out-of-scope
"--benchmark-disable" # Don't need to run benchmarks when packaging.
];
disabledTests = [
"test_serialize_sympy_constants" # fails due to small error in pi (~10e-7)
"test_convert_to_ion_gates" # fails due to rounding error, 0.75 != 0.750...2
# Newly disabled tests on cirq 0.8
# TODO: test & figure out why failing
"engine_job_test"
"test_health"
"test_run_delegation"
"test_convert_to_ion_gates" # fails on some systems due to rounding error, 0.75 != 0.750...2
] ++ lib.optionals stdenv.isAarch64 [
# Seem to fail due to math issues on aarch64?
"expectation_from_wavefunction"
@ -97,6 +100,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.";
homepage = "https://github.com/quantumlib/cirq";
changelog = "https://github.com/quantumlib/Cirq/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ drewrisinger ];
};