2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder, numpy, pandas, pytz, six
|
2020-08-15 20:03:41 +01:00
|
|
|
, pytestCheckHook, flaky, mock, pytest-mock, requests }:
|
2018-06-06 11:22:37 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pvlib";
|
2020-05-09 11:01:54 +01:00
|
|
|
version = "0.7.2";
|
2018-06-06 11:22:37 +01:00
|
|
|
|
2019-09-07 12:31:25 +01:00
|
|
|
# Support for Python <3.5 dropped in 0.6.3 on June 1, 2019.
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchPypi{
|
|
|
|
inherit pname version;
|
2020-05-09 11:01:54 +01:00
|
|
|
sha256 = "40708492ed0a41e900d36933b9b9ab7b575c72ebf3eee81293c626e301aa7ea1";
|
2018-06-06 11:22:37 +01:00
|
|
|
};
|
|
|
|
|
2020-08-15 20:03:41 +01:00
|
|
|
patches = [
|
|
|
|
# enable later pandas versions, remove next bump
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pvlib/pvlib-python/commit/010a2adc9e9ef6fe9f2aea4c02d7e6ede9f96a53.patch";
|
|
|
|
sha256 = "0jibn4khixz6hv6racmp86m5mcms0ysz1y5bgpplw1kcvf8sn04x";
|
|
|
|
excludes = [
|
|
|
|
"pvlib/tests/test_inverter.py"
|
|
|
|
"docs/sphinx/source/whatsnew/v0.8.0.rst"
|
|
|
|
"ci/requirements-py35-min.yml"
|
|
|
|
];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook flaky mock pytest-mock ];
|
2019-09-07 12:31:25 +01:00
|
|
|
propagatedBuildInputs = [ numpy pandas pytz six requests ];
|
2018-06-06 11:22:37 +01:00
|
|
|
|
2019-03-01 19:05:35 +00:00
|
|
|
# Skip a few tests that try to access some URLs
|
2020-08-15 20:03:41 +01:00
|
|
|
pytestFlagsArray = [ "pvlib/tests" ];
|
|
|
|
disabledTests = [
|
|
|
|
"read_srml_dt_index"
|
|
|
|
"read_srml_month_from_solardata"
|
|
|
|
"get_psm3"
|
|
|
|
"pvgis"
|
|
|
|
"read_surfrad_network"
|
|
|
|
"remote"
|
|
|
|
# small rounding errors, E.g <1e-10^5
|
|
|
|
"calcparams_pvsyst"
|
|
|
|
"martin_ruiz_diffuse"
|
|
|
|
"hsu"
|
|
|
|
"backtrack"
|
|
|
|
];
|
2018-06-06 11:22:37 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pvlib-python.readthedocs.io";
|
2018-06-06 11:22:37 +01:00
|
|
|
description = "Simulate the performance of photovoltaic energy systems";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|