1{ lib, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder, numpy, pandas, pytz, six
2, pytestCheckHook, flaky, mock, pytest-mock, requests }:
3
4buildPythonPackage rec {
5 pname = "pvlib";
6 version = "0.7.2";
7
8 # Support for Python <3.5 dropped in 0.6.3 on June 1, 2019.
9 disabled = pythonOlder "3.5";
10
11 src = fetchPypi{
12 inherit pname version;
13 sha256 = "40708492ed0a41e900d36933b9b9ab7b575c72ebf3eee81293c626e301aa7ea1";
14 };
15
16 patches = [
17 # enable later pandas versions, remove next bump
18 (fetchpatch {
19 url = "https://github.com/pvlib/pvlib-python/commit/010a2adc9e9ef6fe9f2aea4c02d7e6ede9f96a53.patch";
20 sha256 = "0jibn4khixz6hv6racmp86m5mcms0ysz1y5bgpplw1kcvf8sn04x";
21 excludes = [
22 "pvlib/tests/test_inverter.py"
23 "docs/sphinx/source/whatsnew/v0.8.0.rst"
24 "ci/requirements-py35-min.yml"
25 ];
26 })
27 ];
28
29 checkInputs = [ pytestCheckHook flaky mock pytest-mock ];
30 propagatedBuildInputs = [ numpy pandas pytz six requests ];
31
32 # Skip a few tests that try to access some URLs
33 pytestFlagsArray = [ "pvlib/tests" ];
34 disabledTests = [
35 "read_srml_dt_index"
36 "read_srml_month_from_solardata"
37 "get_psm3"
38 "pvgis"
39 "read_surfrad_network"
40 "remote"
41 # small rounding errors, E.g <1e-10^5
42 "calcparams_pvsyst"
43 "martin_ruiz_diffuse"
44 "hsu"
45 "backtrack"
46 ];
47
48 meta = with lib; {
49 homepage = "https://pvlib-python.readthedocs.io";
50 description = "Simulate the performance of photovoltaic energy systems";
51 license = licenses.bsd3;
52 maintainers = with maintainers; [ jluttine ];
53 };
54}