1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 freezegun,
7 geopy,
8 imageio,
9 lxml,
10 numpy,
11 pandas,
12 pillow,
13 pytest-asyncio,
14 pytestCheckHook,
15 python-dateutil,
16 setuptools,
17 syrupy,
18 voluptuous,
19}:
20
21buildPythonPackage rec {
22 pname = "env-canada";
23 version = "0.11.3";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "michaeldavie";
28 repo = "env_canada";
29 tag = "v${version}";
30 hash = "sha256-9sgdoHsYklszt1y63WQ4BkIGLxprILx2kh7+BmmUlqE=";
31 };
32
33 build-system = [ setuptools ];
34
35 dependencies = [
36 aiohttp
37 geopy
38 imageio
39 lxml
40 numpy
41 pandas
42 pillow
43 python-dateutil
44 voluptuous
45 ];
46
47 nativeCheckInputs = [
48 pytest-asyncio
49 freezegun
50 pytestCheckHook
51 syrupy
52 ];
53
54 disabledTests = [
55 # Tests require network access
56 "test_get_aqhi_regions"
57 "test_update"
58 "test_get_hydro_sites"
59 "test_echydro"
60 "test_get_dimensions"
61 "test_get_latest_frame"
62 "test_get_loop"
63 "test_get_ec_sites"
64 "test_ecradar"
65 "test_historical_number_values"
66 "test_basemap_caching_behavior"
67 "test_layer_image_caching"
68 ];
69
70 pythonImportsCheck = [ "env_canada" ];
71
72 meta = with lib; {
73 description = "Python library to get Environment Canada weather data";
74 homepage = "https://github.com/michaeldavie/env_canada";
75 changelog = "https://github.com/michaeldavie/env_canada/blob/${src.tag}/CHANGELOG.md";
76 license = licenses.mit;
77 maintainers = with maintainers; [ fab ];
78 };
79}