diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a78feea..2bc03b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,8 @@ jobs: matrix: os: [ubuntu-20.04] python-version: - - "3.8" - '3.11' - toxenv: [celery53-django42] + toxenv: [celery54-django42] steps: - uses: actions/checkout@v2 diff --git a/Makefile b/Makefile index aef75d9..36a07b4 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy pip-compile --upgrade -o requirements/ci.txt requirements/ci.in pip-compile --upgrade -o requirements/dev.txt requirements/dev.in # Let tox control the Django version for tests - grep -e "^amqp==\|^anyjson==\|^billiard==\|^celery==\|^kombu==\|^click-didyoumean==\|^click-repl==\|^click==\|^prompt-toolkit==\|^vine==" requirements/base.txt > requirements/celery53.txt + grep -e "^amqp==\|^anyjson==\|^billiard==\|^celery==\|^kombu==\|^click-didyoumean==\|^click-repl==\|^click==\|^prompt-toolkit==\|^vine==" requirements/base.txt > requirements/celery54.txt sed -i.tmp '/^[d|D]jango==/d' requirements/test.txt sed -i.tmp '/^djangorestframework==/d' requirements/test.txt sed -i.tmp '/^amqp==/d' requirements/test.txt @@ -87,4 +87,3 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy sed -i.tmp '/^prompt-toolkit==/d' requirements/test.txt sed -i.tmp '/^vine==/d' requirements/test.txt rm requirements/test.txt.tmp - diff --git a/eventtracking/__init__.py b/eventtracking/__init__.py index 0dce1a4..5717b9a 100644 --- a/eventtracking/__init__.py +++ b/eventtracking/__init__.py @@ -1,3 +1,3 @@ """A simple event tracking library""" -__version__ = '2.4.1' +__version__ = '3.0.0' diff --git a/requirements/base.in b/requirements/base.in index ba4bd22..2d53b36 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -7,7 +7,7 @@ django pymongo>=4.0.0,<4.4.1 pytz six -celery<5.4.0 +celery edx-django-utils openedx-events>=9.5.1 edx-toggles diff --git a/requirements/base.txt b/requirements/base.txt index 9b21e58..bdf006f 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -10,15 +10,9 @@ asgiref==3.8.1 # via django attrs==23.2.0 # via openedx-events -backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # celery - # django - # kombu billiard==4.2.0 # via celery -celery==5.3.6 +celery==5.4.0 # via # -c requirements/constraints.txt # -r requirements/base.in @@ -40,7 +34,7 @@ click-repl==0.3.0 # via celery code-annotations==1.8.0 # via edx-toggles -django==4.2.13 +django==4.2.14 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in @@ -72,7 +66,7 @@ edx-opaque-keys[django]==2.10.0 # openedx-events edx-toggles==5.2.0 # via -r requirements/base.in -fastavro==1.9.4 +fastavro==1.9.5 # via openedx-events jinja2==3.1.4 # via code-annotations @@ -80,7 +74,7 @@ kombu==5.3.7 # via celery markupsafe==2.1.5 # via jinja2 -newrelic==9.11.0 +newrelic==9.12.0 # via edx-django-utils openedx-events==9.11.0 # via -r requirements/base.in @@ -111,7 +105,7 @@ six==1.16.0 # -r requirements/base.in # edx-ccx-keys # python-dateutil -sqlparse==0.5.0 +sqlparse==0.5.1 # via django stevedore==5.2.0 # via @@ -121,14 +115,9 @@ stevedore==5.2.0 text-unidecode==1.3 # via python-slugify typing-extensions==4.12.2 - # via - # asgiref - # edx-opaque-keys - # kombu + # via edx-opaque-keys tzdata==2024.1 - # via - # backports-zoneinfo - # celery + # via celery vine==5.1.0 # via # amqp diff --git a/requirements/celery53.txt b/requirements/celery54.txt similarity index 90% rename from requirements/celery53.txt rename to requirements/celery54.txt index 7531aee..957df4b 100644 --- a/requirements/celery53.txt +++ b/requirements/celery54.txt @@ -1,6 +1,6 @@ amqp==5.2.0 billiard==4.2.0 -celery==5.3.6 +celery==5.4.0 click==8.1.7 click-didyoumean==0.3.1 click-repl==0.3.0 diff --git a/requirements/ci.txt b/requirements/ci.txt index 0a69fbd..38c9e48 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,16 +1,16 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -cachetools==5.3.3 +cachetools==5.4.0 # via tox chardet==5.2.0 # via tox colorama==0.4.6 # via tox -coverage==7.5.4 +coverage==7.6.0 # via -r requirements/ci.in distlib==0.3.8 # via virtualenv @@ -30,11 +30,7 @@ pluggy==1.5.0 # via tox pyproject-api==1.7.1 # via tox -tomli==2.0.1 - # via - # pyproject-api - # tox -tox==4.15.1 +tox==4.16.0 # via -r requirements/ci.in virtualenv==20.26.3 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 7dcc20a..8990ec8 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -alabaster==0.7.13 +alabaster==0.7.16 # via sphinx amqp==5.2.0 # via @@ -14,7 +14,7 @@ asgiref==3.8.1 # via # -r requirements/test.txt # django -astroid==3.2.2 +astroid==3.2.4 # via # -r requirements/test.txt # pylint @@ -25,13 +25,6 @@ attrs==23.2.0 # openedx-events babel==2.15.0 # via sphinx -backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # -r requirements/test.txt - # celery - # django - # kombu billiard==4.2.0 # via # -r requirements/test.txt @@ -40,15 +33,15 @@ build==1.2.1 # via # -r requirements/pip-tools.txt # pip-tools -cachetools==5.3.3 +cachetools==5.4.0 # via # -r requirements/ci.txt # tox -celery==5.3.6 +celery==5.4.0 # via # -c requirements/constraints.txt # -r requirements/test.txt -certifi==2024.6.2 +certifi==2024.7.4 # via requests cffi==1.16.0 # via @@ -98,7 +91,7 @@ colorama==0.4.6 # via # -r requirements/ci.txt # tox -coverage[toml]==7.5.4 +coverage[toml]==7.6.0 # via # -r requirements/ci.txt # -r requirements/test.txt @@ -113,7 +106,7 @@ distlib==0.3.8 # via # -r requirements/ci.txt # virtualenv -django==4.2.13 +django==4.2.14 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt @@ -136,7 +129,7 @@ dnspython==2.6.1 # via # -r requirements/test.txt # pymongo -docutils==0.20.1 +docutils==0.21.2 # via sphinx edx-ccx-keys==1.3.0 # via @@ -147,7 +140,7 @@ edx-django-utils==5.14.2 # -r requirements/test.txt # edx-toggles # openedx-events -edx-lint==5.3.6 +edx-lint==5.3.7 # via # -r requirements/dev.in # -r requirements/test.txt @@ -158,11 +151,7 @@ edx-opaque-keys[django]==2.10.0 # openedx-events edx-toggles==5.2.0 # via -r requirements/test.txt -exceptiongroup==1.2.1 - # via - # -r requirements/test.txt - # pytest -fastavro==1.9.4 +fastavro==1.9.5 # via # -r requirements/test.txt # openedx-events @@ -175,12 +164,6 @@ idna==3.7 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==6.11.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/pip-tools.txt - # build - # sphinx iniconfig==2.0.0 # via # -r requirements/test.txt @@ -208,7 +191,7 @@ mccabe==0.7.0 # pylint mock==5.1.0 # via -r requirements/test.txt -newrelic==9.11.0 +newrelic==9.12.0 # via # -r requirements/test.txt # edx-django-utils @@ -263,7 +246,7 @@ pycparser==2.22 # cffi pygments==2.18.0 # via sphinx -pylint==3.2.4 +pylint==3.2.6 # via # -r requirements/test.txt # edx-lint @@ -300,7 +283,7 @@ pyproject-hooks==1.1.0 # -r requirements/pip-tools.txt # build # pip-tools -pytest==8.2.2 +pytest==8.3.1 # via # -r requirements/test.txt # pytest-cov @@ -315,9 +298,7 @@ python-slugify==8.0.4 # -r requirements/test.txt # code-annotations pytz==2024.1 - # via - # -r requirements/test.txt - # babel + # via -r requirements/test.txt pyyaml==6.0.1 # via # -r requirements/test.txt @@ -332,21 +313,21 @@ six==1.16.0 # python-dateutil snowballstemmer==2.2.0 # via sphinx -sphinx==7.1.2 +sphinx==7.4.7 # via -r requirements/dev.in -sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-applehelp==1.0.8 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==1.0.6 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.0.6 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==1.0.8 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==1.1.10 # via sphinx -sqlparse==0.5.0 +sqlparse==0.5.1 # via # -r requirements/test.txt # django @@ -360,38 +341,21 @@ text-unidecode==1.3 # via # -r requirements/test.txt # python-slugify -tomli==2.0.1 +tomlkit==0.13.0 # via - # -r requirements/ci.txt - # -r requirements/pip-tools.txt # -r requirements/test.txt - # build - # coverage - # pip-tools # pylint - # pyproject-api - # pytest - # tox -tomlkit==0.12.5 - # via - # -r requirements/test.txt - # pylint -tox==4.15.1 +tox==4.16.0 # via # -r requirements/ci.txt # -r requirements/dev.in typing-extensions==4.12.2 # via # -r requirements/test.txt - # asgiref - # astroid # edx-opaque-keys - # kombu - # pylint tzdata==2024.1 # via # -r requirements/test.txt - # backports-zoneinfo # celery urllib3==2.2.2 # via requests @@ -413,10 +377,6 @@ wheel==0.43.0 # via # -r requirements/pip-tools.txt # pip-tools -zipp==3.19.2 - # via - # -r requirements/pip-tools.txt - # importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 3058830..b544e9f 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -8,10 +8,6 @@ build==1.2.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==6.11.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # build packaging==24.1 # via build pip-tools==7.4.1 @@ -20,14 +16,8 @@ pyproject-hooks==1.1.0 # via # build # pip-tools -tomli==2.0.1 - # via - # build - # pip-tools wheel==0.43.0 # via pip-tools -zipp==3.19.2 - # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/pip.txt b/requirements/pip.txt index c7fd078..854334d 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -8,7 +8,7 @@ wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==24.1 +pip==24.1.2 # via -r requirements/pip.in -setuptools==70.1.1 +setuptools==71.1.0 # via -r requirements/pip.in diff --git a/requirements/test.txt b/requirements/test.txt index 527075d..bc56b78 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -11,7 +11,7 @@ asgiref==3.8.1 # via # -r requirements/base.txt # django -astroid==3.2.2 +astroid==3.2.4 # via # pylint # pylint-celery @@ -19,13 +19,6 @@ attrs==23.2.0 # via # -r requirements/base.txt # openedx-events -backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # -r requirements/base.txt - # celery - # django - # kombu # via # -r requirements/base.txt # celery @@ -63,7 +56,7 @@ code-annotations==1.8.0 # -r requirements/base.txt # edx-lint # edx-toggles -coverage[toml]==7.5.4 +coverage[toml]==7.6.0 # via pytest-cov ddt==1.7.2 # via -r requirements/test.in @@ -100,7 +93,7 @@ edx-django-utils==5.14.2 # -r requirements/base.txt # edx-toggles # openedx-events -edx-lint==5.3.6 +edx-lint==5.3.7 # via -r requirements/test.in edx-opaque-keys[django]==2.10.0 # via @@ -109,9 +102,7 @@ edx-opaque-keys[django]==2.10.0 # openedx-events edx-toggles==5.2.0 # via -r requirements/base.txt -exceptiongroup==1.2.1 - # via pytest -fastavro==1.9.4 +fastavro==1.9.5 # via # -r requirements/base.txt # openedx-events @@ -134,7 +125,7 @@ mccabe==0.7.0 # via pylint mock==5.1.0 # via -r requirements/test.in -newrelic==9.11.0 +newrelic==9.12.0 # via # -r requirements/base.txt # edx-django-utils @@ -163,7 +154,7 @@ pycparser==2.22 # via # -r requirements/base.txt # cffi -pylint==3.2.4 +pylint==3.2.6 # via # edx-lint # pylint-celery @@ -185,7 +176,7 @@ pynacl==1.5.0 # via # -r requirements/base.txt # edx-django-utils -pytest==8.2.2 +pytest==8.3.1 # via pytest-cov pytest-cov==5.0.0 # via -r requirements/test.in @@ -209,7 +200,7 @@ six==1.16.0 # edx-ccx-keys # edx-lint # python-dateutil -sqlparse==0.5.0 +sqlparse==0.5.1 # via # -r requirements/base.txt # django @@ -223,25 +214,15 @@ text-unidecode==1.3 # via # -r requirements/base.txt # python-slugify -tomli==2.0.1 - # via - # coverage - # pylint - # pytest -tomlkit==0.12.5 +tomlkit==0.13.0 # via pylint typing-extensions==4.12.2 # via # -r requirements/base.txt - # asgiref - # astroid # edx-opaque-keys - # kombu - # pylint tzdata==2024.1 # via # -r requirements/base.txt - # backports-zoneinfo # celery # via # -r requirements/base.txt diff --git a/tox.ini b/tox.ini index 7135de9..3dc6362 100644 --- a/tox.ini +++ b/tox.ini @@ -1,18 +1,17 @@ [tox] -envlist = py{38, 311}-celery{53}-django{42} +envlist = py{311}-celery{54}-django{42} [testenv] -setenv = +setenv = DJANGO_SETTINGS_MODULE = eventtracking.django.tests.settings PYTHONPATH = {toxinidir} -deps = - celery53: -r{toxinidir}/requirements/celery53.txt +deps = + celery54: -r{toxinidir}/requirements/celery54.txt django42: Django>=4.2,<4.3 -r{toxinidir}/requirements/test.txt -commands = - +commands = + pytest --cov-report=html --cov-report term-missing --cov-branch -k 'not integration and not performance' --cov-fail-under=95 --cov=eventtracking pytest --verbose -s -k 'integration' pycodestyle --config=setup.cfg eventtracking setup.py pylint --rcfile=pylintrc eventtracking setup.py -