-
Notifications
You must be signed in to change notification settings - Fork 36
/
pyproject.toml
212 lines (186 loc) · 5.06 KB
/
pyproject.toml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "popmon"
description = "Monitor the stability of a pandas or spark dataset"
keywords = [
"pandas",
"spark",
"data-science",
"data-analysis",
"monitoring",
"statistics",
"python",
"jupyter",
"ipython"
]
readme = "README.rst"
requires-python = ">=3.7"
authors = [{name = "ING Analytics Wholesale Banking", email = "[email protected]"}]
license = {type = "MIT", file = "LICENSE"}
dependencies = [
"numpy>=1.18.0",
"pandas>=0.25.1,<2",
"scipy>=1.5.2",
"histogrammar>=1.0.32",
"phik",
"jinja2",
"tqdm",
"plotly>=5.8.0",
"joblib>=0.14.0",
"htmlmin",
"pydantic>=2",
"pydantic-settings",
"typing_extensions"
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dynamic = ["version"]
[project.optional-dependencies]
test = [
"pytest>=4.0.2",
"pytest-notebook>=0.6.1",
"jupyter_client>=5.2.3",
"ipykernel>=5.1.3",
"pre-commit>=2.9.0"
]
diptest = [
"diptest"
]
# files to be shipped with the installation, under: popmon/popmon/
# after installation, these can be found with the functions in resources.py
[tool.setuptools.package-data]
popmon = [
"visualization/templates/*.html",
"visualization/templates/assets/css/*.css",
"visualization/templates/assets/js/*.js",
"test_data/*.csv.gz",
"test_data/*.json*",
"notebooks/popmon*tutorial*.ipynb"
]
[project.urls]
repository = "https://github.com/ing-bank/popmon"
[project.scripts]
popmon_run = "popmon.pipeline.amazing_pipeline:run"
[tool.ruff]
target-version = "py37"
line-length = 120
namespace-packages = ["popmon"]
select = ["ALL", "CPY001"]
ignore = [
# COM812 is incompatible with COM819
"COM",
# Not sure if these are helpful
"EM",
"FBT",
"S301",
# Manual check/fix needed
"ERA",
"S101",
"ANN",
"TCH",
"SLF001",
"PLR2004",
"BLE001",
"D",
"PLR0915",
"PLR0911",
"N802",
"C901",
"PD901",
"PLC1901",
"PLR0912",
"PLR0913",
"TRY003",
"E501",
"DTZ",
"PERF203", # `try`-`except` within a loop incurs performance overhead
# False positive
"PERF401", # Use a list comprehension to create a transformed list
# Prefer autofix
"PD011", # .to_numpy() instead of values
"PD003", # `.isna` is preferred to `.isnull`; functionality is equivalent
"PT018", # Assertion should be broken down into multiple parts
"RET504", # Unnecessary variable assignment before `return` statement
"RET506", # Unnecessary `else` after `raise` statement
"PTH123", # `open("foo")` should be replaced by `Path("foo").open()`
"PTH120", # similar to above
"RET505", # Unnecessary `else` after `return` statement
"SIM102", # (when comments are in the statement) Use a single `if` statement instead of nested `if` statements
"SIM114", # (when comments are in the statement) Combine `if` branches using logical `or` operator
"PD010", # `.pivot_table` is preferred to `.pivot` or `.unstack`; provides same functionality
"PD013", # `.melt` is preferred to `.stack`; provides same functionality
"G004", # Logging statement uses f-string
"B028", # No explicit `stacklevel` keyword argument found
]
[tool.ruff.per-file-ignores]
# Allow these outside of the package
"{tests,docs,tools}/*" = [
# Asserts
"S101",
# magical constants
"PLR2004",
# non-PEP8 naming
"N",
"E741",
# implicit namespaces
"INP001",
# broad exceptions
"PT011",
# Too many statements
"PLR0915",
# Copyright
"CPY001",
]
# Sphinx config
"docs/source/conf.py" = ["A001", "ARG001"]
# Example
"examples/*" = [
# Print statement
"T201",
# implicit namespaces
"INP001",
# Copyright
"CPY001",
]
"popmon/config.py" = [
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`,
"FA100", # Missing `from __future__ import annotations`
]
# Notebooks & NBQA
"popmon/notebooks/*" = [
# Imports cannot be checked properly with NBQA
# (It splits each cell into a .py file)
"INP001", "E401", "E402", "F401", "I001",
# Allow print statements
"T201",
# Ignore magic value in comparison for now
"PLR2004",
# Found useless expression. Either assign it to a variable or remove it.
"B018",
# Copyright
"CPY001",
]
[tool.ruff.flake8-copyright]
notice-rgx = """(?mis)Copyright \\(c\\) 2023 ING Analytics Wholesale Banking.+"""
[tool.pytest.ini_options]
markers = ["spark"]
#filterwarnings = ["error"]
[tool.pytest.ini_options.spark_options]
"spark.executor.id" = "driver"
"spark.app.name" = "PySparkShell"
"spark.executor.instances" = 1
"master" = "local[*]"
"spark.driver.host" = "192.168.1.78"
"spark.sql.catalogImplementation" = "in-memory"
[tool.semantic_release]
version_variable = [
"popmon/version.py:version",
]
build_command = "pip install build && python -m build"
[tool.setuptools.dynamic]
version = {attr = "popmon.version.version"}