snowpark-checkpoints-validators 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl

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.
@@ -0,0 +1,16 @@
1
+ # Copyright 2025 Snowflake Inc.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ __version__ = "0.1.3"
@@ -330,11 +330,11 @@ def _generate_event(
330
330
  if sc_version is not None:
331
331
  metadata["snowpark_checkpoints_version"] = sc_version
332
332
  message = {
333
- "type": event_type,
333
+ "event_type": event_type,
334
+ "type": "snowpark-checkpoints",
334
335
  "event_name": event_name,
335
336
  "driver_type": "PythonConnector",
336
337
  "driver_version": SNOWFLAKE_CONNECTOR_VERSION,
337
- "source": "snowpark-checkpoints",
338
338
  "metadata": metadata,
339
339
  "data": json.dumps(parameters_info or {}),
340
340
  }
@@ -367,7 +367,7 @@ def _get_version() -> str:
367
367
 
368
368
  """
369
369
  try:
370
- directory_levels_up = 4
370
+ directory_levels_up = 1
371
371
  project_root = Path(__file__).resolve().parents[directory_levels_up]
372
372
  version_file_path = project_root / VERSION_FILE_NAME
373
373
  with open(version_file_path) as file:
@@ -359,6 +359,8 @@ def _update_validation_result(
359
359
 
360
360
  pipeline_result_metadata = ValidationResultsMetadata(output_path)
361
361
 
362
+ pipeline_result_metadata.clean()
363
+
362
364
  pipeline_result_metadata.add_validation_result(
363
365
  ValidationResult(
364
366
  timestamp=datetime.now().isoformat(),
@@ -88,6 +88,15 @@ class ValidationResultsMetadata(metaclass=Singleton):
88
88
  f"Error reading validation results file: {self.validation_results_file} \n {e}"
89
89
  ) from None
90
90
 
91
+ def clean(self):
92
+ """Clean the validation results list.
93
+
94
+ This method empties the validation results list.
95
+
96
+ """
97
+ if not os.path.exists(self.validation_results_file):
98
+ self.validation_results.results = []
99
+
91
100
  def add_validation_result(self, validation_result: ValidationResult):
92
101
  """Add a validation result to the pipeline result list.
93
102
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: snowpark-checkpoints-validators
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Migration tools for Snowpark
5
5
  Project-URL: Bug Tracker, https://github.com/snowflakedb/snowpark-checkpoints/issues
6
6
  Project-URL: Source code, https://github.com/snowflakedb/snowpark-checkpoints/
@@ -29,10 +29,11 @@ Requires-Python: <3.12,>=3.9
29
29
  Requires-Dist: pandera-report==0.1.2
30
30
  Requires-Dist: pandera[io]==0.20.4
31
31
  Requires-Dist: pyspark
32
- Requires-Dist: snowflake-connector-python==3.13.0
32
+ Requires-Dist: snowflake-connector-python[pandas]
33
33
  Requires-Dist: snowflake-snowpark-python==1.26.0
34
34
  Provides-Extra: development
35
35
  Requires-Dist: coverage>=7.6.7; extra == 'development'
36
+ Requires-Dist: deepdiff==8.1.1; extra == 'development'
36
37
  Requires-Dist: deepdiff>=8.0.0; extra == 'development'
37
38
  Requires-Dist: hatchling==1.25.0; extra == 'development'
38
39
  Requires-Dist: pre-commit>=4.0.1; extra == 'development'
@@ -46,8 +47,7 @@ Description-Content-Type: text/markdown
46
47
  # snowpark-checkpoints-validators
47
48
 
48
49
  ---
49
- **NOTE**
50
- This package is on Public Preview.
50
+ ##### This package is on Public Preview.
51
51
  ---
52
52
 
53
53
  **snowpark-checkpoints-validators** is a package designed to validate Snowpark DataFrames against predefined schemas and checkpoints. This package ensures data integrity and consistency by performing schema and data validation checks at various stages of a Snowpark pipeline.
@@ -1,11 +1,12 @@
1
1
  snowflake/snowpark_checkpoints/__init__.py,sha256=1_xzSopIHWpw1i3gQqWLN0wCfWWEefjr4cl1vl0xSdY,1211
2
+ snowflake/snowpark_checkpoints/__version__.py,sha256=OfdAqrd8gnFI-pK7o_olRVrRKIWfQhQOoo_wR3u1s5s,632
2
3
  snowflake/snowpark_checkpoints/checkpoint.py,sha256=-y1iWdGxYGuTWdngOEXdA59MT33PCiM7cP1s3jJs9jE,18997
3
4
  snowflake/snowpark_checkpoints/errors.py,sha256=9KjzRf8bjDZTTNL4LeySJAwuucDOyz0Ka7EFBKWFpyg,1821
4
5
  snowflake/snowpark_checkpoints/job_context.py,sha256=7LdJ682lC8hCJOYUn-AVXq_Llv18R9oGdK2F-amYR_o,2990
5
6
  snowflake/snowpark_checkpoints/singleton.py,sha256=7AgIHQBXVRvPBBCkmBplzkdrrm-xVWf_N8svzA2vF8E,836
6
7
  snowflake/snowpark_checkpoints/snowpark_sampler.py,sha256=-t7cg-swMK0SaU7r8y90MLSDPXGlKprc6xdVxEs29sU,3632
7
8
  snowflake/snowpark_checkpoints/spark_migration.py,sha256=DzzgUZ-XlzIqCz-aWpBICP8mgnjk8UNoL8JsomadF-U,8832
8
- snowflake/snowpark_checkpoints/validation_result_metadata.py,sha256=zNU7hk9GH4d73iVfNopSAs_8yJeT12s_mcbpB7FShSY,4516
9
+ snowflake/snowpark_checkpoints/validation_result_metadata.py,sha256=mHCIq6-F37HK-jYBAPeVtax9eIwiCvQZxFPGWi4KvQc,4765
9
10
  snowflake/snowpark_checkpoints/validation_results.py,sha256=J8OcpNty6hQD8RbAy8xmA0UMbPWfXSmQnHYspWWSisk,1502
10
11
  snowflake/snowpark_checkpoints/utils/__init__.py,sha256=I4srmZ8G1q9DU6Suo1S91aVfNvETyisKH95uvLAvEJ0,609
11
12
  snowflake/snowpark_checkpoints/utils/checkpoint_logger.py,sha256=meGl5T3Avp4Qn0GEwkJi5GSLS4MDb7zTGbTOI-8bf1E,1592
@@ -13,9 +14,9 @@ snowflake/snowpark_checkpoints/utils/constants.py,sha256=pgFttLDQ6fTa6obSdvivWBY
13
14
  snowflake/snowpark_checkpoints/utils/extra_config.py,sha256=pmGLYT7cu9WMKzQwcEPkgk1DMnnT1fREm45p19e79hk,2567
14
15
  snowflake/snowpark_checkpoints/utils/pandera_check_manager.py,sha256=ddTwXauuZdowIRwPMT61GWYCG4XGKOFkVyfZO49bc-8,14516
15
16
  snowflake/snowpark_checkpoints/utils/supported_types.py,sha256=GrMX2tHdSFnK7LlPbZx20UufD6Br6TNVRkkBwIxdPy0,1433
16
- snowflake/snowpark_checkpoints/utils/telemetry.py,sha256=JZ5bdPBxAoyWT7clua4T_QprHcwWQChd2A5ojLFHJ0o,31366
17
- snowflake/snowpark_checkpoints/utils/utils_checks.py,sha256=LF1EJrwJwV4gBqifXdULBBGKXxCZqC9vR7BGLe_LTSM,13490
18
- snowpark_checkpoints_validators-0.1.1.dist-info/METADATA,sha256=o2uERHArlH9q3HpWYRGZBjzJAgYKNlolLQAd6JkiuXY,11012
19
- snowpark_checkpoints_validators-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
20
- snowpark_checkpoints_validators-0.1.1.dist-info/licenses/LICENSE,sha256=pmjhbh6uVhV5MBXOlou_UZgFP7CYVQITkCCdvfcS5lY,11340
21
- snowpark_checkpoints_validators-0.1.1.dist-info/RECORD,,
17
+ snowflake/snowpark_checkpoints/utils/telemetry.py,sha256=_WOVo19BxcF6cpQDplID6BEOvgJfHTGK1JZI1-OI4uc,31370
18
+ snowflake/snowpark_checkpoints/utils/utils_checks.py,sha256=o9HOBrDuTxSIgzZQHfsa9pMzzXRUsRAISI7L6OURouo,13528
19
+ snowpark_checkpoints_validators-0.1.3.dist-info/METADATA,sha256=BSv42Vrlq07M2hIiKHSXJNxaH1O4mYQOJ1U4uApT9uA,11064
20
+ snowpark_checkpoints_validators-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
+ snowpark_checkpoints_validators-0.1.3.dist-info/licenses/LICENSE,sha256=pmjhbh6uVhV5MBXOlou_UZgFP7CYVQITkCCdvfcS5lY,11340
22
+ snowpark_checkpoints_validators-0.1.3.dist-info/RECORD,,