Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Raalsky committed Aug 21, 2024
1 parent e35876c commit cceddab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/neptune_scale/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ def __init__(
if resume and from_step is not None:
raise ValueError("`resume` and `from_step` cannot be used together.")

if max_queue_size < 1:
raise ValueError("`max_queue_size` must be greater than 0.")

project = project or os.environ.get(PROJECT_ENV_NAME)
verify_non_empty("project", project)
assert project is not None # mypy
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_metadata_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def test_splitting():
result = list(builder)

# then
assert len(result) > 0
assert len(result) > 1

# Every message should be smaller than max_size
assert all(len(op.SerializeToString()) <= max_size for op in result)
Expand Down Expand Up @@ -242,7 +242,7 @@ def test_split_large_tags():
result = list(builder)

# then
assert len(result) > 0
assert len(result) > 1

# Every message should be smaller than max_size
assert all(len(op.SerializeToString()) <= max_size for op in result)
Expand Down

0 comments on commit cceddab

Please sign in to comment.