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.5.7";
44 pyproject = true;
45
46 src = fetchFromGitHub {
47 owner = "great-expectations";
48 repo = "great_expectations";
49 tag = version;
50 hash = "sha256-pa44metr9KP2KF2ulq7kd84BVdBMvMhsWJeBsJ2AnG0=";
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 pytestCheckHook
90 pytest-mock
91 pytest-order
92 pytest-random-order
93 click
94 flaky
95 freezegun
96 invoke
97 moto
98 psycopg2
99 requirements-parser
100 responses
101 sqlalchemy
102 ]
103 ++ moto.optional-dependencies.s3
104 ++ moto.optional-dependencies.sns;
105
106 disabledTestPaths = [
107 # try to access external URLs:
108 "tests/integration/cloud/rest_contracts"
109 "tests/integration/spark"
110
111 # moto-related import errors:
112 "tests/actions"
113 "tests/data_context"
114 "tests/datasource"
115 "tests/execution_engine"
116
117 # locale-related rendering issues, mostly:
118 "tests/core/test__docs_decorators.py"
119 "tests/expectations/test_expectation_atomic_renderers.py"
120 "tests/render"
121 ];
122
123 disabledTestMarks = [
124 "postgresql"
125 "snowflake"
126 "spark"
127 ];
128
129 disabledTests = [
130 # tries to access network:
131 "test_checkpoint_run_with_data_docs_and_slack_actions_emit_page_links"
132 "test_checkpoint_run_with_slack_action_no_page_links"
133 ];
134
135 pythonImportsCheck = [ "great_expectations" ];
136
137 meta = {
138 broken = true; # 408 tests fail
139 description = "Library for writing unit tests for data validation";
140 homepage = "https://docs.greatexpectations.io";
141 changelog = "https://github.com/great-expectations/great_expectations/releases/tag/${src.tag}";
142 license = lib.licenses.asl20;
143 maintainers = with lib.maintainers; [ bcdarwin ];
144 };
145}