diff --git a/CHANGES.txt b/CHANGES.txt index 8b8f7b6..76b9bc2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +Version 1.0.1 (2023-07-12) +-------------------------- +Fix tstamp parameter in track_self_describing_event (#350) (Thanks to @andehen) + Version 1.0.0 (2023-06-16) -------------------------- Remove Redis and Celery Emitters (#335) diff --git a/docs/source/conf.py b/docs/source/conf.py index 187e0da..8594b73 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -28,7 +28,7 @@ author = 'Alex Dean, Paul Boocock, Matus Tomlein, Jack Keene' # The full version, including alpha/beta/rc tags -release = "1.0.0" +release = "1.0.1" # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index 253b231..3b124a3 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ setup( name="snowplow-tracker", - version="1.0.0", + version="1.0.1", author=authors_str, author_email=authors_email_str, packages=["snowplow_tracker", "snowplow_tracker.test", "snowplow_tracker.events"], diff --git a/snowplow_tracker/_version.py b/snowplow_tracker/_version.py index 60a0bd1..2289a3a 100644 --- a/snowplow_tracker/_version.py +++ b/snowplow_tracker/_version.py @@ -15,6 +15,6 @@ # language governing permissions and limitations there under. # """ -__version_info__ = (1, 0, 0) +__version_info__ = (1, 0, 1) __version__ = ".".join(str(x) for x in __version_info__) __build_version__ = __version__ + "" diff --git a/snowplow_tracker/test/unit/test_tracker.py b/snowplow_tracker/test/unit/test_tracker.py index 8eaf989..3009790 100644 --- a/snowplow_tracker/test/unit/test_tracker.py +++ b/snowplow_tracker/test/unit/test_tracker.py @@ -771,7 +771,7 @@ def test_track_link_click(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertIs(callArgs["context"][0], ctx) - self.assertEqual(callArgs["true_timestamp"], evTstamp) + self.assertEqual(callArgs["tstamp"], evTstamp) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_link_click_optional_none(self, mok_track_unstruct: Any) -> None: @@ -795,7 +795,7 @@ def test_track_link_click_optional_none(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertTrue(callArgs["context"] is None) - self.assertTrue(callArgs["true_timestamp"] is None) + self.assertTrue(callArgs["tstamp"] is None) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_add_to_cart(self, mok_track_unstruct: Any) -> None: @@ -835,7 +835,7 @@ def test_track_add_to_cart(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertIs(callArgs["context"][0], ctx) - self.assertEqual(callArgs["true_timestamp"], evTstamp) + self.assertEqual(callArgs["tstamp"], evTstamp) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_add_to_cart_optional_none(self, mok_track_unstruct: Any) -> None: @@ -857,7 +857,7 @@ def test_track_add_to_cart_optional_none(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertTrue(callArgs["context"] is None) - self.assertTrue(callArgs["true_timestamp"] is None) + self.assertTrue(callArgs["tstamp"] is None) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_remove_from_cart(self, mok_track_unstruct: Any) -> None: @@ -897,7 +897,7 @@ def test_track_remove_from_cart(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertIs(callArgs["context"][0], ctx) - self.assertEqual(callArgs["true_timestamp"], evTstamp) + self.assertEqual(callArgs["tstamp"], evTstamp) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_remove_from_cart_optional_none( @@ -921,7 +921,7 @@ def test_track_remove_from_cart_optional_none( self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertTrue(callArgs["context"] is None) - self.assertTrue(callArgs["true_timestamp"] is None) + self.assertTrue(callArgs["tstamp"] is None) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_form_change(self, mok_track_unstruct: Any) -> None: @@ -961,7 +961,7 @@ def test_track_form_change(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertIs(callArgs["context"][0], ctx) - self.assertEqual(callArgs["true_timestamp"], evTstamp) + self.assertEqual(callArgs["tstamp"], evTstamp) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_form_change_optional_none(self, mok_track_unstruct: Any) -> None: @@ -987,7 +987,7 @@ def test_track_form_change_optional_none(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertTrue(callArgs["context"] is None) - self.assertTrue(callArgs["true_timestamp"] is None) + self.assertTrue(callArgs["tstamp"] is None) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_form_submit(self, mok_track_unstruct: Any) -> None: @@ -1029,7 +1029,7 @@ def test_track_form_submit(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertIs(callArgs["context"][0], ctx) - self.assertEqual(callArgs["true_timestamp"], evTstamp) + self.assertEqual(callArgs["tstamp"], evTstamp) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_form_submit_invalid_element_type( @@ -1104,7 +1104,7 @@ def test_track_form_submit_invalid_element_type_disabled_contracts( self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertIs(callArgs["context"][0], ctx) - self.assertEqual(callArgs["true_timestamp"], evTstamp) + self.assertEqual(callArgs["tstamp"], evTstamp) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_form_submit_optional_none(self, mok_track_unstruct: Any) -> None: @@ -1122,7 +1122,7 @@ def test_track_form_submit_optional_none(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertTrue(callArgs["context"] is None) - self.assertTrue(callArgs["true_timestamp"] is None) + self.assertTrue(callArgs["tstamp"] is None) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_form_submit_empty_elems(self, mok_track_unstruct: Any) -> None: @@ -1170,7 +1170,7 @@ def test_track_site_search(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertIs(callArgs["context"][0], ctx) - self.assertEqual(callArgs["true_timestamp"], evTstamp) + self.assertEqual(callArgs["tstamp"], evTstamp) @mock.patch("snowplow_tracker.Tracker.track_self_describing_event") def test_track_site_search_optional_none(self, mok_track_unstruct: Any) -> None: @@ -1191,7 +1191,7 @@ def test_track_site_search_optional_none(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertTrue(callArgs["context"] is None) - self.assertTrue(callArgs["true_timestamp"] is None) + self.assertTrue(callArgs["tstamp"] is None) @mock.patch("snowplow_tracker.Tracker.track") def test_track_mobile_screen_view(self, mok_track: Any) -> None: @@ -1246,4 +1246,4 @@ def test_track_screen_view(self, mok_track_unstruct: Any) -> None: self.assertEqual(len(callArgs), 4) self.assertDictEqual(callArgs["event_json"].to_json(), expected) self.assertIs(callArgs["context"][0], ctx) - self.assertEqual(callArgs["true_timestamp"], evTstamp) + self.assertEqual(callArgs["tstamp"], evTstamp) diff --git a/snowplow_tracker/tracker.py b/snowplow_tracker/tracker.py index f0e92fd..2effe83 100644 --- a/snowplow_tracker/tracker.py +++ b/snowplow_tracker/tracker.py @@ -316,7 +316,7 @@ def track_link_click( self.track_self_describing_event( event_json=event_json, context=context, - true_timestamp=tstamp, + tstamp=tstamp, event_subject=event_subject, ) return self @@ -380,7 +380,7 @@ def track_add_to_cart( self.track_self_describing_event( event_json=event_json, context=context, - true_timestamp=tstamp, + tstamp=tstamp, event_subject=event_subject, ) return self @@ -444,7 +444,7 @@ def track_remove_from_cart( self.track_self_describing_event( event_json=event_json, context=context, - true_timestamp=tstamp, + tstamp=tstamp, event_subject=event_subject, ) return self @@ -510,7 +510,7 @@ def track_form_change( self.track_self_describing_event( event_json=event_json, context=context, - true_timestamp=tstamp, + tstamp=tstamp, event_subject=event_subject, ) return self @@ -563,7 +563,7 @@ def track_form_submit( self.track_self_describing_event( event_json=event_json, context=context, - true_timestamp=tstamp, + tstamp=tstamp, event_subject=event_subject, ) return self @@ -618,7 +618,7 @@ def track_site_search( self.track_self_describing_event( event_json=event_json, context=context, - true_timestamp=tstamp, + tstamp=tstamp, event_subject=event_subject, ) return self @@ -807,7 +807,7 @@ def track_screen_view( self.track_self_describing_event( event_json=event_json, context=context, - true_timestamp=tstamp, + tstamp=tstamp, event_subject=event_subject, ) return self @@ -992,7 +992,7 @@ def track_unstruct_event( self.track_self_describing_event( event_json=event_json, context=context, - true_timestamp=tstamp, + tstamp=tstamp, event_subject=event_subject, ) return self