qualis 0.3.1__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.
- qualis-0.3.1/.github/workflows/ci.yml +44 -0
- qualis-0.3.1/.github/workflows/dq-check.yml.example +21 -0
- qualis-0.3.1/.github/workflows/release.yml +60 -0
- qualis-0.3.1/.gitignore +79 -0
- qualis-0.3.1/.python-version +1 -0
- qualis-0.3.1/CHANGELOG.md +106 -0
- qualis-0.3.1/CONTRIBUTING.md +55 -0
- qualis-0.3.1/LICENSE +176 -0
- qualis-0.3.1/PKG-INFO +38 -0
- qualis-0.3.1/README.md +117 -0
- qualis-0.3.1/SECURITY.md +30 -0
- qualis-0.3.1/action.yml +81 -0
- qualis-0.3.1/docs/github-action.md +62 -0
- qualis-0.3.1/docs/release.md +44 -0
- qualis-0.3.1/examples/traffic_safety/README.md +49 -0
- qualis-0.3.1/examples/traffic_safety/data/accidents.csv +12 -0
- qualis-0.3.1/examples/traffic_safety/rules/completeness.yaml +22 -0
- qualis-0.3.1/examples/traffic_safety/rules/uniqueness.yaml +8 -0
- qualis-0.3.1/examples/traffic_safety/rules/validity.yaml +20 -0
- qualis-0.3.1/pyproject.toml +105 -0
- qualis-0.3.1/src/qualis/__init__.py +22 -0
- qualis-0.3.1/src/qualis/adapters/__init__.py +0 -0
- qualis-0.3.1/src/qualis/adapters/console.py +144 -0
- qualis-0.3.1/src/qualis/adapters/duckdb/__init__.py +0 -0
- qualis-0.3.1/src/qualis/adapters/duckdb/adapter.py +208 -0
- qualis-0.3.1/src/qualis/adapters/duckdb/sql_templates.py +77 -0
- qualis-0.3.1/src/qualis/adapters/in_memory/__init__.py +0 -0
- qualis-0.3.1/src/qualis/adapters/in_memory/adapter.py +146 -0
- qualis-0.3.1/src/qualis/adapters/in_memory/reference_data.py +25 -0
- qualis-0.3.1/src/qualis/adapters/postgres/__init__.py +0 -0
- qualis-0.3.1/src/qualis/adapters/postgres/adapter.py +256 -0
- qualis-0.3.1/src/qualis/adapters/postgres/sql_templates.py +84 -0
- qualis-0.3.1/src/qualis/bootstrap.py +51 -0
- qualis-0.3.1/src/qualis/cli/__init__.py +1 -0
- qualis-0.3.1/src/qualis/cli/main.py +619 -0
- qualis-0.3.1/src/qualis/cli/review_cmd.py +58 -0
- qualis-0.3.1/src/qualis/config/__init__.py +0 -0
- qualis-0.3.1/src/qualis/config/context_loader.py +69 -0
- qualis-0.3.1/src/qualis/config/loader.py +193 -0
- qualis-0.3.1/src/qualis/config/settings.py +20 -0
- qualis-0.3.1/src/qualis/config/standards.py +39 -0
- qualis-0.3.1/src/qualis/discover/__init__.py +0 -0
- qualis-0.3.1/src/qualis/discover/evidence_builder.py +32 -0
- qualis-0.3.1/src/qualis/discover/profiler.py +152 -0
- qualis-0.3.1/src/qualis/discover/suggester.py +252 -0
- qualis-0.3.1/src/qualis/discover/writer.py +83 -0
- qualis-0.3.1/src/qualis/domain/__init__.py +0 -0
- qualis-0.3.1/src/qualis/domain/checks.py +10 -0
- qualis-0.3.1/src/qualis/domain/context.py +72 -0
- qualis-0.3.1/src/qualis/domain/enums.py +65 -0
- qualis-0.3.1/src/qualis/domain/evidence.py +50 -0
- qualis-0.3.1/src/qualis/domain/models.py +72 -0
- qualis-0.3.1/src/qualis/domain/params.py +78 -0
- qualis-0.3.1/src/qualis/domain/rule_engine.py +312 -0
- qualis-0.3.1/src/qualis/domain/scoring.py +88 -0
- qualis-0.3.1/src/qualis/domain/standards.py +47 -0
- qualis-0.3.1/src/qualis/engine/__init__.py +0 -0
- qualis-0.3.1/src/qualis/engine/checker.py +85 -0
- qualis-0.3.1/src/qualis/engine/diff.py +96 -0
- qualis-0.3.1/src/qualis/github/__init__.py +7 -0
- qualis-0.3.1/src/qualis/github/__main__.py +32 -0
- qualis-0.3.1/src/qualis/github/comment.py +76 -0
- qualis-0.3.1/src/qualis/ports/__init__.py +0 -0
- qualis-0.3.1/src/qualis/ports/database.py +72 -0
- qualis-0.3.1/src/qualis/ports/notifier.py +10 -0
- qualis-0.3.1/src/qualis/ports/reference_data.py +22 -0
- qualis-0.3.1/src/qualis/py.typed +0 -0
- qualis-0.3.1/src/qualis/report/__init__.py +0 -0
- qualis-0.3.1/src/qualis/report/loader.py +55 -0
- qualis-0.3.1/src/qualis/report/scorecard.py +166 -0
- qualis-0.3.1/src/qualis/report/template.html.j2 +327 -0
- qualis-0.3.1/src/qualis/review/__init__.py +0 -0
- qualis-0.3.1/src/qualis/review/state_machine.py +81 -0
- qualis-0.3.1/tests/__init__.py +0 -0
- qualis-0.3.1/tests/conftest.py +0 -0
- qualis-0.3.1/tests/fixtures/context/example_context.yaml +11 -0
- qualis-0.3.1/tests/fixtures/data/accidents.csv +7 -0
- qualis-0.3.1/tests/fixtures/rules/completeness.yaml +19 -0
- qualis-0.3.1/tests/integration/__init__.py +0 -0
- qualis-0.3.1/tests/integration/test_end_to_end.py +421 -0
- qualis-0.3.1/tests/unit/__init__.py +0 -0
- qualis-0.3.1/tests/unit/adapters/__init__.py +0 -0
- qualis-0.3.1/tests/unit/adapters/test_duckdb.py +119 -0
- qualis-0.3.1/tests/unit/adapters/test_in_memory.py +226 -0
- qualis-0.3.1/tests/unit/adapters/test_in_memory_reference_data.py +25 -0
- qualis-0.3.1/tests/unit/adapters/test_postgres.py +228 -0
- qualis-0.3.1/tests/unit/config/__init__.py +0 -0
- qualis-0.3.1/tests/unit/config/test_context_loader.py +71 -0
- qualis-0.3.1/tests/unit/config/test_loader.py +223 -0
- qualis-0.3.1/tests/unit/config/test_settings.py +53 -0
- qualis-0.3.1/tests/unit/config/test_standards.py +85 -0
- qualis-0.3.1/tests/unit/discover/__init__.py +0 -0
- qualis-0.3.1/tests/unit/discover/test_evidence_builder.py +50 -0
- qualis-0.3.1/tests/unit/discover/test_profiler.py +61 -0
- qualis-0.3.1/tests/unit/discover/test_suggester.py +268 -0
- qualis-0.3.1/tests/unit/discover/test_writer.py +146 -0
- qualis-0.3.1/tests/unit/domain/__init__.py +0 -0
- qualis-0.3.1/tests/unit/domain/test_context.py +93 -0
- qualis-0.3.1/tests/unit/domain/test_enums.py +209 -0
- qualis-0.3.1/tests/unit/domain/test_evidence.py +71 -0
- qualis-0.3.1/tests/unit/domain/test_models.py +384 -0
- qualis-0.3.1/tests/unit/domain/test_params.py +272 -0
- qualis-0.3.1/tests/unit/domain/test_rule_engine.py +280 -0
- qualis-0.3.1/tests/unit/domain/test_scoring.py +186 -0
- qualis-0.3.1/tests/unit/domain/test_standards.py +60 -0
- qualis-0.3.1/tests/unit/engine/__init__.py +0 -0
- qualis-0.3.1/tests/unit/engine/test_checker.py +75 -0
- qualis-0.3.1/tests/unit/engine/test_diff.py +95 -0
- qualis-0.3.1/tests/unit/github/__init__.py +0 -0
- qualis-0.3.1/tests/unit/github/test_comment.py +111 -0
- qualis-0.3.1/tests/unit/report/__init__.py +0 -0
- qualis-0.3.1/tests/unit/report/test_loader.py +65 -0
- qualis-0.3.1/tests/unit/report/test_scorecard.py +288 -0
- qualis-0.3.1/tests/unit/review/__init__.py +0 -0
- qualis-0.3.1/tests/unit/review/test_state_machine.py +80 -0
- qualis-0.3.1/uv.lock +865 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: test (Python ${{ matrix.python-version }})
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.12", "3.13"]
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Set up uv
|
|
24
|
+
uses: astral-sh/setup-uv@v3
|
|
25
|
+
with:
|
|
26
|
+
enable-cache: true
|
|
27
|
+
|
|
28
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
29
|
+
run: uv python install ${{ matrix.python-version }}
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: uv sync --all-extras --dev
|
|
33
|
+
|
|
34
|
+
- name: Lint with ruff
|
|
35
|
+
run: uv run ruff check src/ tests/
|
|
36
|
+
|
|
37
|
+
- name: Typecheck with mypy
|
|
38
|
+
run: uv run mypy src/
|
|
39
|
+
|
|
40
|
+
- name: Run tests
|
|
41
|
+
run: uv run pytest --cov=qualis --cov-report=term-missing
|
|
42
|
+
|
|
43
|
+
- name: Enforce coverage threshold
|
|
44
|
+
run: uv run pytest --cov=qualis --cov-fail-under=80
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Data Quality
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- 'data/**'
|
|
7
|
+
- 'rules/**'
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
qualis:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
pull-requests: write
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: ahmedashraffcih/qualis@v0.2.0
|
|
18
|
+
with:
|
|
19
|
+
rules: rules/
|
|
20
|
+
sample: data/accidents.csv
|
|
21
|
+
fail-on-score: "80"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
name: Build sdist and wheel
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up uv
|
|
19
|
+
uses: astral-sh/setup-uv@v3
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
run: uv python install 3.12
|
|
23
|
+
|
|
24
|
+
- name: Build artefacts
|
|
25
|
+
run: uv build
|
|
26
|
+
|
|
27
|
+
- name: Verify version matches tag
|
|
28
|
+
run: |
|
|
29
|
+
VERSION_IN_PYPROJECT=$(grep '^version = ' pyproject.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
|
|
30
|
+
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
|
|
31
|
+
if [ "$VERSION_IN_PYPROJECT" != "$TAG_VERSION" ]; then
|
|
32
|
+
echo "Version mismatch: pyproject.toml says '$VERSION_IN_PYPROJECT', tag is '$TAG_VERSION'"
|
|
33
|
+
exit 1
|
|
34
|
+
fi
|
|
35
|
+
echo "Version $VERSION_IN_PYPROJECT matches tag v$TAG_VERSION"
|
|
36
|
+
|
|
37
|
+
- name: Upload artefacts
|
|
38
|
+
uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: dist
|
|
41
|
+
path: dist/
|
|
42
|
+
|
|
43
|
+
publish:
|
|
44
|
+
name: Publish to PyPI
|
|
45
|
+
needs: build
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
environment:
|
|
48
|
+
name: pypi
|
|
49
|
+
url: https://pypi.org/p/qualis
|
|
50
|
+
permissions:
|
|
51
|
+
id-token: write # IMPORTANT: required for trusted publishing
|
|
52
|
+
steps:
|
|
53
|
+
- name: Download artefacts
|
|
54
|
+
uses: actions/download-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: dist
|
|
57
|
+
path: dist/
|
|
58
|
+
|
|
59
|
+
- name: Publish to PyPI
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
qualis-0.3.1/.gitignore
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
eggs/
|
|
11
|
+
parts/
|
|
12
|
+
var/
|
|
13
|
+
sdist/
|
|
14
|
+
wheels/
|
|
15
|
+
pip-wheel-metadata/
|
|
16
|
+
share/python-wheels/
|
|
17
|
+
*.egg-info/
|
|
18
|
+
.installed.cfg
|
|
19
|
+
MANIFEST
|
|
20
|
+
|
|
21
|
+
# Virtual environments
|
|
22
|
+
.venv/
|
|
23
|
+
venv/
|
|
24
|
+
env/
|
|
25
|
+
ENV/
|
|
26
|
+
|
|
27
|
+
# uv
|
|
28
|
+
.uv/
|
|
29
|
+
|
|
30
|
+
# Environment variables
|
|
31
|
+
.env
|
|
32
|
+
.env.*
|
|
33
|
+
!.env.example
|
|
34
|
+
|
|
35
|
+
# Coverage
|
|
36
|
+
.coverage
|
|
37
|
+
.coverage.*
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
coverage.xml
|
|
42
|
+
*.cover
|
|
43
|
+
*.py,cover
|
|
44
|
+
|
|
45
|
+
# Testing
|
|
46
|
+
.pytest_cache/
|
|
47
|
+
.cache/
|
|
48
|
+
|
|
49
|
+
# mypy
|
|
50
|
+
.mypy_cache/
|
|
51
|
+
.dmypy.json
|
|
52
|
+
dmypy.json
|
|
53
|
+
|
|
54
|
+
# ruff
|
|
55
|
+
.ruff_cache/
|
|
56
|
+
|
|
57
|
+
# IDE
|
|
58
|
+
.idea/
|
|
59
|
+
.vscode/
|
|
60
|
+
*.swp
|
|
61
|
+
*.swo
|
|
62
|
+
*~
|
|
63
|
+
.project
|
|
64
|
+
.pydevproject
|
|
65
|
+
|
|
66
|
+
# macOS
|
|
67
|
+
.DS_Store
|
|
68
|
+
.AppleDouble
|
|
69
|
+
.LSOverride
|
|
70
|
+
Icon
|
|
71
|
+
._*
|
|
72
|
+
.Spotlight-V100
|
|
73
|
+
.Trashes
|
|
74
|
+
|
|
75
|
+
# Distribution / packaging
|
|
76
|
+
.Python
|
|
77
|
+
develop-eggs/
|
|
78
|
+
lib/
|
|
79
|
+
lib64/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.3.1 (2026-06-03)
|
|
4
|
+
|
|
5
|
+
First PyPI release — no behaviour changes from v0.3.0. Adds PyPI metadata
|
|
6
|
+
(classifiers, keywords, project URLs), the tag-driven release workflow with
|
|
7
|
+
OIDC trusted publishing, CI on Python 3.12/3.13, and contributor docs.
|
|
8
|
+
|
|
9
|
+
## v0.3.0 (2026-06-02) — Trust scaffolding
|
|
10
|
+
|
|
11
|
+
Informed by feedback from a live-delivery practitioner: "generation is the
|
|
12
|
+
commodity; grounding, control, and upkeep are the value." This release ships
|
|
13
|
+
the scaffolding that makes generated rules trustworthy.
|
|
14
|
+
|
|
15
|
+
- **Context model.** New `context.yaml` declares per-column sentinels
|
|
16
|
+
(e.g. `0 = "unknown"`), exceptions, and business grain. `qualis discover
|
|
17
|
+
--context` consults it and excludes declared sentinels from `in_set`
|
|
18
|
+
suggestions. Closes the practitioner's #1 failure mode ("0 valid in some
|
|
19
|
+
tables, invalid in others — generic check is wrong half the time").
|
|
20
|
+
- **Evidence trail.** `RuleSuggestion.rationale: str` is replaced with
|
|
21
|
+
`evidence: SuggestionEvidence` — a structured snapshot of the profile that
|
|
22
|
+
drove the suggestion (rows, nulls, distinct count, min/max, top values,
|
|
23
|
+
sentinels consulted). The review screen surfaces this so reviewers see the
|
|
24
|
+
reasoning. The old `.rationale` property still works for callers.
|
|
25
|
+
- **Review state machine.** Rules now carry `status: draft | needs_evidence
|
|
26
|
+
| active | deprecated`. New `qualis review --pending` lists rules a
|
|
27
|
+
reviewer sent back for SME confirmation. The discover review prompt adds
|
|
28
|
+
`[B] Send back` as a first-class action that captures a reason.
|
|
29
|
+
- **Pluggable standards mapping.** `Rule.metadata` is an open dict; a new
|
|
30
|
+
`RuleMetadataSchema` + `StandardsValidator` let programmes plug in their
|
|
31
|
+
required-fields model (CDE, glossary, owner, frequency, threshold).
|
|
32
|
+
- **Referential-integrity check type.** New `check: reference_lookup` with
|
|
33
|
+
`ReferenceLookupParams(reference, key_column)`. Implemented across
|
|
34
|
+
in-memory, DuckDB, and PostgreSQL adapters (SQL pushdown on the latter
|
|
35
|
+
two). New `ReferenceDataPort` plus `InMemoryReferenceData` adapter.
|
|
36
|
+
Closes the practitioner's #3 failure mode ("wrong-key join passed every
|
|
37
|
+
quality check because the rows existed; they were just the wrong rows").
|
|
38
|
+
- **Rule lineage fields.** `Rule` gains `version`, `supersedes`,
|
|
39
|
+
`deprecated_at`, `approved_by`, and `metadata` — surfaced by the loader
|
|
40
|
+
and writer when present.
|
|
41
|
+
|
|
42
|
+
Deferred to v0.4: PyPI publish, Snowflake / BigQuery adapters, `qualis
|
|
43
|
+
drift` (rule maintenance over time), live glossary integration.
|
|
44
|
+
|
|
45
|
+
## v0.2.2 (2026-05-31)
|
|
46
|
+
|
|
47
|
+
Trust-calibration patch — informed by a live-delivery practitioner's critique that
|
|
48
|
+
"a tool that generates confidently from thin context will produce rules that look
|
|
49
|
+
right but are wrong, at scale."
|
|
50
|
+
|
|
51
|
+
- **`in_set` confidence dropped from `high` to `medium`.** The heuristic observes
|
|
52
|
+
values in the profiled dataset only; it cannot know the authoritative valid
|
|
53
|
+
domain. Sentinels (e.g., `0` meaning "unknown") and rarely-occurring legitimate
|
|
54
|
+
values are silently codified as "valid" today. Calling this "high confidence"
|
|
55
|
+
was epistemically wrong.
|
|
56
|
+
- **Rationale now explicitly warns** to verify against the authoritative valid
|
|
57
|
+
domain before accepting.
|
|
58
|
+
|
|
59
|
+
## v0.2.1 (2026-05-31)
|
|
60
|
+
|
|
61
|
+
Bug-fix release based on data-team testing (Anwar, Data Engineer).
|
|
62
|
+
|
|
63
|
+
- **`--rules` now accepts a file OR directory.** `qualis discover` writes a YAML file; the next step (`validate`/`check`/`report --rules <file>`) used to error "is not a directory." Fixed via new `load_rules_from_path()` that auto-detects.
|
|
64
|
+
- **`qualis init` scaffold runs first-try.** Old scaffold referenced `my_table`/`my_column` placeholders that crashed on `qualis check`. New scaffold creates `rules/completeness.yaml` + `data/example.csv` + three runnable rules. The "next steps" message gives the exact working command.
|
|
65
|
+
- **`qualis discover` success message points at the actual output path** (not `output.parent`).
|
|
66
|
+
- **`qualis discover` sets `severity: critical`** for `not_null` and `unique` rules on ID-like columns. Previously every suggestion was `warning`.
|
|
67
|
+
|
|
68
|
+
## v0.2.0 (2026-05-30)
|
|
69
|
+
|
|
70
|
+
**Featured commands:** `qualis diff` (score comparison), `qualis discover` (rule suggestion), `qualis-github-action`.
|
|
71
|
+
|
|
72
|
+
- **`qualis diff`** — compare quality scores between two runs with trend arrows; `--fail-on-regression` for CI gates
|
|
73
|
+
- **`qualis discover`** — statistical profiler + heuristic rule suggester; interactive `git add -p` style review; pure deterministic (no LLM API key required)
|
|
74
|
+
- **GitHub Action** — composite action posts a sticky PR comment with the scorecard; uploads the HTML report as an artifact
|
|
75
|
+
- **3 new check types**: `in_set`, `row_count`, `not_negative` across DuckDB and PostgreSQL adapters
|
|
76
|
+
- **PostgreSQL adapter** check methods extended for all 8 check types
|
|
77
|
+
- Reports loader (`load_report`) reconstructs a `DatasetScore` from a JSON report file
|
|
78
|
+
- `run_detailed()` on `CheckRunner` returns both `DatasetScore` and `list[CheckResult]`
|
|
79
|
+
|
|
80
|
+
## v0.1.1 (2026-05-27)
|
|
81
|
+
|
|
82
|
+
- HTML scorecard report — single-file, traffic-light hero, DAMA dimension bars, drilldown table
|
|
83
|
+
- `qualis report` command — generate HTML or JSON reports to file
|
|
84
|
+
- PostgreSQL adapter with PG-dialect SQL templates (psycopg3, read-only transactions)
|
|
85
|
+
- `run_detailed()` on CheckRunner for detailed results with individual check outcomes
|
|
86
|
+
- `--fail-on-score` on report command for CI gating
|
|
87
|
+
|
|
88
|
+
## v0.1.0 (2026-05-26)
|
|
89
|
+
|
|
90
|
+
Initial release.
|
|
91
|
+
|
|
92
|
+
- 5 check types: not_null, unique, between, regex, sql
|
|
93
|
+
- DuckDB adapter built-in (CSV/Parquet support, zero-config)
|
|
94
|
+
- In-memory adapter for testing
|
|
95
|
+
- YAML-first rule definitions with typed parameters
|
|
96
|
+
- Template variables: `{{ today }}`, `{{ yesterday }}`, `{{ now }}`, `{{ env.VAR }}`
|
|
97
|
+
- DAMA DMBOK 2.0 — all 9 dimensions as first-class enums
|
|
98
|
+
- Weighted scoring with check-count normalization
|
|
99
|
+
- CLI: `qualis init`, `qualis validate`, `qualis check`
|
|
100
|
+
- Rich-colored console output with scorecard panel
|
|
101
|
+
- `--fail-on-score N` for CI pipeline gating
|
|
102
|
+
- `--allow-custom` security gate for Python check handlers
|
|
103
|
+
- `--output-format json` for machine-readable output
|
|
104
|
+
- Pydantic v2 settings with SecretStr credentials
|
|
105
|
+
- Typo suggestions on invalid enum values
|
|
106
|
+
- Apache 2.0 license
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Contributing to Qualis
|
|
2
|
+
|
|
3
|
+
Thanks for considering a contribution! A few notes that will save us both time.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/ahmedashraffcih/qualis
|
|
9
|
+
cd qualis
|
|
10
|
+
uv sync --all-extras --dev
|
|
11
|
+
uv run pytest -q
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Expected: 439+ tests pass.
|
|
15
|
+
|
|
16
|
+
## Quality bar
|
|
17
|
+
|
|
18
|
+
- Tests pass: `uv run pytest`
|
|
19
|
+
- Type checks pass: `uv run mypy src/` (strict mode; zero errors)
|
|
20
|
+
- Lint passes: `uv run ruff check src/ tests/` (zero warnings)
|
|
21
|
+
- Coverage stays above 80%: `uv run pytest --cov=qualis --cov-fail-under=80`
|
|
22
|
+
|
|
23
|
+
CI enforces all four. PRs that don't meet the bar will be redirected.
|
|
24
|
+
|
|
25
|
+
## Branch naming
|
|
26
|
+
|
|
27
|
+
`feature/<short-description>` for new functionality
|
|
28
|
+
`fix/<short-description>` for bug fixes
|
|
29
|
+
`docs/<short-description>` for docs-only changes
|
|
30
|
+
`chore/<short-description>` for tooling / release / CI
|
|
31
|
+
|
|
32
|
+
## Commits
|
|
33
|
+
|
|
34
|
+
Conventional Commits style:
|
|
35
|
+
|
|
36
|
+
- `feat: ...` for new functionality
|
|
37
|
+
- `fix: ...` for bug fixes
|
|
38
|
+
- `chore: ...` for tooling / release work
|
|
39
|
+
- `docs: ...` for documentation
|
|
40
|
+
- `refactor: ...` for internal restructuring without behaviour change
|
|
41
|
+
- `test: ...` for test-only changes
|
|
42
|
+
|
|
43
|
+
Keep the first line under 72 chars. Use the body to explain the why.
|
|
44
|
+
|
|
45
|
+
## Domain rules
|
|
46
|
+
|
|
47
|
+
Qualis is hexagonal. The `src/qualis/domain/` layer has zero external
|
|
48
|
+
imports (only stdlib + `qualis.domain.*`). Ports are `typing.Protocol`
|
|
49
|
+
interfaces. Adapters implement ports and live under `src/qualis/adapters/`.
|
|
50
|
+
Don't violate the dependency direction — if you need it, file an issue
|
|
51
|
+
to discuss the design first.
|
|
52
|
+
|
|
53
|
+
## Releasing
|
|
54
|
+
|
|
55
|
+
See `docs/release.md`.
|
qualis-0.3.1/LICENSE
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship made available under
|
|
36
|
+
the License, as indicated by a copyright notice that is included in
|
|
37
|
+
or attached to the work (an example is provided in the Appendix below).
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
48
|
+
in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
+
authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
+
of this definition, "submitted" means any form of electronic, verbal,
|
|
51
|
+
or written communication sent to the Licensor or its representatives,
|
|
52
|
+
including but not limited to communication on electronic mailing lists,
|
|
53
|
+
source code control systems, and issue tracking systems that are managed
|
|
54
|
+
by, or on behalf of, the Licensor for the purpose of recording
|
|
55
|
+
instructions given to the Licensor.
|
|
56
|
+
|
|
57
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
58
|
+
whom a Contribution has been received by the Licensor and is included
|
|
59
|
+
in the Work.
|
|
60
|
+
|
|
61
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
62
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
63
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
64
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
65
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
66
|
+
Work and such Derivative Works in Source or Object form.
|
|
67
|
+
|
|
68
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
(except as stated in this section) patent license to make, have made,
|
|
72
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
73
|
+
where such license applies only to those Contributions necessary to
|
|
74
|
+
make, use, sell, offer to sell, import, or otherwise transfer the Work.
|
|
75
|
+
|
|
76
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
77
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
78
|
+
modifications, and in Source or Object form, provided that You
|
|
79
|
+
meet the following conditions:
|
|
80
|
+
|
|
81
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
82
|
+
Works a copy of this License; and
|
|
83
|
+
|
|
84
|
+
(b) You must reproduce the above copyright notices for use,
|
|
85
|
+
reproduction, and distribution, and a relevant copyright notice
|
|
86
|
+
in the Derivative Works; and
|
|
87
|
+
|
|
88
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
89
|
+
that You distribute, all copyright, patent, trademark, and
|
|
90
|
+
attribution notices from the Source form of the Work,
|
|
91
|
+
excluding those notices that do not pertain to any part of
|
|
92
|
+
the Derivative Works; and
|
|
93
|
+
|
|
94
|
+
(d) If the Work includes a "NOTICE" text file, the contents
|
|
95
|
+
of the NOTICE file are for informational purposes only
|
|
96
|
+
and do not modify the License. You may add Your own attribution
|
|
97
|
+
notices within Derivative Works that You distribute, alongside
|
|
98
|
+
or in addition to the NOTICE text from the Work, provided
|
|
99
|
+
that such additional attribution notices cannot be construed
|
|
100
|
+
as modifying the License.
|
|
101
|
+
|
|
102
|
+
You may add Your own license statement for Your modifications and
|
|
103
|
+
may provide additional grant of rights to use, copy, modify, merge,
|
|
104
|
+
publish, distribute, sublicense, and/or sell copies of the Work.
|
|
105
|
+
|
|
106
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
107
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
108
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
109
|
+
this License, without any additional terms or conditions.
|
|
110
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
111
|
+
the terms of any separate license agreement you may have executed
|
|
112
|
+
with Licensor regarding such Contributions.
|
|
113
|
+
|
|
114
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
115
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
116
|
+
except as required for reasonable and customary use in describing the
|
|
117
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
118
|
+
|
|
119
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
120
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
121
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
122
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
123
|
+
implied, including, without limitation, any warranties or conditions
|
|
124
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
125
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
126
|
+
appropriateness of using or reproducing the Work and assume any
|
|
127
|
+
risks associated with Your exercise of permissions under this License.
|
|
128
|
+
|
|
129
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
130
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
131
|
+
unless required by applicable law (such as deliberate and grossly
|
|
132
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
133
|
+
liable to You for damages, including any direct, indirect, special,
|
|
134
|
+
incidental, or exemplary damages of any character arising as a
|
|
135
|
+
result of this License or out of the use or inability to use the
|
|
136
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
137
|
+
work stoppage, computer failure or malfunction, or all other
|
|
138
|
+
commercial damages or losses), even if such Contributor has been
|
|
139
|
+
advised of the possibility of such damages.
|
|
140
|
+
|
|
141
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
142
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
143
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
144
|
+
or other liability obligations and/or rights consistent with this
|
|
145
|
+
License. However, in accepting such obligations, You may offer only
|
|
146
|
+
conditions that are consistent with this full terms and conditions,
|
|
147
|
+
including warranty disclaimers and limitation of liability contained
|
|
148
|
+
in this License, or any of the terms and conditions contained in a
|
|
149
|
+
Section 9 of the License, including without limitation
|
|
150
|
+
indemnification.
|
|
151
|
+
|
|
152
|
+
END OF TERMS AND CONDITIONS
|
|
153
|
+
|
|
154
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
155
|
+
|
|
156
|
+
To apply the Apache License to your work, attach the following
|
|
157
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
158
|
+
replaced with your own identifying information. (Don't include
|
|
159
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
160
|
+
comment syntax for the format of the file. We also recommend that
|
|
161
|
+
a file or directory name be given, with a reference to where the
|
|
162
|
+
full text can be found.
|
|
163
|
+
|
|
164
|
+
Copyright 2024 Ahmed Ashraf
|
|
165
|
+
|
|
166
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
167
|
+
you may not use this file except in compliance with the License.
|
|
168
|
+
You may obtain a copy of the License at
|
|
169
|
+
|
|
170
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
171
|
+
|
|
172
|
+
Unless required by applicable law or agreed to in writing, software
|
|
173
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
174
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
175
|
+
See the License for the specific language governing permissions and
|
|
176
|
+
limitations under the License.
|
qualis-0.3.1/PKG-INFO
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qualis
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: Data quality framework that tells you WHAT failed, not just that something did
|
|
5
|
+
Project-URL: Homepage, https://github.com/ahmedashraffcih/qualis
|
|
6
|
+
Project-URL: Documentation, https://github.com/ahmedashraffcih/qualis#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/ahmedashraffcih/qualis
|
|
8
|
+
Project-URL: Issues, https://github.com/ahmedashraffcih/qualis/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/ahmedashraffcih/qualis/blob/main/CHANGELOG.md
|
|
10
|
+
Author-email: Ahmed Ashraf <ahmedashraffcih@gmail.com>
|
|
11
|
+
License: Apache-2.0
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: dama,data-governance,data-quality,data-testing,data-validation,dmbok,dq,great-expectations-alternative
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Information Technology
|
|
17
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Database
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
25
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
26
|
+
Classifier: Topic :: Software Development :: Testing
|
|
27
|
+
Classifier: Typing :: Typed
|
|
28
|
+
Requires-Python: >=3.12
|
|
29
|
+
Requires-Dist: duckdb>=1.0
|
|
30
|
+
Requires-Dist: jinja2>=3.1
|
|
31
|
+
Requires-Dist: pydantic-settings>=2.0
|
|
32
|
+
Requires-Dist: pydantic>=2.0
|
|
33
|
+
Requires-Dist: pyyaml>=6.0
|
|
34
|
+
Requires-Dist: rich>=13.0
|
|
35
|
+
Requires-Dist: typer>=0.12
|
|
36
|
+
Provides-Extra: postgres
|
|
37
|
+
Requires-Dist: psycopg-pool>=3.1; extra == 'postgres'
|
|
38
|
+
Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
|