2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchpatch,
|
|
|
|
fetchPypi,
|
2024-09-19 14:19:46 +00:00
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
numpy,
|
|
|
|
scipy,
|
|
|
|
six,
|
|
|
|
decorator,
|
2024-09-19 14:19:46 +00:00
|
|
|
pytestCheckHook,
|
2024-06-05 15:53:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "paramz";
|
|
|
|
version = "0.9.5";
|
2024-09-19 14:19:46 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0917211c0f083f344e7f1bc997e0d713dbc147b6380bc19f606119394f820b9a";
|
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "remove-deprecated-numpy-uses";
|
|
|
|
url = "https://github.com/sods/paramz/pull/38/commits/a5a0be15b12c5864b438d870b519ad17cc72cd12.patch";
|
|
|
|
hash = "sha256-vj/amEXL9QJ7VdqJmyhv/lj8n+yuiZEARQBYWw6lgBA=";
|
|
|
|
})
|
2023-11-16 04:20:00 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "_raveled_index_for.patch";
|
|
|
|
url = "https://github.com/sods/paramz/pull/40/commits/dd68a81cfd28edb48354c6a9b493ef711f00fb5b.patch";
|
|
|
|
hash = "sha256-nbnW3lYJDT1WXko3Y28YyELhO0QIAA1Tx0CJ57T1Nq0=";
|
|
|
|
})
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
six
|
|
|
|
decorator
|
|
|
|
];
|
2020-12-29 15:07:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
preCheck = ''
|
|
|
|
substituteInPlace paramz/tests/parameterized_tests.py \
|
|
|
|
--replace-fail "assertRaisesRegexp" "assertRaisesRegex"
|
2020-12-29 15:07:52 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"paramz/tests/array_core_tests.py"
|
|
|
|
"paramz/tests/cacher_tests.py"
|
|
|
|
"paramz/tests/examples_tests.py"
|
|
|
|
"paramz/tests/index_operations_tests.py"
|
|
|
|
"paramz/tests/init_tests.py"
|
|
|
|
"paramz/tests/lists_and_dicts_tests.py"
|
|
|
|
"paramz/tests/model_tests.py"
|
|
|
|
"paramz/tests/observable_tests.py"
|
|
|
|
"paramz/tests/parameterized_tests.py"
|
|
|
|
"paramz/tests/pickle_tests.py"
|
|
|
|
"paramz/tests/verbose_optimize_tests.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "paramz" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Parameterization framework for parameterized model creation and handling";
|
|
|
|
homepage = "https://github.com/sods/paramz";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|