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