FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 720472de authored by Dr Abraham Martin's avatar Dr Abraham Martin
Browse files

feat: support newer versions of django (4.2)

parent 72d4a6d1
No related branches found
No related tags found
1 merge request!21feat: support newer versions of django (4.2)
Pipeline #488819 passed
......@@ -14,7 +14,7 @@ include:
# Support uploading to PyPI
- project: 'uis/devops/continuous-delivery/ci-templates'
ref: v1.5.0
ref: v3.7.1
file: '/pypi-release.yml'
variables:
......@@ -26,7 +26,7 @@ coverage:
extends: .test
variables:
TOX_ENVLIST: coverage
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.11"
# Look for the summary line output from coverage's text report. The
# parentheses are used to indicate which portion of the report contains the
......@@ -38,28 +38,33 @@ flake8:
extends: .test
variables:
TOX_ENVLIST: flake8
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.11"
# Run test suite against supported Python/Django combinations.
python36-django22:
extends: .py36
python38-django42:
extends: .py38
variables:
TOX_DJANGO_FRAGMENT: "django22"
TOX_DJANGO_FRAGMENT: "django42"
python37-django22:
extends: .py37
python39-django42:
extends: .py39
variables:
TOX_DJANGO_FRAGMENT: "django22"
TOX_DJANGO_FRAGMENT: "django42"
python38-django22:
extends: .py38
python310-django42:
extends: .py310
variables:
TOX_DJANGO_FRAGMENT: "django22"
TOX_DJANGO_FRAGMENT: "django42"
python39-django22:
extends: .py39
python311-django42:
extends: .py311
variables:
TOX_DJANGO_FRAGMENT: "django22"
TOX_DJANGO_FRAGMENT: "django42"
python312-django42:
extends: .py312
variables:
TOX_DJANGO_FRAGMENT: "django42"
python37-django32:
extends: .py37
......@@ -77,11 +82,6 @@ python39-django32:
TOX_DJANGO_FRAGMENT: "django32"
# Template jobs which run tests in various Python versions.
.py36:
extends: .test
variables:
PYTHON_VERSION: "3.6"
TOX_PY_FRAGMENT: "py36"
.py37:
extends: .test
......@@ -101,6 +101,24 @@ python39-django32:
PYTHON_VERSION: "3.9"
TOX_PY_FRAGMENT: "py39"
.py310:
extends: .test
variables:
PYTHON_VERSION: "3.10"
TOX_PY_FRAGMENT: "py310"
.py311:
extends: .test
variables:
PYTHON_VERSION: "3.11"
TOX_PY_FRAGMENT: "py311"
.py312:
extends: .test
variables:
PYTHON_VERSION: "3.12"
TOX_PY_FRAGMENT: "py312"
# Base test template job.
.test:
stage: test
......
django-ucamlookup changelog
=============================
3.1.0 - 11/03/2024
------------------
- Upgraded to support django 4.2
- Support for django 2.2 removed
3.0.5 - 08/11/2021
------------------
......
django>=1.11
django>=4.2
tox
ibisclient~=1.3
......@@ -7,13 +7,13 @@ setup(
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='https://gitlab.developers.cam.ac.uk/uis/devops/django/ucamlookup',
version='3.0.5',
version='3.1.0',
license='MIT',
author='DevOps Division, University Information Services, University of Cambridge',
author_email='devops@uis.cam.ac.uk',
packages=find_packages(),
include_package_data=True,
install_requires=['django>=2.2', 'ibisclient~=1.3'],
install_requires=['django>=3.2', 'ibisclient~=1.3'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
......
......@@ -10,8 +10,8 @@
[tox]
# Envs which should be run by default. This will execute a matrix of tests
envlist =
py{36,37,38,39}-django22
py{36,37,38,39}-django32
py{38,39,310,311,312}-django42
coverage
flake8
# Allow overriding toxworkdir via environment variable
......@@ -38,7 +38,7 @@ deps=
.
mock
coverage
django22: Django>=2.2,<3.0
django42: Django>=4.2,<5.0
django32: Django>=3.2,<3.3
# Specify the default environment.
commands=
......@@ -53,7 +53,7 @@ deps=
# regressions when new checks are introduced. The version of flake8 used may
# be overridden via the TOXINI_FLAKE8_VERSION environment variable.
mock
flake8=={env:TOXINI_FLAKE8_VERSION:3.9.2}
flake8=={env:TOXINI_FLAKE8_VERSION:7.0.0}
commands=
flake8 --version
flake8 .
......
......@@ -187,7 +187,7 @@ class UcamLookupTests(TestCase):
def test_get_institutions_with_user(self):
amc203 = User.objects.create_user(username="amc203")
results = get_institutions(user=amc203)
self.assertEquals(("CL", "Department of Computer Science and Technology"), results[0])
self.assertEqual(("CL", "Department of Computer Science and Technology"), results[0])
self.assertIn(("UIS", "University Information Services"), results)
def test_get_institutions_with_non_existant_user(self):
......
from django.conf.urls import url
from django.urls import re_path
from ucamlookup.views import find_people, find_groups
urlpatterns = [
url(r'findPeople$', find_people, name='ucamlookup_find_people'),
url(r'findGroups$', find_groups, name='ucamlookup_find_groups'),
re_path(r'findPeople$', find_people, name='ucamlookup_find_people'),
re_path(r'findGroups$', find_groups, name='ucamlookup_find_groups'),
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment