Skip to content

DOC-5472 time series doc examples#3443

Merged
ndyakov merged 10 commits into
redis:masterfrom
andy-stark-redis:DOC-5472-time-series-doc-examples
Aug 4, 2025
Merged

DOC-5472 time series doc examples#3443
ndyakov merged 10 commits into
redis:masterfrom
andy-stark-redis:DOC-5472-time-series-doc-examples

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

DOC-5472

Go versions of the Python examples in the time series doc page.

Couple of things to note:

  • I've assumed that using 0 and math.MaxInt64 instead of - and + for minimum/maximum timestamps is OK (eg, line 211), but if there's a better way to specify this then let me know.
  • Some of the TSMGet/TSMRange examples return maps, so the ordering keys in nondeterministic. I've used code that's a bit more complicated than usual to print out the results in a deterministic way (eg, the example at line 438). If there's a simpler or more idiomatic way to handle this situation then I'll use that instead.

@andy-stark-redis andy-stark-redis marked this pull request as ready for review July 23, 2025 12:14
@andy-stark-redis andy-stark-redis requested a review from ndyakov July 23, 2025 12:14
@ndyakov

ndyakov commented Jul 24, 2025

Copy link
Copy Markdown
Member

Hello @andy-stark-redis , I will review this till end of week. Thank you.

@ndyakov ndyakov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andy-stark-redis I left some styling suggestions on the first occurrences of the patterns that I observed. Feel free to address them for the rest of the examples. Mainly - remove empty lines before checking the error and if the method arguments are on multiple lines, keep them one per line. Other than that, looks good to me.

Comment thread doctests/timeseries_tut_test.go Outdated
Comment thread doctests/timeseries_tut_test.go Outdated
Comment thread doctests/timeseries_tut_test.go Outdated
Comment thread doctests/timeseries_tut_test.go Outdated
Comment thread doctests/timeseries_tut_test.go
Comment thread doctests/timeseries_tut_test.go Outdated
Comment thread doctests/timeseries_tut_test.go Outdated
Comment thread doctests/timeseries_tut_test.go Outdated
Comment thread doctests/timeseries_tut_test.go Outdated

@ndyakov ndyakov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@ndyakov ndyakov merged commit 421c8a4 into redis:master Aug 4, 2025
20 checks passed
ofekshenawa pushed a commit that referenced this pull request Aug 10, 2025
* DOC-5472 added and fixed tests up to

* DOC-5472 added agg bucket examples

* DOC-5472 time series doc examples

* DOC-5472 removed black lines above error checks, following feedback

* DOC-5472 fixed param formatting, following feedback

---------

Co-authored-by: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants