lightweight-table-diff 0.1.3__tar.gz → 0.1.4__tar.gz

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.
Files changed (21) hide show
  1. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/PKG-INFO +1 -1
  2. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/pyproject.toml +1 -1
  3. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/core.py +2 -2
  4. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/runner.py +5 -5
  5. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff.egg-info/PKG-INFO +1 -1
  6. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/README.md +0 -0
  7. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/setup.cfg +0 -0
  8. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/__init__.py +0 -0
  9. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/__main__.py +0 -0
  10. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/adapters/__init__.py +0 -0
  11. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/adapters/csv.py +0 -0
  12. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/adapters/hive_s3.py +0 -0
  13. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/adapters/parquet.py +0 -0
  14. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/adapters/sav.py +0 -0
  15. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/config.py +0 -0
  16. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/dimensions.py +0 -0
  17. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff/normalisers.py +0 -0
  18. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff.egg-info/SOURCES.txt +0 -0
  19. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff.egg-info/dependency_links.txt +0 -0
  20. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff.egg-info/requires.txt +0 -0
  21. {lightweight_table_diff-0.1.3 → lightweight_table_diff-0.1.4}/src/lightweight_table_diff.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lightweight-table-diff
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Cell-level table diffing for Polars
5
5
  Requires-Python: >=3.11.1
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "lightweight-table-diff"
7
- version = "0.1.3"
7
+ version = "0.1.4"
8
8
  description = "Cell-level table diffing for Polars"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11.1"
@@ -36,8 +36,8 @@ def diff_tbls(
36
36
  pl.when(~pl.col(f"b__{c}").eq_missing(pl.col(f"a__{c}")))
37
37
  .then(
38
38
  pl.struct(
39
- pl.col(f"b__{c}").alias("before_val"),
40
- pl.col(f"a__{c}").alias("after_val"),
39
+ pl.col(f"b__{c}").cast(pl.String).alias("before_val"),
40
+ pl.col(f"a__{c}").cast(pl.String).alias("after_val"),
41
41
  )
42
42
  )
43
43
  .otherwise(None)
@@ -32,14 +32,14 @@ class ComparisonResult:
32
32
  added_cols: list[str]
33
33
 
34
34
 
35
- def run_comparison(job: dict, **context) -> ComparisonResult:
35
+ def run_comparison(job: dict, **kwargs) -> ComparisonResult:
36
36
  job = copy.deepcopy(job)
37
37
  name = job.get("name", "unnamed")
38
38
  keys = job["join_keys"]
39
39
  logger.info("Running comparison: %s", name)
40
40
 
41
- before = adapters.load(job["before"], **context)
42
- after = adapters.load(job["after"], **context)
41
+ before = adapters.load(job["before"], **kwargs)
42
+ after = adapters.load(job["after"], **kwargs)
43
43
 
44
44
  removed_cols, added_cols = column_indels(before, after, keys)
45
45
  if removed_cols:
@@ -137,11 +137,11 @@ def write_results(result: ComparisonResult, output_dir: str | Path) -> None:
137
137
  logger.info(" Wrote %s", summary_path)
138
138
 
139
139
 
140
- def run_config(config_path: str | Path, **context) -> list[ComparisonResult]:
140
+ def run_config(config_path: str | Path, **kwargs) -> list[ComparisonResult]:
141
141
  jobs = load_config(config_path)
142
142
  results: list[ComparisonResult] = []
143
143
  for job in jobs:
144
- result = run_comparison(job, **context)
144
+ result = run_comparison(job, **kwargs)
145
145
  write_results(result, job.get("output_dir", "./diff_output"))
146
146
  results.append(result)
147
147
  return results
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lightweight-table-diff
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Cell-level table diffing for Polars
5
5
  Requires-Python: >=3.11.1
6
6
  Description-Content-Type: text/markdown