pointblank 0.16.0__py3-none-any.whl → 0.18.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/yaml.py CHANGED
@@ -2,15 +2,17 @@ from __future__ import annotations
2
2
 
3
3
  from importlib import import_module
4
4
  from pathlib import Path
5
- from typing import Any, Iterable, Mapping, Optional, Union
5
+ from typing import TYPE_CHECKING, Any, Iterable, Mapping, Optional, Union
6
6
 
7
7
  import yaml
8
- from narwhals.typing import FrameT
9
8
 
10
9
  from pointblank._utils import _is_lib_present
11
10
  from pointblank.thresholds import Actions
12
11
  from pointblank.validate import Validate, load_dataset
13
12
 
13
+ if TYPE_CHECKING:
14
+ from typing import Literal
15
+
14
16
 
15
17
  class YAMLValidationError(Exception):
16
18
  """Exception raised for YAML validation errors."""
@@ -97,8 +99,8 @@ def _safe_eval_python_code(
97
99
  namespaces.items() if isinstance(namespaces, dict) else ((m, m) for m in namespaces)
98
100
  ):
99
101
  try:
100
- safe_namespace[alias] = import_module(module_name)
101
- except ImportError as e:
102
+ safe_namespace[alias] = import_module(str(module_name))
103
+ except ImportError as e: # TODO: This is basically redundant, remove?
102
104
  raise ImportError(
103
105
  f"Could not import requested namespace '{module_name}': {e}"
104
106
  ) from e
