2018-04-28 20:06:12 +01:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, Theano
|
|
|
|
, pandas
|
|
|
|
, patsy
|
|
|
|
, joblib
|
|
|
|
, tqdm
|
|
|
|
, six
|
|
|
|
, h5py
|
2020-04-07 15:43:22 +01:00
|
|
|
, arviz
|
|
|
|
, packaging
|
2018-04-28 20:06:12 +01:00
|
|
|
, pytest
|
|
|
|
, nose
|
|
|
|
, parameterized
|
2020-10-03 23:50:03 +01:00
|
|
|
, fastprogress
|
|
|
|
, typing-extensions
|
2018-04-28 20:06:12 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymc3";
|
2021-08-26 20:32:41 +01:00
|
|
|
version = "3.11.4";
|
2018-04-28 20:06:12 +01:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-08-26 20:32:41 +01:00
|
|
|
sha256 = "3b88d1e6c85f7fb8a9b99d6f136ac860672170370ec4146338fdd160c3b3fd3f";
|
2018-04-28 20:06:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# No need for coverage stats in Nix builds
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace ", 'pytest-cov'" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
Theano
|
|
|
|
pandas
|
|
|
|
patsy
|
|
|
|
joblib
|
|
|
|
tqdm
|
|
|
|
six
|
|
|
|
h5py
|
2020-04-07 15:43:22 +01:00
|
|
|
arviz
|
|
|
|
packaging
|
2020-10-03 23:50:03 +01:00
|
|
|
fastprogress
|
|
|
|
typing-extensions
|
2018-04-28 20:06:12 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
nose
|
|
|
|
parameterized
|
|
|
|
];
|
|
|
|
|
|
|
|
# The test suite is computationally intensive and test failures are not
|
|
|
|
# indicative for package usability hence tests are disabled by default.
|
|
|
|
doCheck = false;
|
2020-10-03 23:50:03 +01:00
|
|
|
pythonImportsCheck = [ "pymc3" ];
|
2018-04-28 20:06:12 +01:00
|
|
|
|
|
|
|
# For some reason tests are run as a part of the *install* phase if enabled.
|
|
|
|
# Theano writes compiled code to ~/.theano hence we set $HOME.
|
|
|
|
preInstall = "export HOME=$(mktemp -d)";
|
|
|
|
postInstall = "rm -rf $HOME";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Bayesian estimation, particularly using Markov chain Monte Carlo (MCMC)";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/pymc-devs/pymc3";
|
2018-04-28 20:06:12 +01:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ ilya-kolpakov ];
|
|
|
|
};
|
|
|
|
}
|