sql-testing-library 0.16.0__tar.gz → 0.18.0__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.
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/CHANGELOG.md +26 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/PKG-INFO +11 -5
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/README.md +5 -1
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/pyproject.toml +17 -3
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/athena.py +11 -2
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_pytest_plugin.py +2 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/LICENSE +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/__init__.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/__init__.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/base.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/bigquery.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/duckdb.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/presto.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/redshift.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/snowflake.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/trino.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_core.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_exceptions.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_mock_table.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_sql_logger.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_sql_utils.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_types.py +0 -0
- {sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/py.typed +0 -0
|
@@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 0.18.0 (2025-12-01)
|
|
9
|
+
|
|
10
|
+
### Feat
|
|
11
|
+
|
|
12
|
+
- add Google Analytics tracking
|
|
13
|
+
- improve SEO across PyPI, GitHub, and documentation
|
|
14
|
+
|
|
15
|
+
### Fix
|
|
16
|
+
|
|
17
|
+
- update codecov-action parameter from 'file' to 'files'
|
|
18
|
+
- handle pytest-xdist environment in worker ID test
|
|
19
|
+
- shorten site title to prevent display issues
|
|
20
|
+
- update Twitter handle to @saran_gurmeet and remove non-existent image references
|
|
21
|
+
|
|
22
|
+
## 0.17.0 (2025-11-20)
|
|
23
|
+
|
|
24
|
+
### Feat
|
|
25
|
+
|
|
26
|
+
- **athena**: add option to specify workgroup (#127)
|
|
27
|
+
- add CI code quality checks for all PRs (#129)
|
|
28
|
+
|
|
29
|
+
### Fix
|
|
30
|
+
|
|
31
|
+
- correct workflow condition to allow push events after merge (#130)
|
|
32
|
+
- skip integration tests for fork PRs due to secret restrictions (#128)
|
|
33
|
+
|
|
8
34
|
## 0.16.0 (2025-08-20)
|
|
9
35
|
|
|
10
36
|
### Feat
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: sql-testing-library
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.18.0
|
|
4
|
+
Summary: SQL Testing Framework for Python: Unit test SQL queries with mock data injection for BigQuery, Snowflake, Redshift, Athena, Trino, and DuckDB. Simplify data engineering ETL testing and analytics validation.
|
|
5
5
|
License: MIT
|
|
6
|
-
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: sql,testing,unit-testing,mock-data,database-testing,bigquery,snowflake,redshift,athena,trino,duckdb,data-engineering,etl-testing,sql-validation,query-testing,pytest,data-quality,analytics-testing,sql-unit-test,database-mocking,sql-mock,data-warehouse-testing,cloud-database,aws-athena,google-bigquery,amazon-redshift,snowflake-testing,ci-cd-testing,test-automation
|
|
7
8
|
Author: Gurmeet Saran
|
|
8
9
|
Author-email: gurmeetx@gmail.com
|
|
9
10
|
Maintainer: Gurmeet Saran
|
|
@@ -24,6 +25,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
24
25
|
Classifier: Programming Language :: Python :: 3.11
|
|
25
26
|
Classifier: Programming Language :: Python :: 3.12
|
|
26
27
|
Classifier: Programming Language :: Python :: 3.13
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
27
29
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
28
30
|
Classifier: Topic :: Database
|
|
29
31
|
Classifier: Topic :: Database :: Database Engines/Servers
|
|
@@ -58,7 +60,11 @@ Description-Content-Type: text/markdown
|
|
|
58
60
|
|
|
59
61
|
# SQL Testing Library
|
|
60
62
|
|
|
61
|
-
A powerful Python framework for unit testing SQL queries with mock data injection
|
|
63
|
+
> **A powerful Python framework for unit testing SQL queries with mock data injection**
|
|
64
|
+
>
|
|
65
|
+
> Test SQL queries across BigQuery, Snowflake, Redshift, Athena, Trino, and DuckDB with type-safe mock data, pytest integration, and automatic table resolution. Perfect for data engineering, ETL pipeline testing, and analytics validation.
|
|
66
|
+
|
|
67
|
+
**Quick Links:** [Installation](#installation) | [Quick Start](#quick-start) | [Documentation](https://gurmeetsaran.github.io/sqltesting/) | [Examples](https://gurmeetsaran.github.io/sqltesting/examples.html) | [PyPI Package](https://pypi.org/project/sql-testing-library/)
|
|
62
68
|
|
|
63
69
|
[](https://github.com/gurmeetsaran/sqltesting/actions/workflows/tests.yaml)
|
|
64
70
|
[](https://github.com/gurmeetsaran/sqltesting/actions/workflows/athena-integration.yml)
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# SQL Testing Library
|
|
2
2
|
|
|
3
|
-
A powerful Python framework for unit testing SQL queries with mock data injection
|
|
3
|
+
> **A powerful Python framework for unit testing SQL queries with mock data injection**
|
|
4
|
+
>
|
|
5
|
+
> Test SQL queries across BigQuery, Snowflake, Redshift, Athena, Trino, and DuckDB with type-safe mock data, pytest integration, and automatic table resolution. Perfect for data engineering, ETL pipeline testing, and analytics validation.
|
|
6
|
+
|
|
7
|
+
**Quick Links:** [Installation](#installation) | [Quick Start](#quick-start) | [Documentation](https://gurmeetsaran.github.io/sqltesting/) | [Examples](https://gurmeetsaran.github.io/sqltesting/examples.html) | [PyPI Package](https://pypi.org/project/sql-testing-library/)
|
|
4
8
|
|
|
5
9
|
[](https://github.com/gurmeetsaran/sqltesting/actions/workflows/tests.yaml)
|
|
6
10
|
[](https://github.com/gurmeetsaran/sqltesting/actions/workflows/athena-integration.yml)
|
|
@@ -4,8 +4,8 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "sql-testing-library"
|
|
7
|
-
version = "0.
|
|
8
|
-
description = "
|
|
7
|
+
version = "0.18.0"
|
|
8
|
+
description = "SQL Testing Framework for Python: Unit test SQL queries with mock data injection for BigQuery, Snowflake, Redshift, Athena, Trino, and DuckDB. Simplify data engineering ETL testing and analytics validation."
|
|
9
9
|
authors = ["Gurmeet Saran <gurmeetx@gmail.com>", "Kushal Thakkar <kushal.thakkar@gmail.com>"]
|
|
10
10
|
maintainers = ["Gurmeet Saran <gurmeetx@gmail.com>", "Kushal Thakkar <kushal.thakkar@gmail.com>"]
|
|
11
11
|
license = "MIT"
|
|
@@ -28,7 +28,21 @@ keywords = [
|
|
|
28
28
|
"data-engineering",
|
|
29
29
|
"etl-testing",
|
|
30
30
|
"sql-validation",
|
|
31
|
-
"query-testing"
|
|
31
|
+
"query-testing",
|
|
32
|
+
"pytest",
|
|
33
|
+
"data-quality",
|
|
34
|
+
"analytics-testing",
|
|
35
|
+
"sql-unit-test",
|
|
36
|
+
"database-mocking",
|
|
37
|
+
"sql-mock",
|
|
38
|
+
"data-warehouse-testing",
|
|
39
|
+
"cloud-database",
|
|
40
|
+
"aws-athena",
|
|
41
|
+
"google-bigquery",
|
|
42
|
+
"amazon-redshift",
|
|
43
|
+
"snowflake-testing",
|
|
44
|
+
"ci-cd-testing",
|
|
45
|
+
"test-automation"
|
|
32
46
|
]
|
|
33
47
|
classifiers = [
|
|
34
48
|
"Development Status :: 4 - Beta",
|
|
@@ -44,6 +44,7 @@ class AthenaAdapter(PrestoBaseAdapter):
|
|
|
44
44
|
database: str,
|
|
45
45
|
s3_output_location: str,
|
|
46
46
|
region: str = "us-west-2",
|
|
47
|
+
workgroup: Optional[str] = None,
|
|
47
48
|
aws_access_key_id: Optional[str] = None,
|
|
48
49
|
aws_secret_access_key: Optional[str] = None,
|
|
49
50
|
) -> None:
|
|
@@ -58,6 +59,7 @@ class AthenaAdapter(PrestoBaseAdapter):
|
|
|
58
59
|
self.database = database
|
|
59
60
|
self.s3_output_location = s3_output_location
|
|
60
61
|
self.region = region
|
|
62
|
+
self.workgroup = workgroup
|
|
61
63
|
|
|
62
64
|
# Initialize Athena client
|
|
63
65
|
if aws_access_key_id and aws_secret_access_key:
|
|
@@ -79,11 +81,18 @@ class AthenaAdapter(PrestoBaseAdapter):
|
|
|
79
81
|
"""Execute query and return results as DataFrame."""
|
|
80
82
|
import pandas as pd
|
|
81
83
|
|
|
84
|
+
query_params: dict[str, Any] = {
|
|
85
|
+
"QueryExecutionContext": {"Database": self.database},
|
|
86
|
+
"ResultConfiguration": {"OutputLocation": self.s3_output_location},
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if self.workgroup is not None:
|
|
90
|
+
query_params["WorkGroup"] = self.workgroup
|
|
91
|
+
|
|
82
92
|
# Start query execution
|
|
83
93
|
response = self.client.start_query_execution(
|
|
84
94
|
QueryString=query,
|
|
85
|
-
|
|
86
|
-
ResultConfiguration={"OutputLocation": self.s3_output_location},
|
|
95
|
+
**query_params,
|
|
87
96
|
)
|
|
88
97
|
|
|
89
98
|
query_execution_id = response["QueryExecutionId"]
|
{sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_pytest_plugin.py
RENAMED
|
@@ -86,6 +86,7 @@ class SQLTestDecorator:
|
|
|
86
86
|
database = adapter_config.get("database")
|
|
87
87
|
s3_output_location = adapter_config.get("s3_output_location")
|
|
88
88
|
region = adapter_config.get("region", "us-west-2")
|
|
89
|
+
workgroup = adapter_config.get("workgroup")
|
|
89
90
|
aws_access_key_id = adapter_config.get("aws_access_key_id")
|
|
90
91
|
aws_secret_access_key = adapter_config.get("aws_secret_access_key")
|
|
91
92
|
|
|
@@ -98,6 +99,7 @@ class SQLTestDecorator:
|
|
|
98
99
|
database=database,
|
|
99
100
|
s3_output_location=s3_output_location,
|
|
100
101
|
region=region,
|
|
102
|
+
workgroup=workgroup,
|
|
101
103
|
aws_access_key_id=aws_access_key_id,
|
|
102
104
|
aws_secret_access_key=aws_secret_access_key,
|
|
103
105
|
)
|
|
File without changes
|
{sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_adapters/trino.py
RENAMED
|
File without changes
|
|
File without changes
|
{sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_exceptions.py
RENAMED
|
File without changes
|
{sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_mock_table.py
RENAMED
|
File without changes
|
{sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_sql_logger.py
RENAMED
|
File without changes
|
{sql_testing_library-0.16.0 → sql_testing_library-0.18.0}/src/sql_testing_library/_sql_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|