@@ -189,11 +191,14 @@ def _process_python_expressions(
189
191
 
190
192
  Examples
191
193
  --------
192
- >>> _process_python_expressions({"python": "pl.scan_csv('data.csv').head(10)"})
193
194
  # Returns the result of the Python expression
195
+ >>> import polars as pl
196
+ >>> expr = _process_python_expressions({"python": "pl.scan_csv('data.csv').head(10)"})
197
+ >>> assert isinstance(expr, pl.LazyFrame)
194
198
 
195
- >>> _process_python_expressions({"python": "import polars as pl\\npl.scan_csv('data.csv')"})
196
199
  # Returns the result of multiline Python code
200
+ >>> expr = _process_python_expressions({"python": "import polars as pl\\npl.scan_csv('data.csv')"})
201
+ >>> assert isinstance(expr, pl.LazyFrame)
197
202
  """
198
203
  if isinstance(value, dict):
199
204
  # Handle python: block syntax
@@ -373,7 +378,9 @@ class YAMLValidator:
373
378
  f"or list of strings/dictionaries"
374
379
  )
375
380
 
376
- def _load_data_source(self, tbl_spec: str, df_library: str = "polars") -> Any:
381
+ def _load_data_source(
382
+ self, tbl_spec: str, df_library: Literal["polars", "pandas", "duckdb"]
383
+ ) -> Any:
377
384
  """Load data source based on table specification.
378
385
 
379
386
  Parameters
@@ -790,7 +797,7 @@ class YAMLValidator:
790
797
 
791
798
  def yaml_interrogate(
792
799
  yaml: Union[str, Path],
793
- set_tbl: Union[FrameT, Any, None] = None,
800
+ set_tbl: Any = None,
794
801
  namespaces: Optional[Union[Iterable[str], Mapping[str, str]]] = None,
795
802
  ) -> Validate:
796
803
  """Execute a YAML-based validation workflow.
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pointblank
3
- Version: 0.16.0
3
+ Version: 0.18.0
4
4
  Summary: Find out if your data is what you think it is.
5
5
  Author-email: Richard Iannone <riannone@me.com>
6
6
  License: MIT License
7
7
 
8
- Copyright (c) 2024-2025 Posit Software, PBC
8
+ Copyright (c) 2024-2026 Posit Software, PBC
9
9
 
10
10
  Permission is hereby granted, free of charge, to any person obtaining a copy
11
11
  of this software and associated documentation files (the "Software"), to deal
@@ -95,6 +95,11 @@ Requires-Dist: openpyxl>=3.0.0; extra == "docs"
95
95
  Requires-Dist: duckdb<1.3.3,>=1.2.0; extra == "docs"
96
96
  Dynamic: license-file
97
97
 
98
+ > [!TIP]
99
+ > **📺 Featured Talk: ['Making Things Nice in Python'](https://www.youtube.com/watch?v=J6e2BKjHyPg)**
100
+ >
101
+ > Discover how Pointblank and Great Tables (used in this library) prioritize user experience in Python package design. I go over why convenient options, extensive documentation, and thoughtful API decisions is better for everyone (even when they challenge conventional Python patterns/practices).
102
+
98
103
  <div align="center">
99
104
 
100
105
  <a href="https://posit-dev.github.io/pointblank/"><img src="https://posit-dev.github.io/pointblank/assets/pointblank_logo.svg" width="85%"/></a>
@@ -1,30 +1,32 @@
1
- pointblank/__init__.py,sha256=SCEdSoGrPcyYblchEPOr41cThlidQL6ecd3byLhkJ5E,1998
2
- pointblank/_constants.py,sha256=fqaSIY5s9dBmXkB12_C6-o4Z5dYyN-KXoAzzK38Fl38,98317
3
- pointblank/_constants_translations.py,sha256=0D-X2sI0OqdlXrLxOA4WmAe_I315jJQDfeopBDRZkTg,323720
4
- pointblank/_datascan_utils.py,sha256=EMfeabXm_ZsCUKPROB7rFhyOpjtRs8jcnZ_9nBtMyws,1750
5
- pointblank/_interrogation.py,sha256=kqsklOOhWmI246NA5iwZm-Bn1SVuSo7q5TgwFoFGID8,114359
1
+ pointblank/__init__.py,sha256=s_Buf1aFhzVBphyN6AMIwo4_dY1sV8uxuMbhAigRZ_4,2018
2
+ pointblank/_agg.py,sha256=bFasHZR0qzR7W-3Xu9k6INe0xaIuO92X19zy3GBFPQM,3126
3
+ pointblank/_constants.py,sha256=ZZ6v9dIxiDT0_2eRvMqMl4k0CTIQZn_7bzjmwSglp5k,130320
4
+ pointblank/_constants_translations.py,sha256=OjQV3gusKXdTuS3TeAHmhMf4Yxq67fWBnZs0EDtgNWI,407157
5
+ pointblank/_datascan_utils.py,sha256=eVqTBMLHt1cYYfKIvHRyRdX4Iarl3LKMqgn6ZqHf1kY,2439
6
+ pointblank/_interrogation.py,sha256=_AE3jgelasCXBhEkJUYsVwGCqwactsTA_GIxytV5kjc,118777
6
7
  pointblank/_spec_utils.py,sha256=rOSbv0BTS4gbLk241R3VDgKXEHBED_WNimQiit5JkvI,28395
7
- pointblank/_typing.py,sha256=cLF2D7UeqHR2J3WDebkWav6U4pA45zFYJxW-DWLga0E,1973
8
- pointblank/_utils.py,sha256=5gQmQaunjsqs5_0PsTIiknnj_Y8uW8NydaDslmpXfSk,19483
9
- pointblank/_utils_ai.py,sha256=-Eamr6vwDxhQbnB99zfumnfxbB552UUwXfXfCVkR2nM,31125
10
- pointblank/_utils_check_args.py,sha256=rFEc1nbCN8ftsQQWVjCNWmQ2QmUDxkfgmoJclrZeTLs,5489
8
+ pointblank/_typing.py,sha256=SSRRGFtogWkrxeI5iaDgeJ3cu489XI7MasrEoznwLqY,2631
9
+ pointblank/_utils.py,sha256=lGpFAMr-sHdhoq9sizx_LVbnIeAN6on4BkQLM_UeJu8,21053
10
+ pointblank/_utils_ai.py,sha256=aMHagZaO3UDiYxzKG_PHoaU25r9_0E2TwCDoUu7v5xY,31115
11
+ pointblank/_utils_check_args.py,sha256=REEyTcTyWV1W0TevYt3S7OmQeN_DHDtaYnwLDFy5fSc,5544
11
12
  pointblank/_utils_html.py,sha256=uJWvS9JwQVEZgwsGmScA_u_EBRND75rzUvnJPalbRVs,3731
12
- pointblank/_utils_llms_txt.py,sha256=XYYmUcFIpDrI2C06jeo6MEPxQlZTF6vnVk3tJcXeBEQ,22533
13
- pointblank/actions.py,sha256=D6o9B2_ES9PNQg9HZwREacrrt-3A5bhdrBkL1UXz__s,18281
14
- pointblank/assistant.py,sha256=BcbZIz-ooFSOPOVZg3JtBhWeT8MIH8OPLes5yC8DSzI,15895
15
- pointblank/cli.py,sha256=hRVPdjU4dxZZ4XdWN2A7OEnsvWB15dXFPn-Chhi7tNs,229394
16
- pointblank/column.py,sha256=k46yxEzoQZhYmZD1cOy1lDUHPTk3D1lC4Ye3yJ535FM,78617
13
+ pointblank/_utils_llms_txt.py,sha256=8Fl_Pz9aFgldw-z0qty2VIKgUoZA8hNU-OEO27Djxic,24067
14
+ pointblank/actions.py,sha256=T_zgL4JaqQy7rowXsdtlfxfH9rz9g7m91n_wXR2wMk8,18288
15
+ pointblank/assistant.py,sha256=JnxHb_t8K7trLn14RjMQE3djc8pxFIgaPTPwpGMxXOc,15878
16
+ pointblank/cli.py,sha256=f0wIr2vfRVLEyW5f5X72fp2CeOpRNDqK76N5mUpSFT4,229401
17
+ pointblank/column.py,sha256=up72dauY4T2VxofSAFXAMqqoPRsI5Jb767mh_iS7nuM,83206
17
18
  pointblank/compare.py,sha256=kFd18CehHz7g-2MF1kSmJSdOoAP80q_9PaF6QzHC1ds,866
18
- pointblank/datascan.py,sha256=xFhpcoLD16mJH_yhMm0NbCa5VUk5cz3iazn5RfNXlao,24710
19
- pointblank/draft.py,sha256=j6uATRE3zVtBSiDj1G5JtwVdcjaIUzoCCPqiLuRSmV0,17817
20
- pointblank/scan_profile.py,sha256=Zy-qyqggod0mP1PcES6qTxIaENkxT-FTNM8LWFVhRD0,10546
19
+ pointblank/datascan.py,sha256=wkRVZwSAwKxYUAVFjkpFXAxaHBrnGxGN6bRxhY6VLrs,24654
20
+ pointblank/draft.py,sha256=6mjttdw49FF4yF1ViiFTQyJ7Opj9CTLWOYXnOZT0lqI,17807
21
+ pointblank/scan_profile.py,sha256=jFuiSPLyC20lE6_tBMtxqr5SKKYvBV0Y_NqhCbh_-bk,10611
21
22
  pointblank/scan_profile_stats.py,sha256=qdzoGXB-zi2hmpA4mTz6LLTqMnb-NRG9ndxU9cxS72w,4461
22
- pointblank/schema.py,sha256=yir-2VNmHyNdH1vGpx3adqOXdvspJlMKhJmJQz4egqU,48794
23
+ pointblank/schema.py,sha256=u-oP8ofsNz5oF0sbONuLtDsyyij3OmUqQhIgi8RDcg4,50513
23
24
  pointblank/segments.py,sha256=RXp3lPr3FboVseadNqLgIeoMBh_mykrQSFp1WtV41Yg,5570
24
- pointblank/thresholds.py,sha256=KhvCCB_rlUHq1RjZ6SxXZLVrolOn_D2Ppxb0ABnwCRw,25764
25
- pointblank/validate.py,sha256=wyMCIu5SBcucaXjMR624FPiLikQpGix1zQnGufVGO9g,843129
26
- pointblank/yaml.py,sha256=X6EKI6V7SofNXoorEwWwpyl-Ow5Rta_Q0s3Mh2jxkAY,63300
27
- pointblank/data/api-docs.txt,sha256=MaBDaQoKxxT-MSPs9ok0zkQZ4wWjgGe7FwXvqFnTB0g,611101
25
+ pointblank/thresholds.py,sha256=_6xyPlh7FlEHZ2dPi8_CidrP9A3GS9UVlvC_KFYUDng,25985
26
+ pointblank/validate.py,sha256=x5k2S1VmFrJC-bin6mE3zK7roLZn11qnaWzNV1q0E20,919646
27
+ pointblank/validate.pyi,sha256=KJm4XH9qyKAfed7-3dM0kvELS3CS2AUQv0CU2XlekpA,46528
28
+ pointblank/yaml.py,sha256=4kW4Qx2MOLYNMb8TIakTX1hhSKgGmWx_3jWHabbxcVE,63531
29
+ pointblank/data/api-docs.txt,sha256=FWa7O-KzSDJ9PN5BtqOTPQd1c2wOv7L8Nk8xzdiQt1Y,740921
28
30
  pointblank/data/game_revenue-duckdb.zip,sha256=tKIVx48OGLYGsQPS3h5AjA2Nyq_rfEpLCjBiFUWhagU,35880
29
31
  pointblank/data/game_revenue.zip,sha256=7c9EvHLyi93CHUd4p3dM4CZ-GucFCtXKSPxgLojL32U,33749
30
32
  pointblank/data/global_sales-duckdb.zip,sha256=2ok_cvJ1ZuSkXnw0R6_OkKYRTWhJ-jJEMq2VYsv5fqY,1336390
@@ -49,9 +51,9 @@ pointblank/data/validations/pandas_compatible.pkl,sha256=-85iBWKH_SYu8oq1752pAMK
49
51
  pointblank/data/validations/preprocessing_functions.py,sha256=DudTuQVGzEnZb0UYBaPou08ad3dmdxfcOZuPMkdM6A0,1422
50
52
  pointblank/data/validations/simple_preprocessing.json,sha256=2aBnY2fmrIwlIbEprzqxYoZtsJbQ8o0VBjnuDo_dTqo,1546
51
53
  pointblank/data/validations/simple_preprocessing.pkl,sha256=Arp9DHWbZVYbaLR7Xg-poZyvOgplYaqAQoWD1DohiZw,6785
52
- pointblank-0.16.0.dist-info/licenses/LICENSE,sha256=apLF-HWPNU7pT5bmf5KmZpD5Cklpy2u-BN_0xBoRMLY,1081
53
- pointblank-0.16.0.dist-info/METADATA,sha256=2RfE1gZGougi3rPBkYhJz3efiOMrmIdOXqOfVd80Z2I,22372
54
- pointblank-0.16.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
55
- pointblank-0.16.0.dist-info/entry_points.txt,sha256=GqqqOTOH8uZe22wLcvYjzpizqk_j4MNcUo2YM14ryCw,42
56
- pointblank-0.16.0.dist-info/top_level.txt,sha256=-wHrS1SvV8-nhvc3w-PPYs1C1WtEc1pK-eGjubbCCKc,11
57
- pointblank-0.16.0.dist-info/RECORD,,
54
+ pointblank-0.18.0.dist-info/licenses/LICENSE,sha256=RQQDYcgcpRTMFisFBpL_gyU0zf_h6Xi04DPQEa98JtE,1081
55
+ pointblank-0.18.0.dist-info/METADATA,sha256=crY27aB0HfED6URzFFCi7n0wnPOubVekap1irH1VSqI,22785
56
+ pointblank-0.18.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
+ pointblank-0.18.0.dist-info/entry_points.txt,sha256=GqqqOTOH8uZe22wLcvYjzpizqk_j4MNcUo2YM14ryCw,42
58
+ pointblank-0.18.0.dist-info/top_level.txt,sha256=-wHrS1SvV8-nhvc3w-PPYs1C1WtEc1pK-eGjubbCCKc,11
59
+ pointblank-0.18.0.dist-info/RECORD,,
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024-2025 Posit Software, PBC
3
+ Copyright (c) 2024-2026 Posit Software, PBC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal