Skip to content

Commit 49b1285

Browse files
authored
Merge pull request #74 from TechnologyEnhancedLearning/dev-data-team-shared
Dev data team shared
2 parents 39adb51 + b992652 commit 49b1285

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

databricks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ targets:
154154
schema_prefix: ${workspace.current_user.short_name}_
155155
# dev storage account
156156
storage_account: unifiedrptdeltalake
157-
pytest_marks: "not dev_skip"
157+
pytest_marks: "not dev_skip and not freshness and not manual"
158158
permissions:
159159
- level: CAN_MANAGE
160160
user_name: ${workspace.current_user.userName}
@@ -177,7 +177,7 @@ targets:
177177
env_name: dev
178178
catalog: dev_catalog
179179
storage_account: unifiedrptdeltalake
180-
pytest_marks: "not dev_skip"
180+
pytest_marks: "not dev_skip and not freshness and not manual"
181181
permissions:
182182
- group_name: dev_env_users
183183
level: CAN_VIEW
@@ -198,7 +198,7 @@ targets:
198198
catalog: staging_catalog
199199
# Staging storage account
200200
storage_account: unifiedrptdeltalake
201-
pytest_marks: "not staging_skip"
201+
pytest_marks: "not staging_skip and not freshness and not manual"
202202
permissions:
203203
- group_name: staging_env_users
204204
level: CAN_VIEW

tests/data-quality-tests/bronze/ods/test_contact_details.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def contact_details_table(spark, bronze_ods_schema):
2727
@pytest.mark.databricks #dont run in CI environment
2828
@pytest.mark.expensive
2929
@pytest.mark.freshness(reason="Skipping freshness tests in dev") # maybe should be
30-
@pytest.mark.dev_skip(reason="Skipping freshness tests in dev")
30+
@pytest.mark.staging_skip(reason="Skipping in staging we would have freshness tests here but we dont have the data we need in the poc")
3131
class TestContactDetailsFreshness:
3232
"""Check data is being loaded daily"""
3333

@@ -37,7 +37,7 @@ def test_data_loaded_today(self, contact_details_table):
3737
# If not, you might check row count changes or use audit table
3838
today = datetime.now().date()
3939

40-
# Adjust this based on your actual date column
40+
# We would need a column like this to check, or modified, or created etc
4141
recent_data = contact_details_table.filter(
4242
F.col("load_date") == today
4343
)
@@ -60,6 +60,7 @@ def test_data_loaded_within_24_hours(self, contact_details_table):
6060
class TestContactDetailsTelephoneFormat:
6161
"""Validate telephone number formats"""
6262
@pytest.mark.dev_skip(reason="Skip because we dont want to resolve the fail its an example, Uuse this to see a fail in action")
63+
@pytest.mark.staging_skip(reason="Skip because we dont want to resolve the fail its an example, Uuse this to see a fail in action")
6364
def test_tel_is_numeric_when_not_null(self, contact_details_table):
6465
"""Tel column should only contain digits when populated"""
6566
invalid_tel = contact_details_table.filter(
@@ -76,6 +77,7 @@ def test_tel_is_numeric_when_not_null(self, contact_details_table):
7677
assert invalid_count == 0, f"Found {invalid_count} telephone numbers with non-numeric characters"
7778

7879
@pytest.mark.dev_skip(reason="Skip because we dont want to resolve the fail its an example, Uuse this to see a fail in action")
80+
@pytest.mark.staging_skip(reason="Skip because we dont want to resolve the fail its an example, Uuse this to see a fail in action")
7981
def test_tel_has_valid_uk_length(self, contact_details_table):
8082
"""UK telephone numbers should be 10-11 digits"""
8183
invalid_length = contact_details_table.filter(
@@ -103,7 +105,7 @@ def test_fax_is_numeric_when_not_null(self, contact_details_table):
103105

104106
class TestContactDetailsCompleteness:
105107
"""Check data completeness"""
106-
108+
107109
@pytest.mark.staging_skip(reason="Just to see job is passing the value")
108110
def test_organisation_id_not_null(self, contact_details_table):
109111
"""OrganisationId is a required field"""

0 commit comments

Comments
 (0)