snowpark-checkpoints-configuration 0.2.0__tar.gz → 0.2.1__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.
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/PKG-INFO +1 -1
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/src/snowflake/snowpark_checkpoints_configuration/__version__.py +1 -1
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/src/snowflake/snowpark_checkpoints_configuration/checkpoint_name_utils.py +2 -2
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/src/snowflake/snowpark_checkpoints_configuration/model/checkpoints.py +1 -1
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/test/unit/test_checkpoint_name_utils.py +6 -3
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/.gitignore +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/LICENSE +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/README.md +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/pyproject.toml +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/src/snowflake/snowpark_checkpoints_configuration/__init__.py +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/src/snowflake/snowpark_checkpoints_configuration/checkpoint_metadata.py +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/src/snowflake/snowpark_checkpoints_configuration/singleton.py +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/test/.coveragerc +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/test/unit/invalid_checkpoint/checkpoints.json +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/test/unit/test_checkpoint_metadata.py +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/test/unit/test_checkpoints.py +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/test/unit/test_logger.py +0 -0
- {snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/test/unit/valid_checkpoint/checkpoints.json +0 -0
{snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: snowpark-checkpoints-configuration
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.1
|
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/
|
@@ -16,7 +16,7 @@
|
|
16
16
|
import re as regx
|
17
17
|
|
18
18
|
|
19
|
-
CHECKPOINT_NAME_REGEX_PATTERN = r"[a-zA-Z_][a-zA-Z0-9_]+"
|
19
|
+
CHECKPOINT_NAME_REGEX_PATTERN = r"[a-zA-Z_][a-zA-Z0-9_$]+"
|
20
20
|
TRANSLATION_TABLE = str.maketrans({" ": "_", "-": "_"})
|
21
21
|
|
22
22
|
|
@@ -39,7 +39,7 @@ def is_valid_checkpoint_name(checkpoint_name: str) -> bool:
|
|
39
39
|
|
40
40
|
A valid checkpoint name must:
|
41
41
|
- Start with a letter (a-z, A-Z) or an underscore (_)
|
42
|
-
- Be followed by any combination of letters, digits (0-9)
|
42
|
+
- Be followed by any combination of letters, digits (0-9), underscores (_), and dollar signs ($).
|
43
43
|
|
44
44
|
Args:
|
45
45
|
checkpoint_name (str): The checkpoint name to validate.
|
@@ -56,7 +56,7 @@ class Checkpoint(BaseModel):
|
|
56
56
|
if not is_valid_checkpoint_name:
|
57
57
|
error_msg = (
|
58
58
|
f"Invalid checkpoint name: {name} in checkpoints.json file. "
|
59
|
-
f"Checkpoint names must only contain alphanumeric characters and
|
59
|
+
f"Checkpoint names must only contain alphanumeric characters, underscores and dollar signs."
|
60
60
|
)
|
61
61
|
LOGGER.error(error_msg)
|
62
62
|
raise Exception(error_msg)
|
@@ -63,7 +63,8 @@ def test_normalize_checkpoint_name_hyphen_case(input_value, expected_value):
|
|
63
63
|
|
64
64
|
|
65
65
|
@pytest.mark.parametrize(
|
66
|
-
"input_value",
|
66
|
+
"input_value",
|
67
|
+
["_checkpoint1", "_checkpoint", "checkPoint1", "Checkpoint", "_1", "Dollar$Sample"],
|
67
68
|
)
|
68
69
|
def test_validate_checkpoint_name_valid_case(input_value):
|
69
70
|
checkpoint = Checkpoint(
|
@@ -79,12 +80,14 @@ def test_validate_checkpoint_name_valid_case(input_value):
|
|
79
80
|
assert checkpoint.name == input_value
|
80
81
|
|
81
82
|
|
82
|
-
@pytest.mark.parametrize(
|
83
|
+
@pytest.mark.parametrize(
|
84
|
+
"input_value", ["_", "$", "5", "", "56_my_checkpoint", "_+check", "$DollarSample"]
|
85
|
+
)
|
83
86
|
def test_checkpoint_invalid_name(input_value: str, caplog: pytest.LogCaptureFixture):
|
84
87
|
caplog.set_level(level=logging.ERROR, logger=LOGGER_NAME)
|
85
88
|
expected_error_msg = (
|
86
89
|
f"Invalid checkpoint name: {input_value} in checkpoints.json file. "
|
87
|
-
f"Checkpoint names must only contain alphanumeric characters and
|
90
|
+
f"Checkpoint names must only contain alphanumeric characters, underscores and dollar signs."
|
88
91
|
)
|
89
92
|
|
90
93
|
with pytest.raises(Exception) as ex_info:
|
{snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/.gitignore
RENAMED
File without changes
|
{snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/LICENSE
RENAMED
File without changes
|
{snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/README.md
RENAMED
File without changes
|
{snowpark_checkpoints_configuration-0.2.0 → snowpark_checkpoints_configuration-0.2.1}/pyproject.toml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|