mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 06:14:26 +03:00
pythonPackages.pvlib: enable tests (#56301)
This commit is contained in:
parent
ef5a166a9d
commit
eef63417d4
@ -1,20 +1,30 @@
|
|||||||
{ stdenv, buildPythonPackage, fetchPypi, numpy, pandas, pytz, six, pytest }:
|
{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, pandas, pytz, six
|
||||||
|
, pytest, mock, pytest-mock }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pvlib";
|
pname = "pvlib";
|
||||||
version = "0.6.1";
|
version = "0.6.1";
|
||||||
|
|
||||||
src = fetchPypi {
|
# Use GitHub because PyPI release tarball doesn't contain the tests. See:
|
||||||
inherit pname version;
|
# https://github.com/pvlib/pvlib-python/issues/473
|
||||||
sha256 = "56e70747add2e50846dd8bbef9a4735e82c1224ce630d1db7590b96bd59dd3f7";
|
src = fetchFromGitHub{
|
||||||
|
owner = "pvlib";
|
||||||
|
repo = "pvlib-python";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "17h7vz9s829qxnl4byr8458gzgiismrbrn5gl0klhfhwvc5kkdfh";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
checkInputs = [ pytest mock pytest-mock ];
|
||||||
propagatedBuildInputs = [ numpy pandas pytz six ];
|
propagatedBuildInputs = [ numpy pandas pytz six ];
|
||||||
|
|
||||||
# Currently, the PyPI tarball doesn't contain the tests. When that has been
|
# Skip a few tests that try to access some URLs
|
||||||
# fixed, enable testing. See: https://github.com/pvlib/pvlib-python/issues/473
|
checkPhase = ''
|
||||||
doCheck = false;
|
runHook preCheck
|
||||||
|
pushd pvlib/test
|
||||||
|
pytest . -k "not test_read_srml_dt_index and not test_read_srml_month_from_solardata"
|
||||||
|
popd
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://pvlib-python.readthedocs.io;
|
homepage = http://pvlib-python.readthedocs.io;
|
||||||
|
Loading…
Reference in New Issue
Block a user