Skip to content

Commit

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

* chore: update constraints & upgrade requirements

* fix: was mandatory to send any get_response

* chore: update github-actions

* chore: install test dependencies as dev ones

* docs: update README for showing quince support
  • Loading branch information
bra-i-am authored Feb 1, 2024
1 parent 339b23e commit 728876b
Show file tree
Hide file tree
Showing 16 changed files with 138 additions and 180 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/bump_version.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.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.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 @@ -5,7 +5,7 @@ jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
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
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"]
django: ["32"]
python-version: ["3.8", "3.10", "3.11"]
django: ["32", "42"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -25,7 +25,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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ bumpversion: ## Tag the current version using semantinc versioning and git tags

install-dev-dependencies: ## install tox
pip install -r requirements/tox.txt
pip install -r requirements/test.txt

clean: ## Remove generated byte code, coverage reports, and build artifacts
find . -name '__pycache__' -exec rm -rf {} +
Expand Down
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Compatibility Notes
+------------------+--------------+
| Palm | >= 9.0 |
+------------------+--------------+
| Quince | >= 10.0 |
+------------------+--------------+

**NOTE**: The Maple version does not support Django 2.2 but it does support Django 3.2 as of eox-core 7.0.

Expand Down Expand Up @@ -82,7 +84,7 @@ not listed, then the accumulation of changes from previous releases is enough.
EOX_CORE_PRE_ENROLLMENT_BACKEND: "eox_core.edxapp_wrapper.backends.pre_enrollment_l_v1"
EOX_CORE_ENROLLMENT_BACKEND: "eox_core.edxapp_wrapper.backends.enrollment_l_v1"
**Olive**
**Olive, Palm and Quince**

.. code-block:: yaml
Expand Down
4 changes: 2 additions & 2 deletions eox_core/tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PathRedirectionMiddlewareTest(TestCase):
def setUp(self):
""" setup """
self.request_factory = RequestFactory()
self.middleware_instance = PathRedirectionMiddleware()
self.middleware_instance = PathRedirectionMiddleware(get_response=lambda req: None)

@mock.patch('eox_core.middleware.PathRedirectionMiddleware.process_mktg_redirect')
@mock.patch('eox_core.middleware.PathRedirectionMiddleware.process_custom_path_redirect')
Expand Down Expand Up @@ -132,7 +132,7 @@ class RedirectionMiddlewareTest(TestCase):
def setUp(self):
""" setup """
self.request_factory = RequestFactory()
self.middleware_instance = RedirectionsMiddleware()
self.middleware_instance = RedirectionsMiddleware(get_response=lambda req: None)

def test_disabled_feature(self):
"""
Expand Down
105 changes: 45 additions & 60 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.8
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# make upgrade
Expand All @@ -10,17 +10,12 @@ appdirs==1.4.4
# via fs
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
# kombu
billiard==4.2.0
# via celery
celery==5.3.6
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# event-tracking
certifi==2023.11.17
Expand All @@ -46,22 +41,26 @@ click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
cryptography==41.0.5
cryptography==42.0.1
# via
# jwcrypto
# pyjwt
# social-auth-core
defusedxml==0.8.0rc2
# via
# python3-openid
# social-auth-core
django==3.2.23
deprecated==1.2.14
# via jwcrypto
django==4.2.9
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# django-crum
# django-filter
# django-model-utils
# django-oauth-toolkit
# django-waffle
# djangorestframework
# drf-jwt
# drf-yasg
Expand All @@ -77,37 +76,32 @@ django-crum==0.7.9
# via
# edx-django-utils
# edx-proctoring
django-filter==23.4
# via
# -c requirements/constraints.txt
# -r requirements/base.in
django-ipware==6.0.0
django-filter==23.5
# via -r requirements/base.in
django-ipware==6.0.3
# via edx-proctoring
django-model-utils==4.3.1
# via
# -c requirements/constraints.txt
# edx-proctoring
# edx-when
django-oauth-toolkit==1.3.2
django-oauth-toolkit==1.7.1
# via
# -c requirements/constraints.txt
# -r requirements/base.in
django-oauth2-provider==0.2.6.1
# via -r requirements/base.in
django-simple-history==3.4.0
# via edx-proctoring
django-waffle==3.0.0
django-waffle==4.1.0
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# edx-django-utils
# edx-drf-extensions
# edx-proctoring
django-webpack-loader==2.0.1
django-webpack-loader==3.0.1
# via edx-proctoring
djangorestframework==3.12.4
djangorestframework==3.14.0
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# drf-jwt
# drf-yasg
Expand All @@ -118,13 +112,10 @@ drf-jwt==1.19.2
# via edx-drf-extensions
drf-yasg==1.21.7
# via edx-api-doc-tools
edx-api-doc-tools==1.6.0
# via
# -c requirements/constraints.txt
# -r requirements/base.in
edx-django-utils==5.8.0
edx-api-doc-tools==1.7.0
# via -r requirements/base.in
edx-django-utils==5.10.1
# via
# -c requirements/constraints.txt
# edx-drf-extensions
# edx-rest-api-client
# edx-when
Expand All @@ -137,67 +128,62 @@ edx-drf-extensions==8.13.1
# edx-when
edx-opaque-keys[django]==2.5.1
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# edx-drf-extensions
# edx-opaque-keys
# edx-proctoring
# edx-when
# openedx-events
edx-proctoring==4.16.1
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# via -r requirements/base.in
edx-rest-api-client==5.6.1
# via edx-proctoring
edx-when==2.3.0
# via
# -c requirements/constraints.txt
# edx-proctoring
edx-when==2.4.0
# via edx-proctoring
event-tracking==2.2.0
# via edx-proctoring
fastavro==1.9.0
fastavro==1.9.3
# via openedx-events
fs==2.4.16
# via xblock
idna==3.4
idna==3.6
# via requests
inflection==0.5.1
# via drf-yasg
jsonfield==3.1.0
# via
# -c requirements/constraints.txt
# edx-proctoring
kombu==5.3.4
# via edx-proctoring
jwcrypto==1.5.1
# via django-oauth-toolkit
kombu==5.3.5
# via celery
lxml==4.9.3
lxml==5.1.0
# via xblock
mako==1.3.0
# via xblock
markupsafe==2.1.3
markupsafe==2.1.4
# via
# mako
# xblock
newrelic==9.2.0
newrelic==9.6.0
# via edx-django-utils
oauthlib==3.2.2
# via
# django-oauth-toolkit
# requests-oauthlib
# social-auth-core
openedx-events==9.2.0
openedx-events==9.3.0
# via -r requirements/base.in
packaging==23.2
# via drf-yasg
pbr==6.0.0
# via stevedore
prompt-toolkit==3.0.41
prompt-toolkit==3.0.43
# via click-repl
psutil==5.9.6
psutil==5.9.8
# via edx-django-utils
pycparser==2.21
# via cffi
pycryptodomex==3.19.0
pycryptodomex==3.20.0
# via edx-proctoring
pyjwt[crypto]==2.8.0
# via
Expand All @@ -218,13 +204,13 @@ python-dateutil==2.8.2
# celery
# edx-proctoring
# xblock
python-ipware==2.0.0
python-ipware==2.0.1
# via django-ipware
python3-openid==3.2.0
# via social-auth-core
pytz==2023.3.post1
pytz==2023.4
# via
# django
# djangorestframework
# drf-yasg
# edx-proctoring
# event-tracking
Expand Down Expand Up @@ -259,23 +245,20 @@ six==1.16.0
# python-dateutil
slumber==0.7.1
# via edx-rest-api-client
social-auth-core==4.5.0
social-auth-core==4.5.2
# via -r requirements/base.in
sqlparse==0.4.4
# via django
stevedore==5.1.0
# via
# edx-django-utils
# edx-opaque-keys
typing-extensions==4.8.0
typing-extensions==4.9.0
# via
# asgiref
# edx-opaque-keys
# kombu
tzdata==2023.3
# via
# backports-zoneinfo
# celery
tzdata==2023.4
# via celery
uritemplate==4.1.1
# via drf-yasg
urllib3==2.1.0
Expand All @@ -285,13 +268,15 @@ vine==5.1.0
# amqp
# celery
# kombu
wcwidth==0.2.12
wcwidth==0.2.13
# via prompt-toolkit
web-fragments==2.1.0
# via xblock
webob==1.8.7
# via xblock
xblock==1.8.1
wrapt==1.16.0
# via deprecated
xblock==1.10.0
# via edx-when

# The following packages are considered to be unsafe in a requirements file:
Expand Down
Loading

0 comments on commit 728876b

Please sign in to comment.