2021-06-29 16:34:30 +01:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, geopy
|
|
|
|
, imageio
|
|
|
|
, pillow
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "env-canada";
|
2021-07-22 10:03:06 +01:00
|
|
|
version = "0.4.1";
|
2021-06-29 16:34:30 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "michaeldavie";
|
|
|
|
repo = "env_canada";
|
|
|
|
rev = "v${version}";
|
2021-07-22 10:03:06 +01:00
|
|
|
sha256 = "0v1wmjvi05i6mjh6yxqigbf2spf7842198yp98f7h0nyfjmz96hn";
|
2021-06-29 16:34:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
geopy
|
|
|
|
imageio
|
|
|
|
pillow
|
|
|
|
python-dateutil
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_get_aqhi_regions"
|
|
|
|
"test_update"
|
|
|
|
"test_get_hydro_sites"
|
|
|
|
"test_echydro"
|
|
|
|
"test_get_dimensions"
|
|
|
|
"test_get_latest_frame"
|
|
|
|
"test_get_loop"
|
|
|
|
"test_get_ec_sites"
|
2021-07-22 10:03:06 +01:00
|
|
|
"test_ecradar"
|
2021-06-29 16:34:30 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "env_canada" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library to get Environment Canada weather data";
|
|
|
|
homepage = "https://github.com/michaeldavie/env_canada";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|