Skip to content

Commit c5f80b9

Browse files
committed
⏩ merge: branch 'main' into feature/add-data-quality-and-write-report-file-after-validation.
2 parents b3d3eaf + 5d4389b commit c5f80b9

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

src/sqlplate/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ def config() -> Config:
5959
etl_columns=etl_columns,
6060
scd1_soft_delete_columns=scd1_soft_delete_columns,
6161
scd2_columns=scd2_columns,
62-
)
62+
)

src/sqlplate/sqlity.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ------------------------------------------------------------------------------
2+
# Copyright (c) 2022 Korawich Anuttra. All rights reserved.
3+
# Licensed under the MIT License. See LICENSE in the project root for
4+
# license information.
5+
# ------------------------------------------------------------------------------
6+
from __future__ import annotations
7+
8+
9+
class SQLity:
10+
"""A SQLity object for render data quality report by Jinja template."""

src/sqlplate/sqlplate.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ def __init__(self, name: str, path: Path) -> None:
4343
self._option: dict[str, Any] = {}
4444

4545
@staticmethod
46-
def formats(path: Optional[Path] = None) -> list[str]:
47-
"""Return supported formats"""
46+
def list_formats(path: Optional[Path] = None) -> list[str]:
47+
"""Return supported formats with list of format value.
48+
49+
Arges:
50+
path (Path | None): A template path that want to search.
51+
52+
:rtype: list[str]
53+
"""
4854
if path is None:
4955
path: Path = Path('./templates')
5056
return [

tests/test_sqlplate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def test_sqlplate_raise(template_path):
1111

1212

1313
def test_sqlplate_formats(template_path):
14-
formats: list[str] = SQLPlate.formats(path=template_path)
14+
formats: list[str] = SQLPlate.list_formats(path=template_path)
1515
assert isinstance(formats, list)
1616
assert len(formats) > 0
1717
assert 'utils' not in formats

0 commit comments

Comments
 (0)