Skip to content

Commit

Permalink
perf: quince release support (#47)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: add compatibility with Quince release

* fix(import): update URLs in favor of re_path for deprecation

* perf: update requirements

* fix: remove 3.10 version test

* perf: update workflows and readme

* fix: fix AttributeError to non-string uid

* perf: update tests

* perf:  update codelytv/pr-size-labeler

* perf: add django32, django42 file requirements

* perf: update Django version constrain

* fix: update python test version

* perf: update readme and constraints

* perf: update constraints

* perf: update requirements

* perf: update tox
  • Loading branch information
luisfelipec95 committed Feb 9, 2024
1 parent 9f55b21 commit 74cbf8e
Show file tree
Hide file tree
Showing 16 changed files with 90 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bumpversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
default_prerelease_bump: false
dry_run: true
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Create bumpversion
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
name: Label the PR size
steps:
- uses: CodelyTV/pr-size-labeler@v1
- uses: CodelyTV/pr-size-labeler@v1.7.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_max_size: '10'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.1
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v4.1.1
with:
python-version: '3.10'
- name: Install dependencies
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: ["3.8", "3.10", "3.11"]
django: ["32"]
python-version: ["3.8"]
django: ["32", "42"]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.1.1

- name: Cache dependency
uses: actions/cache@v3
uses: actions/cache@v4.0.0
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements/test.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ matrix.python-version }}

Expand Down
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Compatibility Notes
+-------------------+----------------+
| Palm | >= 5.0 |
+-------------------+----------------+
| Quince | >= 6.0 |
+-------------------+----------------+

The following changes to the plugin settings are necessary. If the release you are looking for is
not listed, then the accumulation of changes from previous releases is enough.
Expand Down Expand Up @@ -86,7 +88,7 @@ not listed, then the accumulation of changes from previous releases is enough.
EOX_HOOKS_COURSE_MODES_BACKEND: "eox_hooks.edxapp_wrapper.backends.course_modes_l_v1"
EOX_HOOKS_MODELS_BACKEND: "eox_hooks.edxapp_wrapper.backends.models_l_v1"
**Palm**
**Palm and Quince**

.. code-block:: yaml
Expand Down
2 changes: 1 addition & 1 deletion eox_hooks/receivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def hooks_handler(sender, signal, **kwargs):

trigger_event = None
for uid in _get_dispatch_uid(signal.receivers):
if uid.startswith('eox-hooks:'):
if str(uid).startswith('eox-hooks:'):
trigger_event = uid.split(':')[1]
break

Expand Down
4 changes: 2 additions & 2 deletions eox_hooks/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.urls import re_path

from eox_hooks import views

urlpatterns = [
url(r'^eox-info$', views.info_view, name='eox-info'),
re_path(r'^eox-info$', views.info_view, name='eox-info'),
]
38 changes: 23 additions & 15 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
Expand All @@ -8,11 +8,16 @@ amqp==5.2.0
# via kombu
asgiref==3.7.2
# via django
attrs==23.1.0
attrs==23.2.0
# via openedx-events
backports-zoneinfo[tzdata]==0.2.1
# via
# celery
# django
# kombu
billiard==4.2.0
# via celery
celery==5.3.5
celery==5.3.6
# via
# -c requirements/constraints.txt
# -r requirements/base.in
Expand All @@ -28,7 +33,7 @@ click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
django==3.2.23
django==4.2.10
# via
# -c requirements/constraints.txt
# -r requirements/base.in
Expand All @@ -37,50 +42,53 @@ django==3.2.23
# openedx-events
django-crum==0.7.9
# via -r requirements/base.in
djangorestframework==3.12.4
djangorestframework==3.14.0
# via
# -c requirements/constraints.txt
# -r requirements/base.in
edx-opaque-keys[django]==2.5.1
# via
# -r requirements/base.in
# openedx-events
fastavro==1.9.0
fastavro==1.9.3
# via openedx-events
kombu==5.3.4
kombu==5.3.5
# via celery
openedx-events==4.1.1
openedx-events==9.0.0
# via
# -c requirements/constraints.txt
# -r requirements/base.in
pbr==6.0.0
# via stevedore
prompt-toolkit==3.0.41
prompt-toolkit==3.0.43
# via click-repl
pymongo==3.13.0
# via edx-opaque-keys
python-dateutil==2.8.2
# via celery
pytz==2022.2.1
pytz==2022.7.1
# via
# -c requirements/constraints.txt
# django
# djangorestframework
six==1.16.0
# via python-dateutil
sqlparse==0.4.4
# via django
stevedore==5.1.0
# via edx-opaque-keys
typing-extensions==4.8.0
typing-extensions==4.9.0
# via
# asgiref
# edx-opaque-keys
tzdata==2023.3
# via celery
# kombu
tzdata==2023.4
# via
# backports-zoneinfo
# celery
vine==5.1.0
# via
# amqp
# celery
# kombu
wcwidth==0.2.10
wcwidth==0.2.13
# via prompt-toolkit
8 changes: 4 additions & 4 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Keep same platform version
celery>=5.2.2,<6.0.0
djangorestframework<3.13.0
Django<3.3
openedx-events==4.1.1
pytz==2022.2.1
djangorestframework<=3.14.0
Django<5.0
openedx-events<=9.0.0
pytz<=2022.7.1
1 change: 0 additions & 1 deletion requirements/django.txt

