Skip to content

Commit

Permalink
Merge branch 'release/0.14.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Keene committed Mar 21, 2023
2 parents e962e83 + b04e35a commit 5d33568
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 29 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4

- name: Get tag and tracker versions
id: version
Expand All @@ -40,10 +40,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -57,7 +57,7 @@ jobs:
python setup.py sdist bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: distfiles_${{ github.run_id }}
path: dist
Expand All @@ -68,15 +68,15 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: distfiles_${{ github.run_id }}
path: ${{ github.workspace }}/dist
Expand All @@ -100,7 +100,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Release
uses: softprops/action-gh-release@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master

- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Version 0.14.0 (2023-03-21)
---------------------------
Adds deprecation warnings for V1 changes (#315)
Update GH actions to use Node16 (#317)
Adds event store parameter to Snowplow interface (#320)
Adds missing parameters to async emitter (#323)

Version 0.13.0 (2023-01-24)
---------------------------
Adds Snowplow Interface (#295)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
author = 'Alex Dean, Paul Boocock, Matus Tomlein, Jack Keene'

# The full version, including alpha/beta/rc tags
release = "0.13"
release = "0.14"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

setup(
name="snowplow-tracker",
version="0.13.0",
version="0.14.0",
author=authors_str,
author_email=authors_email_str,
packages=[
Expand Down
2 changes: 1 addition & 1 deletion snowplow_tracker/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
# language governing permissions and limitations there under.
# """

__version_info__ = (0, 13, 0)
__version_info__ = (0, 14, 0)
__version__ = ".".join(str(x) for x in __version_info__)
__build_version__ = __version__ + ""
7 changes: 6 additions & 1 deletion snowplow_tracker/celery/celery_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import logging
from typing import Any, Optional
from warnings import warn

from snowplow_tracker.emitters import Emitter
from snowplow_tracker.typing import HttpProtocol, Method
Expand All @@ -41,7 +42,6 @@ class CeleryEmitter(Emitter):
"""

if _CELERY_OPT:

celery_app = None

def __init__(
Expand All @@ -53,6 +53,11 @@ def __init__(
batch_size: Optional[int] = None,
byte_limit: Optional[int] = None,
) -> None:
warn(
"The Celery Emitter will be deprecated in future versions.",
DeprecationWarning,
stacklevel=2,
)
super(CeleryEmitter, self).__init__(
endpoint, protocol, port, method, batch_size, None, None, byte_limit
)
Expand Down
26 changes: 15 additions & 11 deletions snowplow_tracker/emitters.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,10 @@ def __init__(
on_failure: Optional[FailureCallback] = None,
thread_count: int = 1,
byte_limit: Optional[int] = None,
request_timeout: Optional[Union[float, Tuple[float, float]]] = None,
max_retry_delay_seconds: int = 60,
buffer_capacity: int = None,
custom_retry_codes: Dict[int, bool] = {},
event_store: Optional[EventStore] = None,
) -> None:
"""
Expand Down Expand Up @@ -476,17 +478,19 @@ def __init__(
:type event_store: EventStore
"""
super(AsyncEmitter, self).__init__(
endpoint,
protocol,
port,
method,
batch_size,
on_success,
on_failure,
byte_limit,
max_retry_delay_seconds,
buffer_capacity,
event_store,
endpoint=endpoint,
protocol=protocol,
port=port,
method=method,
batch_size=batch_size,
on_success=on_success,
on_failure=on_failure,
byte_limit=byte_limit,
request_timeout=request_timeout,
max_retry_delay_seconds=max_retry_delay_seconds,
buffer_capacity=buffer_capacity,
custom_retry_codes=custom_retry_codes,
event_store=event_store,
)
self.queue = Queue()
for i in range(thread_count):
Expand Down
6 changes: 6 additions & 0 deletions snowplow_tracker/redis/redis_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import json
import logging
from typing import Any, Optional
from warnings import warn
from snowplow_tracker.typing import PayloadDict, RedisProtocol

_REDIS_OPT = True
Expand Down Expand Up @@ -48,6 +49,11 @@ def __init__(
:param key: The Redis key for the list of events
:type key: string
"""
warn(
"The Redis Emitter will be deprecated in future versions.",
DeprecationWarning,
stacklevel=2,
)
if rdb is None:
rdb = redis.StrictRedis()

Expand Down
1 change: 1 addition & 0 deletions snowplow_tracker/snowplow.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def create_tracker(
byte_limit=emitter_config.byte_limit,
request_timeout=emitter_config.request_timeout,
custom_retry_codes=emitter_config.custom_retry_codes,
event_store=emitter_config.event_store,
)

tracker = Tracker(
Expand Down
20 changes: 20 additions & 0 deletions snowplow_tracker/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ def track_add_to_cart(
:type event_subject: subject | None
:rtype: tracker
"""
warn(
"track_add_to_cart will be deprecated in future versions.",
DeprecationWarning,
stacklevel=2,
)
non_empty_string(sku)

properties = {}
Expand Down Expand Up @@ -400,6 +405,11 @@ def track_remove_from_cart(
:type event_subject: subject | None
:rtype: tracker
"""
warn(
"track_remove_from_cart will be deprecated in future versions.",
DeprecationWarning,
stacklevel=2,
)
non_empty_string(sku)

properties = {}
Expand Down Expand Up @@ -606,6 +616,11 @@ def track_ecommerce_transaction_item(
:type event_subject: subject | None
:rtype: tracker
"""
warn(
"track_ecommerce_transaction_item will be deprecated in future versions.",
DeprecationWarning,
stacklevel=2,
)
non_empty_string(order_id)
non_empty_string(sku)

Expand Down Expand Up @@ -666,6 +681,11 @@ def track_ecommerce_transaction(
:type event_subject: subject | None
:rtype: tracker
"""
warn(
"track_ecommerce_transaction will be deprecated in future versions.",
DeprecationWarning,
stacklevel=2,
)
non_empty_string(order_id)

pb = payload.Payload()
Expand Down

0 comments on commit 5d33568

Please sign in to comment.