1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 altair,
7 cryptography,
8 jinja2,
9 jsonschema,
10 marshmallow,
11 mistune,
12 numpy,
13 packaging,
14 pandas,
15 posthog,
16 pydantic,
17 pyparsing,
18 python-dateutil,
19 requests,
20 ruamel-yaml,
21 scipy,
22 tqdm,
23 tzlocal,
24
25 # test
26 pytestCheckHook,
27 pytest-mock,
28 pytest-order,
29 pytest-random-order,
30 click,
31 flaky,
32 freezegun,
33 invoke,
34 moto,
35 psycopg2,
36 requirements-parser,
37 responses,
38 sqlalchemy,
39}:
40
41buildPythonPackage rec {
42 pname = "great-expectations";
43 version = "1.3.2";
44 pyproject = true;
45
46 src = fetchFromGitHub {
47 owner = "great-expectations";
48 repo = "great_expectations";
49 tag = version;
50 hash = "sha256-MV6T8PyOyAQ2SfT8B38YdCtqj6oeZCW+z08koBR739A=";
51 };
52
53 postPatch = ''
54 substituteInPlace tests/conftest.py --replace 'locale.setlocale(locale.LC_ALL, "en_US.UTF-8")' ""
55 substituteInPlace pyproject.toml \
56 --replace-fail '"ignore::marshmallow.warnings.ChangedInMarshmallow4Warning",' ""
57 '';
58
59 build-system = [ setuptools ];
60
61 dependencies = [
62 altair
63 cryptography
64 jinja2
65 jsonschema
66 marshmallow
67 mistune
68 numpy
69 packaging
70 pandas
71 posthog
72 pydantic
73 pyparsing
74 python-dateutil
75 requests
76 ruamel-yaml
77 scipy
78 tqdm
79 tzlocal
80 ];
81
82 pythonRelaxDeps = [
83 "altair"
84 "pandas"
85 "posthog"
86 ];
87
88 nativeCheckInputs =
89 [
90 pytestCheckHook
91 pytest-mock
92 pytest-order
93 pytest-random-order
94 click
95 flaky
96 freezegun
97 invoke
98 moto
99 psycopg2
100 requirements-parser
101 responses
102 sqlalchemy
103 ]
104 ++ moto.optional-dependencies.s3
105 ++ moto.optional-dependencies.sns;
106
107 disabledTestPaths = [
108 # try to access external URLs:
109 "tests/integration/cloud/rest_contracts"
110 "tests/integration/spark"
111
112 # moto-related import errors:
113 "tests/actions"
114 "tests/data_context"
115 "tests/datasource"
116 "tests/execution_engine"
117
118 # locale-related rendering issues, mostly:
119 "tests/core/test__docs_decorators.py"
120 "tests/expectations/test_expectation_atomic_renderers.py"
121 "tests/render"
122 ];
123
124 disabledTests = [
125 # tries to access network:
126 "test_checkpoint_run_with_data_docs_and_slack_actions_emit_page_links"
127 "test_checkpoint_run_with_slack_action_no_page_links"
128 ];
129
130 pythonImportsCheck = [ "great_expectations" ];
131 pytestFlagsArray = [ "-m 'not spark and not postgresql and not snowflake'" ];
132
133 meta = {
134 broken = true; # 408 tests fail
135 description = "Library for writing unit tests for data validation";
136 homepage = "https://docs.greatexpectations.io";
137 changelog = "https://github.com/great-expectations/great_expectations/releases/tag/${src.tag}";
138 license = lib.licenses.asl20;
139 maintainers = with lib.maintainers; [ bcdarwin ];
140 };
141}