Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint

on: [push]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: 'pip'
cache-dependency-path: setup.py

- run: pip3 install -e '.[test]'
- run: make lint
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- uses: actions/setup-python@v4
- uses: actions/setup-python@v6
with:
python-version: '3.x'
cache: 'pip'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

seems like 3.8 & 3.9 are also eol https://endoflife.date/python should we remove those as well?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think I would keep these for now, since they are still available in GitHub runners.


steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- uses: actions/setup-python@v4
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ build
.idea/
.python-version
venv
.venv
16 changes: 16 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[env]
MISE_FETCH_REMOTE_VERSIONS_TIMEOUT = "30s"

_.python.venv = {
path = ".venv",
create = true,
}

[tools]
python = "3.9"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

3.9 is eol already should we bump up?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, we should bump this one.


[tasks.test]
run = 'make install test'

[tasks.lint]
run = 'make install lint'
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ install:
pip install --edit .[test]

test:
python -m unittest customerio/analytics/test/*.py -v

lint:
pylint --rcfile=.pylintrc --reports=y --exit-zero customerio/analytics
flake8 --max-complexity=10 --statistics customerio/analytics || true
python -m unittest customerio/analytics/test/*.py -v

.PHONY: install test
.PHONY: install test lint
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Customer.io Data Pipelines analytics client for Python.
# Customer.io Data Pipelines analytics client for Python.

## Installation

Expand Down Expand Up @@ -40,6 +40,6 @@ analytics.track(user_id=4, event='order_complete')

The links below contain more detailed documentation on how to use this library:

* [Documentation](https://customer.io/docs/cdp/sources/connections/servers/python/)
* [Specs](https://customer.io/docs/cdp/sources/source-spec/source-events/)
* [Documentation](https://docs.customer.io/integrations/data-in/connections/servers/python/)
* [Specs](https://docs.customer.io/integrations/data-in/source-spec/incoming-data/)
* [PyPi](https://pypi.org/project/customerio-cdp-analytics/)
2 changes: 1 addition & 1 deletion customerio/analytics/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '0.0.2'
VERSION = '0.1.0'
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
backoff==2.2.1
flake8==3.7.9
monotonic==1.6
mock==2.0.0
pylint==3.3.3
python-dateutil==2.8.2
requests>=2.32.2
18 changes: 11 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
'''

install_requires = [
"requests~=2.7",
"monotonic~=1.5",
"backoff~=2.1",
"python-dateutil~=2.2"
"requests>=2.32.2",
"monotonic~=1.6",
"backoff~=2.2",
"python-dateutil~=2.8"
]

tests_require = [
"mock==2.0.0",
"pylint==2.8.0",
"pylint>=3.2.0",
"flake8==3.7.9",
]

Expand All @@ -38,6 +38,7 @@
maintainer_email='cdp@customer.io',
test_suite='analytics.test.all',
packages=['customerio.analytics'],
# Newer versions are not tested with Python 3.6 or 3.7.
python_requires='>=3.6.0',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should this also be bumped up to min version we test against?

@richdawe-cio richdawe-cio Jun 23, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think it would be a breaking change to bump the Python version here.

If that's the case, I suggest we bump the package version to 1.0.0.

license='MIT License',
install_requires=install_requires,
Expand All @@ -52,9 +53,12 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
],
)