Skip to content

Commit b3b026c

Browse files
authored
docs: consistent wording and styling (#102)
1 parent 1c3ae20 commit b3b026c

4 files changed

Lines changed: 25 additions & 31 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ jobs:
2929
const title = context.payload.pull_request.title;
3030
const labels = context.payload.pull_request.labels.map(l => l.name);
3131
if (labels.includes('dev')) {
32-
const regex = /^(?!feat|fix|refactor|doc|perf|style|test|chore|revert)[a-z].*$/;
32+
const regex = /^(?!feat|fix|refactor|docs|perf|style|test|chore|revert)[a-z].*$/;
3333
if (!regex.test(title)) {
3434
core.setFailed(
3535
`PR title "${title}" does not match the commit format for non-user-facing changes`
3636
);
3737
}
3838
} else {
39-
const regex = /^(feat|fix|refactor|doc|perf|style|test|chore|revert)!?:[ ][a-z].*$/;
39+
const regex = /^(feat|fix|refactor|docs|perf|style|test|chore|revert)!?:[ ][a-z].*$/;
4040
if (!regex.test(title)) {
4141
core.setFailed(
4242
`PR title "${title}" does not match the expected conventional commit format for user-facing changes`

src/streamstore/_client.py

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ class S2:
149149
150150
Args:
151151
access_token: Access token generated from `S2 dashboard <https://s2.dev/dashboard>`_.
152-
endpoints: S2 endpoints. If None, public endpoints for S2 service running in AWS cloud will be used.
153-
request_timeout: Timeout for requests made by the client. Default value is 5 seconds.
154-
max_retries: Maximum number of retries for a request. Default value is 3.
152+
endpoints: S2 endpoints. If not specified, public endpoints for S2 service running in AWS cloud will be used.
153+
request_timeout: Timeout for requests made by the client. Default value is ``5`` seconds.
154+
max_retries: Maximum number of retries for a request. Default value is ``3``.
155155
enable_append_retries: Enable retries for appends i.e for both :meth:`.Stream.append` and
156-
:meth:`.Stream.append_session`. Default value is True.
156+
:meth:`.Stream.append_session`. Default value is ``True``.
157157
enable_compression: Enable compression (Gzip) for :meth:`.Stream.append`, :meth:`.Stream.append_session`,
158-
:meth:`.Stream.read`, and :meth:`.Stream.read_session`. Default value is False.
158+
:meth:`.Stream.read`, and :meth:`.Stream.read_session`. Default value is ``False``.
159159
"""
160160

161161
__slots__ = (
@@ -249,7 +249,7 @@ async def create_basin(
249249
config: Configuration for the basin.
250250
251251
Note:
252-
**name** must be globally unique and must be between 8 and 48 characters, comprising lowercase
252+
``name`` must be globally unique and must be between 8 and 48 characters, comprising lowercase
253253
letters, numbers and hyphens. It cannot begin or end with a hyphen.
254254
"""
255255
_validate_basin(name)
@@ -307,18 +307,15 @@ async def list_basins(
307307
self,
308308
prefix: str = "",
309309
start_after: str = "",
310-
limit: int | None = None,
310+
limit: int = 1000,
311311
) -> schemas.Page[schemas.BasinInfo]:
312312
"""
313313
List basins.
314314
315315
Args:
316-
prefix: List only those that begin with this value.
317-
start_after: List only those that lexicographically start after this value,
318-
which can be the name of the last item from previous page, to continue from there.
319-
It must be greater than or equal to the prefix if specified.
320-
limit: Number of items to return in one page. Maximum number of items that can be
321-
returned in one page is 1000.
316+
prefix: Filter to basins whose name begins with this prefix.
317+
start_after: Filter to basins whose name starts lexicographically after this value.
318+
limit: Number of items to return per page, up to a maximum of 1000.
322319
"""
323320
request = ListBasinsRequest(prefix=prefix, start_after=start_after, limit=limit)
324321
response = await self._retrier(
@@ -424,7 +421,7 @@ async def issue_access_token(
424421
from stream names in responses.
425422
426423
Note:
427-
**id** must be unique to the account and between 1 and 96 bytes in length.
424+
``id`` must be unique to the account and between 1 and 96 bytes in length.
428425
"""
429426
request = IssueAccessTokenRequest(
430427
info=access_token_info_message(id, scope, auto_prefix_streams, expires_at)
@@ -446,8 +443,8 @@ async def list_access_tokens(
446443
447444
Args:
448445
prefix: Filter to access tokens whose ID begins with this prefix.
449-
start_after: Filter to access tokens whose ID lexicographically starts after this value.
450-
limit: Number of results, up to a maximum of 1000.
446+
start_after: Filter to access tokens whose ID starts lexicographically after this value.
447+
limit: Number of items to return per page, up to a maximum of 1000.
451448
"""
452449
request = ListAccessTokensRequest(
453450
prefix=prefix, start_after=start_after, limit=limit
@@ -536,8 +533,8 @@ async def create_stream(
536533
config: Configuration for the stream.
537534
538535
Note:
539-
**name** must be unique within the basin. It can be an arbitrary string upto 512 characters.
540-
Backslash (`/`) is recommended as a delimiter for hierarchical naming.
536+
``name`` must be unique within the basin. It can be an arbitrary string upto 512 characters.
537+
Backslash (``/``) is recommended as a delimiter for hierarchical naming.
541538
"""
542539
request = CreateStreamRequest(
543540
stream=name,
@@ -588,18 +585,15 @@ async def list_streams(
588585
self,
589586
prefix: str = "",
590587
start_after: str = "",
591-
limit: int | None = None,
588+
limit: int = 1000,
592589
) -> schemas.Page[schemas.StreamInfo]:
593590
"""
594591
List streams.
595592
596593
Args:
597-
prefix: List only those that begin with this value.
598-
start_after: List only those that lexicographically start after this value,
599-
which can be the name of the last item from previous page, to continue from there.
600-
It must be greater than or equal to the prefix if specified.
601-
limit: Number of items to return in one page. Maximum number of items that can be
602-
returned in one page is 1000.
594+
prefix: Filter to streams whose name begins with this prefix.
595+
start_after: Filter to streams whose name starts lexicographically after this value.
596+
limit: Number of items to return per page, up to a maximum of 1000.
603597
"""
604598
request = ListStreamsRequest(
605599
prefix=prefix, start_after=start_after, limit=limit

src/streamstore/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class Page(Generic[T]):
189189

190190
#: List of items of any type T.
191191
items: list[T]
192-
#: If True, it means that there are more pages.
192+
#: If ``True``, it means that there are more pages.
193193
has_more: bool
194194

195195

src/streamstore/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def trim(desired_first_seq_num: int) -> Record:
4040
preceeding records in the stream.
4141
4242
Note:
43-
If **desired_first_seq_num** was smaller than the sequence number for the first existing
43+
If ``desired_first_seq_num`` was smaller than the sequence number for the first existing
4444
record in the stream, trimming doesn't happen.
4545
"""
4646
return Record(
@@ -210,8 +210,8 @@ async def append_inputs_gen(
210210
max_linger_per_batch: Maximum duration for each batch to accumulate records before yielding.
211211
212212
Note:
213-
If **max_linger_per_batch** is ``None``, :class:`.AppendInput` will be yielded only
214-
when **max_records_per_batch** or **max_bytes_per_batch** is reached.
213+
If ``max_linger_per_batch`` is ``None``, :class:`.AppendInput` will be yielded only
214+
when ``max_records_per_batch`` or ``max_bytes_per_batch`` is reached.
215215
"""
216216
append_input_queue: Queue[AppendInput | None] = Queue()
217217
append_input_aiter = _AppendInputAsyncIterator(append_input_queue)

0 commit comments

Comments
 (0)