From b735d6090f21fadcd65f03a0062c0e538d49552f Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 11:07:46 +0100 Subject: [PATCH 01/11] mise venv for local development --- .gitignore | 1 + .mise.toml | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 .mise.toml diff --git a/.gitignore b/.gitignore index 0211f3ae..ccadd9ee 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ build .idea/ .python-version venv +.venv diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 00000000..bb4904ac --- /dev/null +++ b/.mise.toml @@ -0,0 +1,13 @@ +[env] +MISE_FETCH_REMOTE_VERSIONS_TIMEOUT = "30s" + +_.python.venv = { + path = ".venv", + create = true, +} + +[tools] +python = "3.9" + +[tasks.test] +run = 'make install test' From aa04d43928b0c83015698c0aeb1754abb0749dc0 Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 11:08:10 +0100 Subject: [PATCH 02/11] Test with more recent Python 3.x versions --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da2daf6d..8b5ea537 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14] steps: - uses: actions/checkout@v2 From 7edc1598e697dd5915aefe2e010ffadbd53a11a7 Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 11:30:29 +0100 Subject: [PATCH 03/11] Sync setup and test matrix Python versions --- .github/workflows/test.yml | 2 +- setup.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b5ea537..4fb84ccc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - python-version: [3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14] + python-version: [3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index 143a9ab5..7f7048b7 100644 --- a/setup.py +++ b/setup.py @@ -56,5 +56,10 @@ "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", ], ) From 01bff49f1a2a99d0a3e99c66b6c8dafdbc565de9 Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 13:36:44 +0100 Subject: [PATCH 04/11] Update GHA; quote Python versions in test matrix --- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 6 +++--- requirements.txt | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 requirements.txt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 871263d5..1f28c5c0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fb84ccc..a3245a29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,12 +8,12 @@ jobs: strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14] + python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ] 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' diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..c9aa3cc8 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +backoff==2.2.1 +monotonic==1.6 +mock==2.0.0 +pylint==3.3.3 +python-dateutil==2.8.2 +requests>=2.32.2 \ No newline at end of file From e866debadea78f1d3b2be943d2dc0335c7379abd Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 13:42:10 +0100 Subject: [PATCH 05/11] Python 3.6 is not supported by newer setup-python action --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a3245a29..2081dc18 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ] + python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ] steps: - uses: actions/checkout@v6 From e068f47b9500bb9f6d28a4ee60184d1b0d244faa Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 13:46:18 +0100 Subject: [PATCH 06/11] Downgrade setup-python, re-enable Python 3.6, and run whole test matrix on failure --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2081dc18..de3b1bff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,13 +7,14 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ] + python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ] steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'pip' From 880bd73164e8276c705e071ae999cd53b8723009 Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 13:54:08 +0100 Subject: [PATCH 07/11] Split linting out from tests --- .github/workflows/lint.yml | 19 +++++++++++++++++++ .mise.toml | 3 +++ Makefile | 6 ++++-- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..565e7cb2 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,19 @@ +name: Test + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: 'pip' + cache-dependency-path: setup.py + + - run: pip3 install -e '.[test]' + - run: make lint diff --git a/.mise.toml b/.mise.toml index bb4904ac..4522c872 100644 --- a/.mise.toml +++ b/.mise.toml @@ -11,3 +11,6 @@ python = "3.9" [tasks.test] run = 'make install test' + +[tasks.lint] +run = 'make install lint' diff --git a/Makefile b/Makefile index 8ea2abef..885bed58 100644 --- a/Makefile +++ b/Makefile @@ -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 From d7873feab11f426bfa2d86c192f2aa0c546fd487 Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 13:59:49 +0100 Subject: [PATCH 08/11] Remove Python 3.6, 3.7 from test matrix --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de3b1bff..adb4a249 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,12 +9,12 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ] + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ] steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: 'pip' From c747ab137e6029bdf5aa61453795fc389bd49fbf Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 14:00:32 +0100 Subject: [PATCH 09/11] Bump setup-python in lint too --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 565e7cb2..e06f1cba 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: "3.10" cache: 'pip' From c65edf8c49aa17ceddb56b4deeb950f127865874 Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 14:02:08 +0100 Subject: [PATCH 10/11] Typo --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e06f1cba..ab54ed3c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: Test +name: Lint on: [push] From 5a8da0c53c29c80d1f4c41d445bcffb1c46123b6 Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Wed, 17 Jun 2026 14:03:01 +0100 Subject: [PATCH 11/11] Another typo --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ab54ed3c..be41a45e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,7 +3,7 @@ name: Lint on: [push] jobs: - test: + lint: runs-on: ubuntu-latest steps: