Skip to main content

Open Data Quality

CI License: Apache 2.0

Auditable, configuration-driven quality gates for CSV data delivery and CI workflows.

Why this project

Data-quality failures are often discovered after data has been delivered, loaded into a platform, or used in analysis. Open Data Quality keeps the rule definition, validation result, and exit status reproducible so a data pipeline can stop on a failed quality gate and retain a reviewable report.

CSV export -> JSON rules -> quality checks -> JSON / HTML report
                                      |
                                      +-> exit 0 when all checks pass
                                      +-> exit 1 when any check fails

Current capabilities

  • Required-value, uniqueness, regular-expression, and numeric-range checks
  • JSON reports for machines and self-contained HTML reports for reviewers
  • A small command-line interface with no runtime dependencies outside Python's standard library
  • Deterministic, CI-friendly execution
  • Examples for general data delivery and environmental monitoring records

The current input format is CSV. Database adapters, streaming for large files, and optional AI-assisted rule suggestions remain roadmap items; the core command does not connect to external systems or call an AI service.

Install

After the v0.1.1 release is published to PyPI, install the pinned package:

python -m pip install open-data-quality==0.1.1

Until then, install the project from source:

python -m pip install -e .

The package requires Python 3.10 or newer. A release workflow and packaging checks are included in docs/release.md.

Quick start

Run a quality gate and print the JSON report:

open-data-quality examples/valid_sample.csv --rules examples/rules.json

Write both machine-readable and reviewer-friendly reports:

open-data-quality \
  examples/valid_sample.csv \
  --rules examples/rules.json \
  --output quality-report.json \
  --html-report quality-report.html

examples/sample.csv intentionally contains invalid rows so it can be used to inspect failures. The command exits with status 1 when a rule fails, which makes it suitable for a CI quality gate.

Rule format

Rules are stored in a JSON object with a rules array:

{
  "rules": [
    {"type": "required", "column": "name"},
    {"type": "unique", "column": "id"},
    {"type": "range", "column": "age", "min": 0, "max": 120},
    {"type": "regex", "column": "email", "pattern": "^[^@]+@[^@]+\\.[^@]+$"}
  ]
}

Each result records the rule, pass/fail status, failed-row count, and a bounded sample of failed row numbers. Empty values can be handled separately with a required rule.

Examples

The environmental monitoring example checks station identifiers, record uniqueness, PM2.5 values, and temperature ranges:

open-data-quality \
  examples/environment_monitoring_sample.csv \
  --rules examples/environment_monitoring_rules.json \
  --html-report environmental-quality.html

CI usage

The repository's CI runs the test suite on Python 3.10–3.13, builds an sdist and wheel, installs the wheel into a clean virtual environment, and runs a command-line smoke test. A downstream workflow can use the same command and fail its job when the quality gate returns status 1.

For a non-confidential CSV workflow, see the early feedback request for the trial steps and privacy boundary.

Contributing and maintenance

See docs/integrations.md for a downstream GitHub Actions example, CONTRIBUTING.md for local checks and pull-request expectations, SECURITY.md for vulnerability reports, docs/release.md for releases, and docs/roadmap.md for planned work.

License

Apache License 2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_data_quality-0.1.1.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_data_quality-0.1.1-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file open_data_quality-0.1.1.tar.gz.

File metadata

  • Download URL: open_data_quality-0.1.1.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for open_data_quality-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7a65526b2090dc6e86aea73e7fb4e3ccacf3e2395fdb156e999d2904fc46162e
MD5 36a9f7a60e7350374312cdcfc275ea2f
BLAKE2b-256 84460ac76bc2b50dbae4eb41429f24215713d454d1e9d5587cd1a33ff9e27acb

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_data_quality-0.1.1.tar.gz:

Publisher: publish.yml on wefsdfasdfaef/open-data-quality

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file open_data_quality-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for open_data_quality-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e1c386703173ea504115a0bc5b14921df9d0ade53566ad2a94ada9e94d0d690
MD5 c2accec0185e938a6665bed75d87cdca
BLAKE2b-256 5649b85f84490e79530c4be7c28e3d12680d0296afcf17f5957c9e99f2044db7

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_data_quality-0.1.1-py3-none-any.whl:

Publisher: publish.yml on wefsdfasdfaef/open-data-quality

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page