This file was deleted.

1 change: 1 addition & 0 deletions requirements/django32.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
django==3.2.23
1 change: 1 addition & 0 deletions requirements/django42.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Django==4.2.8
8 changes: 6 additions & 2 deletions requirements/pip-tools.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
Expand All @@ -8,6 +8,8 @@ build==1.0.3
# via pip-tools
click==8.1.7
# via pip-tools
importlib-metadata==7.0.1
# via build
packaging==23.2
# via build
pip-tools==7.3.0
Expand All @@ -19,8 +21,10 @@ tomli==2.0.1
# build
# pip-tools
# pyproject-hooks
wheel==0.41.3
wheel==0.42.0
# via pip-tools
zipp==3.17.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
53 changes: 31 additions & 22 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
Expand All @@ -12,21 +12,27 @@ asgiref==3.7.2
# via
# -r requirements/base.txt
# django
astroid==3.0.1
astroid==3.0.3
# via pylint
attrs==23.1.0
attrs==23.2.0
# via
# -r requirements/base.txt
# openedx-events
backports-zoneinfo[tzdata]==0.2.1
# via
# -r requirements/base.txt
# celery
# django
# kombu
billiard==4.2.0
# via
# -r requirements/base.txt
# celery
celery==5.3.5
celery==5.3.6
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
certifi==2023.7.22
certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
Expand All @@ -49,9 +55,9 @@ click-repl==0.3.0
# via
# -r requirements/base.txt
# celery
coverage==7.3.2
coverage==7.4.1
# via -r requirements/test.in
dill==0.3.7
dill==0.3.8
# via pylint
# via
# -c requirements/constraints.txt
Expand All @@ -61,47 +67,47 @@ dill==0.3.7
# openedx-events
django-crum==0.7.9
# via -r requirements/base.txt
djangorestframework==3.12.4
djangorestframework==3.14.0
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
edx-opaque-keys[django]==2.5.1
# via
# -r requirements/base.txt
# openedx-events
fastavro==1.9.0
fastavro==1.9.3
# via
# -r requirements/base.txt
# openedx-events
idna==3.4
idna==3.6
# via requests
isort==5.12.0
isort==5.13.2
# via pylint
kombu==5.3.4
kombu==5.3.5
# via
# -r requirements/base.txt
# celery
mccabe==0.7.0
# via pylint
mock==5.1.0
# via -r requirements/test.in
openedx-events==4.1.1
openedx-events==9.0.0
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
pbr==6.0.0
# via
# -r requirements/base.txt
# stevedore
platformdirs==4.0.0
platformdirs==4.2.0
# via pylint
prompt-toolkit==3.0.41
prompt-toolkit==3.0.43
# via
# -r requirements/base.txt
# click-repl
pycodestyle==2.11.1
# via -r requirements/test.in
pylint==3.0.2
pylint==3.0.3
# via -r requirements/test.in
pymongo==3.13.0
# via
Expand All @@ -111,11 +117,11 @@ python-dateutil==2.8.2
# via
# -r requirements/base.txt
# celery
pytz==2022.2.1
pytz==2022.7.1
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# django
# djangorestframework
requests==2.31.0
# via -r requirements/test.in
six==1.16.0
Expand All @@ -136,25 +142,28 @@ tomli==2.0.1
# via pylint
tomlkit==0.12.3
# via pylint
typing-extensions==4.8.0
typing-extensions==4.9.0
# via
# -r requirements/base.txt
# asgiref
# astroid
# edx-opaque-keys
tzdata==2023.3
# kombu
# pylint
tzdata==2023.4
# via
# -r requirements/base.txt
# backports-zoneinfo
# celery
urllib3==2.1.0
urllib3==2.2.0
# via requests
vine==5.1.0
# via
# -r requirements/base.txt
# amqp
# celery
# kombu
wcwidth==0.2.10
wcwidth==0.2.13
# via
# -r requirements/base.txt
# prompt-toolkit
Loading

0 comments on commit 74cbf8e

Please sign in to comment.