From cd94335777ba5d65532d1e28703049af7fb31483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Fri, 19 Jul 2024 18:21:07 -0600 Subject: [PATCH 1/3] docs: Document that `get_starting_timestamp` requires setting a non-null replication_key --- singer_sdk/streams/core.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/singer_sdk/streams/core.py b/singer_sdk/streams/core.py index c588a9729..9dd394a5d 100644 --- a/singer_sdk/streams/core.py +++ b/singer_sdk/streams/core.py @@ -249,6 +249,11 @@ def get_starting_replication_key_value( Returns: Starting replication value. + + .. warning:: + + This method requires :meth:`~singer_sdk.Stream.replication_key` to be set + to a non-null value, indicating the stream should be synced incrementally. """ state = self.get_context_state(context) @@ -280,6 +285,11 @@ def get_starting_timestamp( Raises: ValueError: If the replication value is not a valid timestamp. + + .. warning:: + + This method requires :meth:`~singer_sdk.Stream.replication_key` to be set + to a non-null value, indicating the stream should be synced incrementally. """ value = self.get_starting_replication_key_value(context) From b7e50ca0d7970ef6f02d0ce9bda551087d8d0523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Fri, 19 Jul 2024 18:23:51 -0600 Subject: [PATCH 2/3] Use `note` admonition --- singer_sdk/streams/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/singer_sdk/streams/core.py b/singer_sdk/streams/core.py index 9dd394a5d..e62b6de1f 100644 --- a/singer_sdk/streams/core.py +++ b/singer_sdk/streams/core.py @@ -250,7 +250,7 @@ def get_starting_replication_key_value( Returns: Starting replication value. - .. warning:: + .. note:: This method requires :meth:`~singer_sdk.Stream.replication_key` to be set to a non-null value, indicating the stream should be synced incrementally. @@ -286,7 +286,7 @@ def get_starting_timestamp( Raises: ValueError: If the replication value is not a valid timestamp. - .. warning:: + .. note:: This method requires :meth:`~singer_sdk.Stream.replication_key` to be set to a non-null value, indicating the stream should be synced incrementally. From 66c80467173c074b6303c8930f82cd9627372e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Fri, 19 Jul 2024 18:24:59 -0600 Subject: [PATCH 3/3] Reference as attribute --- singer_sdk/streams/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/singer_sdk/streams/core.py b/singer_sdk/streams/core.py index e62b6de1f..ed9052ae0 100644 --- a/singer_sdk/streams/core.py +++ b/singer_sdk/streams/core.py @@ -252,7 +252,7 @@ def get_starting_replication_key_value( .. note:: - This method requires :meth:`~singer_sdk.Stream.replication_key` to be set + This method requires :attr:`~singer_sdk.Stream.replication_key` to be set to a non-null value, indicating the stream should be synced incrementally. """ state = self.get_context_state(context) @@ -288,7 +288,7 @@ def get_starting_timestamp( .. note:: - This method requires :meth:`~singer_sdk.Stream.replication_key` to be set + This method requires :attr:`~singer_sdk.Stream.replication_key` to be set to a non-null value, indicating the stream should be synced incrementally. """ value = self.get_starting_replication_key_value(context)