Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.0
6.2.0
4 changes: 2 additions & 2 deletions exabel_data_sdk/scripts/load_time_series_from_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def __init__(self, argv: Sequence[str]):
"--pit-offset",
required=False,
type=int,
choices=range(31),
metavar="[0-30]",
choices=range(101),
metavar="[0-100]",
help=(
"Set the Known-Time of the uploaded data to be the timestamp of each data point, "
"plus the specified number of days as an offset. For instance, if the data is "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Signal(google.protobuf.message.Message):
READ_ONLY_FIELD_NUMBER: builtins.int
ENTITY_TYPES_FIELD_NUMBER: builtins.int
name: builtins.str
'Unique resource name of the raw data signal, e.g. `signals/signalIdentifier` or\n `signals/namespace.signalIdentifier`. The namespace must be empty (being global) or a\n namespace accessible to the customer.\n The signal identifier must match the regex `[a-zA-Z]\\w{0,63}`.\n '
'Unique resource name of the raw data signal, e.g. `signals/signalIdentifier` or\n `signals/namespace.signalIdentifier`. The namespace must be empty (being global) or a\n namespace accessible to the customer.\n The signal identifier must match the regex `[a-zA-Z]\\w{0,127}`.\n '
entity_type: builtins.str
'No longer in use.'
display_name: builtins.str
Expand Down
11 changes: 7 additions & 4 deletions exabel_data_sdk/tests/scripts/test_load_time_series_from_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,11 @@ def test_should_fail_with_invalid_signal_names(self):
"contains_!llegal_chars": "Signal name must start with a letter, "
'contain only letters, numbers, and underscores, but got "contains_!llegal_chars"',
"": "Signal name cannot be empty",
"signal_with_sixty_five_characters_in_length_which_more_than_max__": "Signal name "
"cannot be longer than 64 characters, but got "
'"signal_with_sixty_five_characters_in_length_which_more_than_max__"',
"signal_with_length_of_one_hundred_and_twenty_nine_characters_in_identifier_part_of_"
"resource_name_which_is_more_than_maximum_129__": "Signal name "
"cannot be longer than 128 characters, but got "
'"signal_with_length_of_one_hundred_and_twenty_nine_characters_in_identifier_part_of_'
'resource_name_which_is_more_than_maximum_129__"',
}

for signal, error in signals_errors.items():
Expand All @@ -482,7 +484,8 @@ def test_valid_signal_names(self):
"SIGNAL",
"signal_with_underscores",
"signal_1_with_underscores_and_numbers",
"signal_with_sixty_four_characters_in_length_which_is_the_maximum",
"signal_with_length_of_one_hundred_and_twenty_eight_characters_in_identifier_part_of_"
"resource_name_which_is_the_maximum_128_chars",
]

for signal in valid_signals:
Expand Down
6 changes: 3 additions & 3 deletions exabel_data_sdk/util/resource_name_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ def validate_signal_name(name: str) -> None:
"""
if not name:
raise ValueError("Signal name cannot be empty")
if len(name) > 64:
raise ValueError(f'Signal name cannot be longer than 64 characters, but got "{name}"')
if not re.match(r"^[a-zA-Z]\w{0,63}$", name):
if len(name) > 128:
raise ValueError(f'Signal name cannot be longer than 128 characters, but got "{name}"')
if not re.match(r"^[a-zA-Z]\w{0,127}$", name):
raise ValueError(
f"Signal name must start with a letter, contain only letters, "
f'numbers, and underscores, but got "{name}"'
Expand Down