Skip to content

Commit

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

* chore: update constraints & upgrade requirements

* fix: modify deprecated method

* fix: was mandatory to send any get_response

* chore: update github-actions

* docs: update README for showing quince support
  • Loading branch information
bra-i-am authored Jan 26, 2024
1 parent ef3edf1 commit 38970ba
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 51 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/bumpversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
previous_tag: ${{ steps.tag_version.outputs.previous_tag }}
bump_commit_sha: ${{ steps.bumpversion.outputs.commit_hash }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.DEDALO_PAT }}
- name: Get next version
Expand All @@ -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 Expand Up @@ -53,7 +53,7 @@ jobs:
tag: ${{ steps.tag_version.outputs.new_tag }}
changelog: ${{ steps.tag_version.outputs.changelog }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.DEDALO_PAT }}
- name: Create tag
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5.4.4
- uses: wagoid/commitlint-github-action@v5
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: ["3.8", "3.10"]
django: ["32"]
python-version: ["3.8", "3.10", "3.11"]
django: ["32","42"]

steps:
- name: Checkout
Expand All @@ -26,7 +26,7 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Compatibility Notes
+------------------+---------------------+
| Palm | >= 6.0 |
+------------------+---------------------+
| Quince | >= 7.0 |
+------------------+---------------------+

**NOTE**: From Lilac version Django 2.2 is not supported, you should use Django 3.2 and eox-tenant >=4.0.

Expand Down Expand Up @@ -58,8 +60,8 @@ Koa (optional)**
EOX_THEMING_EDXMAKO_BACKEND = 'eox_theming.edxapp_wrapper.backends.l_mako'
Lilac - Maple - Nutmeg - Olive - Palm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lilac - Maple - Nutmeg - Olive - Palm - Quince
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions eox_theming/management/urls.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""
eox_theming management urls
"""
from django.conf.urls import url
from django.urls import re_path

from eox_theming.management import views

urlpatterns = [
url(r'^eox-info$', views.info_view),
re_path(r'^eox-info$', views.info_view),
]
2 changes: 1 addition & 1 deletion eox_theming/tests/theming/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ def test_theme_selected(self, module_mock):
module_mock.return_value.return_value = site_theme

from eox_theming.theming.middleware import EoxThemeMiddleware # pylint: disable=import-outside-toplevel
EoxThemeMiddleware().process_request(request)
EoxThemeMiddleware(get_response=lambda req: None).process_request(request)

self.assertEqual(site_theme, request.site_theme) # pylint: disable=no-member
4 changes: 2 additions & 2 deletions eox_theming/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
eox_theming URL Configuration
"""
from django.conf.urls import include, url
from django.urls import include, re_path

urlpatterns = [
url(r'', include(('eox_theming.management.urls', 'eox_theming'), namespace='eox-theming-management')),
re_path(r'', include(('eox_theming.management.urls', 'eox_theming'), namespace='eox-theming-management')),
]
10 changes: 3 additions & 7 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# make upgrade
#
asgiref==3.7.2
# via django
django==3.2.23
django==4.2.9
# via
# -c requirements/constraints.txt
# -r requirements/base.in
eox-tenant==10.0.0
# via
# -c requirements/constraints.txt
# -r requirements/base.in
pytz==2022.7.1
# via
# -c requirements/constraints.txt
# django
six==1.16.0
# via -r requirements/base.in
sqlparse==0.4.4
# via django
typing-extensions==4.8.0
typing-extensions==4.9.0
# via asgiref
4 changes: 2 additions & 2 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# linking to it here is good.

# Keep same platform version
Django<4.0
Django<5.0
pylint<2.16.0
pycodestyle<2.9.0
pytz<2023
click<9.0

# Version used in Palm version of eox-tenant
eox-tenant>= 10.0.0
File renamed without changes.
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
12 changes: 5 additions & 7 deletions requirements/pip-tools.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# make upgrade
#
build==1.0.3
# via pip-tools
click==8.1.7
# via pip-tools
importlib-metadata==6.8.0
# via build
# via
# -c requirements/constraints.txt
# pip-tools
packaging==23.2
# via build
pip-tools==7.3.0
Expand All @@ -21,10 +21,8 @@ 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
20 changes: 7 additions & 13 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.8
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# make upgrade
Expand All @@ -12,7 +12,7 @@ astroid==2.13.5
# via
# -r requirements/test.in
# pylint
coverage==7.3.2
coverage==7.4.0
# via -r requirements/test.in
dill==0.3.7
# via pylint
Expand All @@ -24,9 +24,9 @@ eox-tenant==10.0.0
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
isort==5.12.0
isort==5.13.2
# via pylint
lazy-object-proxy==1.9.0
lazy-object-proxy==1.10.0
# via astroid
mako==1.3.0
# via -r requirements/test.in
Expand All @@ -36,11 +36,11 @@ mccabe==0.7.0
# via pylint
mock==5.1.0
# via -r requirements/test.in
path==16.7.1
path==16.9.0
# via path-py
path-py==12.5.0
# via -r requirements/test.in
platformdirs==3.11.0
platformdirs==4.1.0
# via pylint
pycodestyle==2.8.0
# via
Expand All @@ -50,11 +50,6 @@ pylint==2.15.10
# via
# -c requirements/constraints.txt
# -r requirements/test.in
pytz==2022.7.1
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# django
six==1.16.0
# via -r requirements/base.txt
sqlparse==0.4.4
Expand All @@ -67,11 +62,10 @@ 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
# pylint
wrapt==1.16.0
# via astroid
10 changes: 5 additions & 5 deletions requirements/tox.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.8
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# make upgrade
Expand All @@ -10,7 +10,7 @@ chardet==5.2.0
# via tox
colorama==0.4.6
# via tox
distlib==0.3.7
distlib==0.3.8
# via virtualenv
filelock==3.13.1
# via
Expand All @@ -20,7 +20,7 @@ packaging==23.2
# via
# pyproject-api
# tox
platformdirs==3.11.0
platformdirs==4.1.0
# via
# tox
# virtualenv
Expand All @@ -32,7 +32,7 @@ tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.11.3
tox==4.12.1
# via -r requirements/tox.in
virtualenv==20.24.6
virtualenv==20.25.0
# via tox
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{38,310,311}-django{32}
envlist = py{38,310,311}-django{32,42}


[testenv]
Expand All @@ -9,7 +9,8 @@ envdir=
py310: {toxworkdir}/py310
py311: {toxworkdir}/py311
deps =
django32: -r requirements/django.txt
django32: -r requirements/django32.txt
django42: -r requirements/django42.txt
-rrequirements/test.txt
commands =
{posargs}

0 comments on commit 38970ba

Please sign in to comment.