sql-testing-library 0.16.0__tar.gz → 0.17.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.
Files changed (23) hide show
  1. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/CHANGELOG.md +12 -0
  2. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/PKG-INFO +4 -2
  3. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/pyproject.toml +1 -1
  4. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_adapters/athena.py +11 -2
  5. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_pytest_plugin.py +2 -0
  6. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/LICENSE +0 -0
  7. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/README.md +0 -0
  8. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/__init__.py +0 -0
  9. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_adapters/__init__.py +0 -0
  10. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_adapters/base.py +0 -0
  11. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_adapters/bigquery.py +0 -0
  12. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_adapters/duckdb.py +0 -0
  13. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_adapters/presto.py +0 -0
  14. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_adapters/redshift.py +0 -0
  15. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_adapters/snowflake.py +0 -0
  16. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_adapters/trino.py +0 -0
  17. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_core.py +0 -0
  18. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_exceptions.py +0 -0
  19. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_mock_table.py +0 -0
  20. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_sql_logger.py +0 -0
  21. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_sql_utils.py +0 -0
  22. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/_types.py +0 -0
  23. {sql_testing_library-0.16.0 → sql_testing_library-0.17.0}/src/sql_testing_library/py.typed +0 -0
@@ -5,6 +5,18 @@ 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.17.0 (2025-11-20)
9
+
10
+ ### Feat
11
+
12
+ - **athena**: add option to specify workgroup (#127)
13
+ - add CI code quality checks for all PRs (#129)
14
+
15
+ ### Fix
16
+
17
+ - correct workflow condition to allow push events after merge (#130)
18
+ - skip integration tests for fork PRs due to secret restrictions (#128)
19
+
8
20
  ## 0.16.0 (2025-08-20)
9
21
 
10
22
  ### Feat
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: sql-testing-library
3
- Version: 0.16.0
3
+ Version: 0.17.0
4
4
  Summary: A powerful Python framework for unit testing SQL queries across BigQuery, Snowflake, Redshift, Athena, Trino, and DuckDB with mock data
5
5
  License: MIT
6
+ License-File: LICENSE
6
7
  Keywords: sql,testing,unit-testing,mock-data,database-testing,bigquery,snowflake,redshift,athena,trino,duckdb,data-engineering,etl-testing,sql-validation,query-testing
7
8
  Author: Gurmeet Saran
8
9
  Author-email: gurmeetx@gmail.com
@@ -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
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "sql-testing-library"
7
- version = "0.16.0"
7
+ version = "0.17.0"
8
8
  description = "A powerful Python framework for unit testing SQL queries across BigQuery, Snowflake, Redshift, Athena, Trino, and DuckDB with mock data"
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>"]
@@ -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
- QueryExecutionContext={"Database": self.database},
86
- ResultConfiguration={"OutputLocation": self.s3_output_location},
95
+ **query_params,
87
96
  )
88
97
 
89
98
  query_execution_id = response["QueryExecutionId"]
@@ -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
  )