Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
python-version: ["3.9", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"

Expand All @@ -24,17 +24,17 @@ jobs:
run: python -m build

- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: dist
path: dist/

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"

Expand All @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
environment: pypi
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
name: dist
path: dist/
Expand Down
2 changes: 2 additions & 0 deletions data_hygiene_auditor/core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Core audit orchestrator and data loading."""

from __future__ import annotations

import os
from datetime import datetime
from pathlib import Path
Expand Down
6 changes: 2 additions & 4 deletions data_hygiene_auditor/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ def evaluate_rule(rule: Rule, series: pd.Series, col_name: str) -> Optional[Dict
return None

if rule.condition == 'regex_match':
pattern = re.compile(rule.threshold)
violations = non_empty[~non_empty.str.fullmatch(pattern, na=False)]
violations = non_empty[~non_empty.str.fullmatch(rule.threshold, na=False)]
if len(violations) == 0:
return None
examples = violations.head(5).tolist()
Expand All @@ -212,8 +211,7 @@ def evaluate_rule(rule: Rule, series: pd.Series, col_name: str) -> Optional[Dict
}

if rule.condition == 'not_regex_match':
pattern = re.compile(rule.threshold)
violations = non_empty[non_empty.str.fullmatch(pattern, na=False)]
violations = non_empty[non_empty.str.fullmatch(rule.threshold, na=False)]
if len(violations) == 0:
return None
examples = violations.head(5).tolist()
Expand Down