about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/ariadne/default.nix
blob: 65b65c8643ec5995a7f99c5dcbffb9ec562f6099 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{ lib
, buildPythonPackage
, fetchFromGitHub
, freezegun
, graphql-core
, hatchling
, httpx
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, pythonOlder
, python-multipart
, starlette
, syrupy
, typing-extensions
, werkzeug
}:

buildPythonPackage rec {
  pname = "ariadne";
  version = "0.22.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "mirumee";
    repo = "ariadne";
    rev = "refs/tags/${version}";
    hash = "sha256-GMBtW2gZbF1m0BrKhYEkSaZYt5tIGmP/ipy6WC1H1pg=";
  };

  patches = [
    ./remove-opentracing.patch
  ];

  nativeBuildInputs = [
    hatchling
  ];

  propagatedBuildInputs = [
    graphql-core
    starlette
    typing-extensions
  ];

  nativeCheckInputs = [
    freezegun
    httpx
    pytest-asyncio
    pytest-mock
    pytestCheckHook
    python-multipart
    syrupy
    werkzeug
  ];

  pythonImportsCheck = [
    "ariadne"
  ];

  pytestFlagsArray = [
    "--snapshot-update"
  ];

  disabledTests = [
    # TypeError: TestClient.request() got an unexpected keyword argument 'content'
    "test_attempt_parse_request_missing_content_type_raises_bad_request_error"
    "test_attempt_parse_non_json_request_raises_bad_request_error"
    "test_attempt_parse_non_json_request_body_raises_bad_request_error"
    # opentracing
    "test_query_is_executed_for_multipart_form_request_with_file"
    "test_query_is_executed_for_multipart_request_with_large_file_with_tracing"
  ];

  disabledTestPaths = [
    # missing graphql-sync-dataloader test dep
    "tests/test_dataloaders.py"
    "tests/wsgi/test_configuration.py"
    # both include opentracing module, which has been removed from nixpkgs
    "tests/tracing/test_opentracing.py"
    "tests/tracing/test_opentelemetry.py"
  ];

  meta = with lib; {
    description = "Python library for implementing GraphQL servers using schema-first approach";
    homepage = "https://ariadnegraphql.org";
    changelog = "https://github.com/mirumee/ariadne/blob/${version}/CHANGELOG.md";
    license = licenses.bsd3;
    maintainers = with maintainers; [ samuela ];
  };
}