Skip to content

lbundalian/quail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quail Logo

Quail

Quail is a lightweight framework for running data quality checks and tasks, inspired by workflow engines like Snakemake but tailored for modern data pipelines.


📦 Installation

1. Clone the repo

git clone https://github.com/your-username/quail.git
cd quail

### 2. Create and activate a virtual environment
```bash
python -m venv .venv
source .venv/bin/activate   # On Windows: .venv\Scripts\activate

3. Install the package

For development (auto-reflects changes):

pip install -e .

Or build and install the wheel:

python -m pip install --upgrade build
python -m build
pip install dist/*.whl

📝 Project Conventions

Workflow files (.ql)

Quail workflows should be defined in files ending with the .ql extension.
Example:

my_pipeline.ql

These define your tasks and checks.

Configuration (quail.yml)

Every project should include a quail.yml that describes:

  • Environments (e.g. dev, prod)
  • Database connections
  • Parameters
  • Targets / tables

Example quail.yml:

profile: dev
envs:
  dev:
    url: sqlite:///quail.db
params:
  schema: public
targets:
  daily:
    tasks:
      - reflect_tables
      - run_checks

🚀 Usage

Run Quail on a workflow

quail run my_pipeline.ql --config quail.yml --targets daily

Run as a Python module

python -m quail --config quail.yml

Import in your own code

from quail.core import Runner, qtask, qcheck

@qcheck(id="row_count")
def row_count(ctx):
    # return a CheckResult here
    ...

Runner(config="quail.yml").run("my_pipeline.ql")

🧪 Prototype Example

For local testing you can use prototype/main.py:

from quail.core import some_func

if __name__ == "__main__":
    print("Prototype running")
    print(some_func())

Run it:

python prototype/main.py

🧪 Testing

We use pytest:

pip install -e ".[dev]"
pytest -q

📜 License

MIT License © 2025 Linnaeus Bundalian

About

Minimalist data quality workflow and DSL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages