1{
2 lib,
3 aiohttp,
4 aioresponses,
5 buildPythonPackage,
6 dacite,
7 fetchFromGitHub,
8 pytest-asyncio,
9 pytest-error-for-skips,
10 pytestCheckHook,
11 pythonOlder,
12 setuptools,
13 syrupy,
14}:
15
16buildPythonPackage rec {
17 pname = "gios";
18 version = "6.1.2";
19 pyproject = true;
20
21 disabled = pythonOlder "3.12";
22
23 src = fetchFromGitHub {
24 owner = "bieniu";
25 repo = "gios";
26 tag = version;
27 hash = "sha256-z0MFXlim0YJ2ifAU94IjDOsIgaRzQk6YRqy64+LNehQ=";
28 };
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 aiohttp
34 dacite
35 ];
36
37 nativeCheckInputs = [
38 aioresponses
39 pytest-asyncio
40 pytest-error-for-skips
41 pytestCheckHook
42 syrupy
43 ];
44
45 disabledTests = [
46 # Test requires network access
47 "test_invalid_station_id"
48 ];
49
50 pythonImportsCheck = [ "gios" ];
51
52 meta = with lib; {
53 description = "Python client for getting air quality data from GIOS";
54 homepage = "https://github.com/bieniu/gios";
55 changelog = "https://github.com/bieniu/gios/releases/tag/${version}";
56 license = licenses.asl20;
57 maintainers = with maintainers; [ fab ];
58 };
59}