pointblank 0.8.6__py3-none-any.whl → 0.9.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pointblank/_constants.py +11 -10
- pointblank/_interrogation.py +10 -4
- pointblank/_typing.py +19 -3
- pointblank/data/api-docs.txt +716 -49
- pointblank/datascan.py +4 -4
- pointblank/draft.py +1 -1
- pointblank/thresholds.py +10 -0
- pointblank/validate.py +1071 -50
- {pointblank-0.8.6.dist-info → pointblank-0.9.0.dist-info}/METADATA +19 -4
- {pointblank-0.8.6.dist-info → pointblank-0.9.0.dist-info}/RECORD +13 -13
- {pointblank-0.8.6.dist-info → pointblank-0.9.0.dist-info}/WHEEL +1 -1
- {pointblank-0.8.6.dist-info → pointblank-0.9.0.dist-info}/licenses/LICENSE +0 -0
- {pointblank-0.8.6.dist-info → pointblank-0.9.0.dist-info}/top_level.txt +0 -0
pointblank/_constants.py
CHANGED
|
@@ -126,6 +126,7 @@ VALIDATION_REPORT_FIELDS = [
|
|
|
126
126
|
"inclusive",
|
|
127
127
|
"na_pass",
|
|
128
128
|
"pre",
|
|
129
|
+
"segments",
|
|
129
130
|
"thresholds",
|
|
130
131
|
"label",
|
|
131
132
|
"brief",
|
|
@@ -231,9 +232,9 @@ SVG_ICONS_FOR_ASSERTION_TYPES = {
|
|
|
231
232
|
</svg>""",
|
|
232
233
|
"col_vals_eq": """<?xml version="1.0" encoding="UTF-8"?>
|
|
233
234
|
<svg width="67px" height="67px" viewBox="0 0 67 67" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
234
|
-
<title>
|
|
235
|
+
<title>col_vals_eq</title>
|
|
235
236
|
<g id="All-Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
236
|
-
<g id="
|
|
237
|
+
<g id="col_vals_eq" transform="translate(0.000000, 0.275862)">
|
|
237
238
|
<path d="M56.712234,1 C59.1975153,1 61.4475153,2.00735931 63.076195,3.63603897 C64.7048747,5.26471863 65.712234,7.51471863 65.712234,10 L65.712234,10 L65.712234,65 L10.712234,65 C8.22695259,65 5.97695259,63.9926407 4.34827294,62.363961 C2.71959328,60.7352814 1.71223397,58.4852814 1.71223397,56 L1.71223397,56 L1.71223397,10 C1.71223397,7.51471863 2.71959328,5.26471863 4.34827294,3.63603897 C5.97695259,2.00735931 8.22695259,1 10.712234,1 L10.712234,1 Z" id="rectangle" stroke="#000000" stroke-width="2" fill="#FFFFFF"></path>
|
|
238
239
|
<path d="M52.712234,11 L14.712234,11 C13.05989,11 11.712234,12.347656 11.712234,14 L11.712234,52 C11.712234,53.652344 13.05989,55 14.712234,55 L52.712234,55 C54.364578,55 55.712234,53.652344 55.712234,52 L55.712234,14 C55.712234,12.347656 54.364578,11 52.712234,11 Z M46.712234,38 L20.712234,38 L20.712234,36 L46.712234,36 L46.712234,38 Z M46.712234,30 L20.712234,30 L20.712234,28 L46.712234,28 L46.712234,30 Z" id="equals" fill="#000000" fill-rule="nonzero"></path>
|
|
239
240
|
</g>
|
|
@@ -241,9 +242,9 @@ SVG_ICONS_FOR_ASSERTION_TYPES = {
|
|
|
241
242
|
</svg>""",
|
|
242
243
|
"col_vals_ne": """<?xml version="1.0" encoding="UTF-8"?>
|
|
243
244
|
<svg width="67px" height="67px" viewBox="0 0 67 67" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
244
|
-
<title>
|
|
245
|
+
<title>col_vals_ne</title>
|
|
245
246
|
<g id="All-Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
246
|
-
<g id="
|
|
247
|
+
<g id="col_vals_ne" transform="translate(0.000000, 0.758621)">
|
|
247
248
|
<path d="M56.712234,1 C59.1975153,1 61.4475153,2.00735931 63.076195,3.63603897 C64.7048747,5.26471863 65.712234,7.51471863 65.712234,10 L65.712234,10 L65.712234,65 L10.712234,65 C8.22695259,65 5.97695259,63.9926407 4.34827294,62.363961 C2.71959328,60.7352814 1.71223397,58.4852814 1.71223397,56 L1.71223397,56 L1.71223397,10 C1.71223397,7.51471863 2.71959328,5.26471863 4.34827294,3.63603897 C5.97695259,2.00735931 8.22695259,1 10.712234,1 L10.712234,1 Z" id="rectangle" stroke="#000000" stroke-width="2" fill="#FFFFFF"></path>
|
|
248
249
|
<path d="M53.712234,12 L13.712234,12 C13.161453,12 12.712234,12.449219 12.712234,13 L12.712234,53 C12.712234,53.550781 13.161453,54 13.712234,54 L53.712234,54 C54.263015,54 54.712234,53.550781 54.712234,53 L54.712234,13 C54.712234,12.449219 54.263015,12 53.712234,12 Z M46.712234,30 L32.989578,30 L36.805984,36 L46.712234,36 L46.712234,38 L38.079422,38 L43.169265,46 L40.798172,46 L35.708328,38 L20.712234,38 L20.712234,36 L34.43489,36 L30.618484,30 L20.712234,30 L20.712234,28 L29.345047,28 L24.251297,20 L26.62239,20 L31.71614,28 L46.712234,28 L46.712234,30 Z" id="not_equal" fill="#000000" fill-rule="nonzero"></path>
|
|
249
250
|
</g>
|
|
@@ -251,9 +252,9 @@ SVG_ICONS_FOR_ASSERTION_TYPES = {
|
|
|
251
252
|
</svg>""",
|
|
252
253
|
"col_vals_ge": """<?xml version="1.0" encoding="UTF-8"?>
|
|
253
254
|
<svg width="67px" height="67px" viewBox="0 0 67 67" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
254
|
-
<title>
|
|
255
|
+
<title>col_vals_ge</title>
|
|
255
256
|
<g id="All-Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
256
|
-
<g id="
|
|
257
|
+
<g id="col_vals_ge" transform="translate(0.000000, 0.241379)">
|
|
257
258
|
<path d="M56.712234,1 C59.1975153,1 61.4475153,2.00735931 63.076195,3.63603897 C64.7048747,5.26471863 65.712234,7.51471863 65.712234,10 L65.712234,10 L65.712234,65 L10.712234,65 C8.22695259,65 5.97695259,63.9926407 4.34827294,62.363961 C2.71959328,60.7352814 1.71223397,58.4852814 1.71223397,56 L1.71223397,56 L1.71223397,10 C1.71223397,7.51471863 2.71959328,5.26471863 4.34827294,3.63603897 C5.97695259,2.00735931 8.22695259,1 10.712234,1 L10.712234,1 Z" id="rectangle" stroke="#000000" stroke-width="2" fill="#FFFFFF"></path>
|
|
258
259
|
<path d="M49.712234,12 L17.712234,12 C14.952234,12 12.712234,14.24 12.712234,17 L12.712234,49 C12.712234,51.76 14.952234,54 17.712234,54 L49.712234,54 C52.472234,54 54.712234,51.76 54.712234,49 L54.712234,17 C54.712234,14.24 52.472234,12 49.712234,12 Z M44.712234,47 L22.712234,47 L22.712234,45 L44.712234,45 L44.712234,47 Z M24.182234,40.88 L23.242234,39.12 L40.562234,30 L23.242234,20.88 L24.182234,19.12 L44.862234,30 L24.182234,40.88 Z" id="greater_than_equal" fill="#000000" fill-rule="nonzero"></path>
|
|
259
260
|
</g>
|
|
@@ -261,9 +262,9 @@ SVG_ICONS_FOR_ASSERTION_TYPES = {
|
|
|
261
262
|
</svg>""",
|
|
262
263
|
"col_vals_le": """<?xml version="1.0" encoding="UTF-8"?>
|
|
263
264
|
<svg width="67px" height="67px" viewBox="0 0 67 67" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
264
|
-
<title>
|
|
265
|
+
<title>col_vals_le</title>
|
|
265
266
|
<g id="All-Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
266
|
-
<g id="
|
|
267
|
+
<g id="col_vals_le" transform="translate(0.000000, 0.793103)">
|
|
267
268
|
<path d="M56.712234,1 C59.1975153,1 61.4475153,2.00735931 63.076195,3.63603897 C64.7048747,5.26471863 65.712234,7.51471863 65.712234,10 L65.712234,10 L65.712234,65 L10.712234,65 C8.22695259,65 5.97695259,63.9926407 4.34827294,62.363961 C2.71959328,60.7352814 1.71223397,58.4852814 1.71223397,56 L1.71223397,56 L1.71223397,10 C1.71223397,7.51471863 2.71959328,5.26471863 4.34827294,3.63603897 C5.97695259,2.00735931 8.22695259,1 10.712234,1 L10.712234,1 Z" id="rectangle" stroke="#000000" stroke-width="2" fill="#FFFFFF"></path>
|
|
268
269
|
<path d="M53.712234,12 L13.712234,12 C13.157547,12 12.712234,12.449219 12.712234,13 L12.712234,53 C12.712234,53.550781 13.157547,54 13.712234,54 L53.712234,54 C54.266922,54 54.712234,53.550781 54.712234,53 L54.712234,13 C54.712234,12.449219 54.266922,12 53.712234,12 Z M42.227859,19.125 L43.196609,20.875 L26.770828,30 L43.196609,39.125 L42.227859,40.875 L22.65364,30 L42.227859,19.125 Z M44.712234,47 L22.712234,47 L22.712234,45 L44.712234,45 L44.712234,47 Z" id="less_than_equal" fill="#000000" fill-rule="nonzero"></path>
|
|
269
270
|
</g>
|
|
@@ -281,9 +282,9 @@ SVG_ICONS_FOR_ASSERTION_TYPES = {
|
|
|
281
282
|
</svg>""",
|
|
282
283
|
"col_vals_outside": """<?xml version="1.0" encoding="UTF-8"?>
|
|
283
284
|
<svg width="67px" height="67px" viewBox="0 0 67 67" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
284
|
-
<title>
|
|
285
|
+
<title>col_vals_outside</title>
|
|
285
286
|
<g id="All-Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
286
|
-
<g id="
|
|
287
|
+
<g id="col_vals_outside" transform="translate(0.000000, 0.689655)">
|
|
287
288
|
<path d="M56.712234,1 C59.1975153,1 61.4475153,2.00735931 63.076195,3.63603897 C64.7048747,5.26471863 65.712234,7.51471863 65.712234,10 L65.712234,10 L65.712234,65 L10.712234,65 C8.22695259,65 5.97695259,63.9926407 4.34827294,62.363961 C2.71959328,60.7352814 1.71223397,58.4852814 1.71223397,56 L1.71223397,56 L1.71223397,10 C1.71223397,7.51471863 2.71959328,5.26471863 4.34827294,3.63603897 C5.97695259,2.00735931 8.22695259,1 10.712234,1 L10.712234,1 Z" id="rectangle" stroke="#000000" stroke-width="2" fill="#FFFFFF"></path>
|
|
288
289
|
<g id="outside_range" transform="translate(11.000000, 21.000000)" fill="#000000">
|
|
289
290
|
<path d="M12.993484,0.96875 C11.962234,1.082031 11.188797,1.964844 11.212234,3 L11.212234,21 C11.200515,21.722656 11.579422,22.390625 12.204422,22.753906 C12.825515,23.121094 13.598953,23.121094 14.220047,22.753906 C14.845047,22.390625 15.223953,21.722656 15.212234,21 L15.212234,3 C15.220047,2.457031 15.009109,1.9375 14.626297,1.554688 C14.243484,1.171875 13.723953,0.960938 13.180984,0.96875 C13.118484,0.964844 13.055984,0.964844 12.993484,0.96875 Z M32.993484,0.96875 C31.962234,1.082031 31.188797,1.964844 31.212234,3 L31.212234,21 C31.200515,21.722656 31.579422,22.390625 32.204422,22.753906 C32.825515,23.121094 33.598953,23.121094 34.220047,22.753906 C34.845047,22.390625 35.223953,21.722656 35.212234,21 L35.212234,3 C35.220047,2.457031 35.009109,1.9375 34.626297,1.554688 C34.243484,1.171875 33.723953,0.960938 33.180984,0.96875 C33.118484,0.964844 33.055984,0.964844 32.993484,0.96875 Z M17.212234,1 C16.661453,1 16.212234,1.449219 16.212234,2 C16.212234,2.550781 16.661453,3 17.212234,3 C17.763015,3 18.212234,2.550781 18.212234,2 C18.212234,1.449219 17.763015,1 17.212234,1 Z M21.212234,1 C20.661453,1 20.212234,1.449219 20.212234,2 C20.212234,2.550781 20.661453,3 21.212234,3 C21.763015,3 22.212234,2.550781 22.212234,2 C22.212234,1.449219 21.763015,1 21.212234,1 Z M25.212234,1 C24.661453,1 24.212234,1.449219 24.212234,2 C24.212234,2.550781 24.661453,3 25.212234,3 C25.763015,3 26.212234,2.550781 26.212234,2 C26.212234,1.449219 25.763015,1 25.212234,1 Z M29.212234,1 C28.661453,1 28.212234,1.449219 28.212234,2 C28.212234,2.550781 28.661453,3 29.212234,3 C29.763015,3 30.212234,2.550781 30.212234,2 C30.212234,1.449219 29.763015,1 29.212234,1 Z M17.212234,21 C16.661453,21 16.212234,21.449219 16.212234,22 C16.212234,22.550781 16.661453,23 17.212234,23 C17.763015,23 18.212234,22.550781 18.212234,22 C18.212234,21.449219 17.763015,21 17.212234,21 Z M21.212234,21 C20.661453,21 20.212234,21.449219 20.212234,22 C20.212234,22.550781 20.661453,23 21.212234,23 C21.763015,23 22.212234,22.550781 22.212234,22 C22.212234,21.449219 21.763015,21 21.212234,21 Z M25.212234,21 C24.661453,21 24.212234,21.449219 24.212234,22 C24.212234,22.550781 24.661453,23 25.212234,23 C25.763015,23 26.212234,22.550781 26.212234,22 C26.212234,21.449219 25.763015,21 25.212234,21 Z M29.212234,21 C28.661453,21 28.212234,21.449219 28.212234,22 C28.212234,22.550781 28.661453,23 29.212234,23 C29.763015,23 30.212234,22.550781 30.212234,22 C30.212234,21.449219 29.763015,21 29.212234,21 Z" id="small_range" fill-rule="nonzero"></path>
|
pointblank/_interrogation.py
CHANGED
|
@@ -1089,14 +1089,20 @@ class Interrogator:
|
|
|
1089
1089
|
def isin(self) -> FrameT | Any:
|
|
1090
1090
|
# Ibis backends ---------------------------------------------
|
|
1091
1091
|
|
|
1092
|
+
can_be_null: bool = None in self.set
|
|
1093
|
+
|
|
1092
1094
|
if self.tbl_type in IBIS_BACKENDS:
|
|
1093
|
-
|
|
1095
|
+
base_expr = self.x[self.column].isin(self.set)
|
|
1096
|
+
if can_be_null:
|
|
1097
|
+
base_expr = base_expr | self.x[self.column].isnull()
|
|
1098
|
+
return self.x.mutate(pb_is_good_=base_expr)
|
|
1094
1099
|
|
|
1095
1100
|
# Local backends (Narwhals) ---------------------------------
|
|
1101
|
+
base_expr: nw.Expr = nw.col(self.column).is_in(self.set)
|
|
1102
|
+
if can_be_null:
|
|
1103
|
+
base_expr = base_expr | nw.col(self.column).is_null()
|
|
1096
1104
|
|
|
1097
|
-
return self.x.with_columns(
|
|
1098
|
-
pb_is_good_=nw.col(self.column).is_in(self.set),
|
|
1099
|
-
).to_native()
|
|
1105
|
+
return self.x.with_columns(pb_is_good_=base_expr).to_native()
|
|
1100
1106
|
|
|
1101
1107
|
def notin(self) -> FrameT | Any:
|
|
1102
1108
|
# Ibis backends ---------------------------------------------
|
pointblank/_typing.py
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from typing import TypeAlias
|
|
4
|
+
|
|
3
5
|
## Absolute bounds, ie. plus or minus
|
|
4
|
-
|
|
6
|
+
AbsoluteBounds: TypeAlias = tuple[int, int]
|
|
5
7
|
|
|
6
8
|
## Relative bounds, ie. plus or minus some percent
|
|
7
|
-
|
|
9
|
+
RelativeBounds: TypeAlias = tuple[float, float]
|
|
8
10
|
|
|
9
11
|
## Tolerance afforded to some check
|
|
10
|
-
|
|
12
|
+
Tolerance: TypeAlias = int | float | AbsoluteBounds | RelativeBounds
|
|
13
|
+
|
|
14
|
+
## Types for data segmentation
|
|
15
|
+
|
|
16
|
+
## Value(s) that can be used in a segment tuple
|
|
17
|
+
SegmentValue: TypeAlias = str | list[str]
|
|
18
|
+
|
|
19
|
+
## (column, value(s)) format for segments
|
|
20
|
+
SegmentTuple: TypeAlias = tuple[str, SegmentValue]
|
|
21
|
+
|
|
22
|
+
## Individual segment item (string or tuple)
|
|
23
|
+
SegmentItem: TypeAlias = str | SegmentTuple
|
|
24
|
+
|
|
25
|
+
## Full segment specification options
|
|
26
|
+
SegmentSpec: TypeAlias = str | SegmentTuple | list[SegmentItem]
|