Skip to main content

PySpark Data Pipeline Testing Framework

Project description

SparkTestify

PySpark Data Pipeline Testing Framework

SparkTestify is a lightweight, modular, and CI/CD-friendly testing framework built for PySpark data pipelines.

Features

  • Pytest Fixtures & Plugins for SparkSession
  • DataFrame and Schema Assertions
  • Mock Data Sources & Test Data Generation
  • Integration Testing Support
  • CI/CD ready (GitHub Actions, Pre-commit)

Installation

pip install sparktestify

Usage

from sparktest.assertions import assert_dataframe_equal
from sparktest.fixtures import spark


def test_my_transformation(spark):
    input_df = spark.createDataFrame([...])
    output_df = my_transformation(input_df)
    expected_df = spark.createDataFrame([...])
    assert_dataframe_equal(output_df, expected_df)

Development Setup

pip install -r requirements.txt
pip install -r requirements-dev.txt
pre-commit install
pytest tests/

CI/CD

GitHub Actions are configured to:

  • Run pre-commit checks
  • Run test cases on every push and PR

Workflow file: .github/workflows/ci.yml

Project details


Download files

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

Source Distribution

sparktestify-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

sparktestify-0.1.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file sparktestify-0.1.0.tar.gz.

File metadata

  • Download URL: sparktestify-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for sparktestify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 943fb22b7e365f1c2deb8e611b54c118218be39d2a79aa372100359d9ce97896
MD5 a2c4d9d1134b975b9dfa93939049172d
BLAKE2b-256 dee02185e1f4dad5f258e6c62270ffcd9aea9e4b794a96d6f00dcce0f46b2952

See more details on using hashes here.

File details

Details for the file sparktestify-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sparktestify-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for sparktestify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3489057393858ebdfda994a7a6f750c0c77c9bab50dbb845326ad0b6b10b2a0
MD5 0a97912dead305975f8d66d6412f5dd0
BLAKE2b-256 4b28c4bdd88b14a5a84f1cbda1e97bab11d093a5efdc1db33fc9f0a2a0c41bab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page