airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] 01/08: AIRAVATA-3376 upgraded to LTS versions of Django, Wagtail
Date Tue, 03 Nov 2020 21:22:51 GMT
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit d8c01b6ca87801dfb57a2874c0404bf1c89598dc
Author: Marcus Christie <machristie@apache.org>
AuthorDate: Thu Sep 24 19:28:07 2020 -0400

    AIRAVATA-3376 upgraded to LTS versions of Django, Wagtail
    
    Added tox for running tests against Python versions 3.6, 3.7 and 3.8 to
    ensure compatibility.
---
 .gitignore               |  1 +
 .travis.yml              |  5 +++--
 README.md                |  4 ++--
 django_airavata/views.py |  6 +++---
 requirements-dev.txt     |  1 +
 requirements.txt         |  4 ++--
 setup.cfg                |  3 ++-
 tox.ini                  | 14 ++++++++++++++
 8 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/.gitignore b/.gitignore
index 65af29f..e8fcdc5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@ airavata_django_portal.egg-info
 package-lock.json
 # mkdocs
 site/
+.tox/
diff --git a/.travis.yml b/.travis.yml
index 6c87051..9e91f7d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,8 @@
 language: python
 python:
   - "3.6"
+  - "3.7"
+  - "3.8"
 install:
   - pip install -r requirements-dev.txt
 script:
@@ -8,10 +10,9 @@ script:
   - python manage.py migrate
   - python manage.py check
   - flake8 .
-  - python manage.py test
   - ./lint_js.sh
   - ./build_js.sh
   - ./test_js.sh
   # Need to build the frontend client before running some of the Django tests
   # that use the Django test Client
-  - python manage.py test
+  - ./runtests.py
diff --git a/README.md b/README.md
index 94062cd..1a855bb 100644
--- a/README.md
+++ b/README.md
@@ -16,8 +16,8 @@ Django Portal locally. This will allow you to try it out and can also be
used as
 a development environment. If you just want to run the Airavata Django Portal
 locally, see the Docker instructions below for a more simplified approach.
 
-The Airavata Django Portal is developed with Python 3.6 but should also work
-with 3.4 and 3.5. You'll need one of these versions installed locally.
+The Airavata Django Portal is developed with Python 3.8 but should also work
+with 3.6 and 3.7. You'll need one of these versions installed locally.
 
 You'll also need Node.js and yarn to build the JavaScript frontend code. Please
 install
diff --git a/django_airavata/views.py b/django_airavata/views.py
index 8128848..e984c10 100644
--- a/django_airavata/views.py
+++ b/django_airavata/views.py
@@ -15,7 +15,7 @@ def error500(request):
                   })
 
 
-def error400(request):
+def error400(request, exception):
     return render(request, 'django_airavata/error_page.html', status=400,
                   context={
                       'title': 'Bad Request',
@@ -24,7 +24,7 @@ def error400(request):
                   })
 
 
-def error404(request):
+def error404(request, exception):
     return render(request, 'django_airavata/error_page.html', status=404,
                   context={
                       'title': 'Page Not Found',
@@ -32,7 +32,7 @@ def error404(request):
                   })
 
 
-def error403(request):
+def error403(request, exception):
     return render(request, 'django_airavata/error_page.html', status=403,
                   context={
                       'title': 'Permission Denied',
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 229feeb..fde432f 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -5,5 +5,6 @@ flake8-isort==4.0.0
 isort==5.2.2
 mkdocs==1.0.4
 Markdown==3.2.1
+tox==3.20.0
 
 -e ".[dev]"
diff --git a/requirements.txt b/requirements.txt
index 2cca85b..58141d2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
 # Pin these dependencies
-Django==1.11.29
+Django>=2.2,<2.3
 requests==2.13.0
 requests-oauthlib==0.7.0
 thrift==0.10.0
@@ -7,7 +7,7 @@ thrift_connector==0.24
 djangorestframework==3.8.2
 django-webpack-loader==0.6.0
 
-wagtail==2.0
+wagtail>=2.7,<2.8
 wagtailfontawesome==1.1.3
 
 jupyter==1.0.0
diff --git a/setup.cfg b/setup.cfg
index a28419b..f157058 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,7 +4,8 @@ exclude =
     ./airavata,
     node_modules,
     settings_local.py,
-    */migrations
+    */migrations,
+    .tox
 ignore = E501
 
 [isort]
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..bd83326
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,14 @@
+# tox (https://tox.readthedocs.io/) is a tool for running tests
+# in multiple virtualenvs. This configuration file will run the
+# test suite on all supported python versions. To use it, "pip install tox"
+# and then run "tox" from this directory.
+
+[tox]
+envlist = py36, py37, py38
+
+[testenv]
+deps =
+    py{3,36,37,38}: -rrequirements-dev.txt
+
+commands =
+    ./runtests.py


Mime
View raw message