Skip to content

Commit

Permalink
Set wagtail to 2.13 and update other dependecies
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasvdh92 committed Mar 24, 2021
1 parent fce3667 commit 8251e02
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ tessdata/
coverage_html_report/
.coverage
coverage.xml
.vscode
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


install_requires = [
"wagtail>=2,<2.6",
"wagtail>=2,<2.13",
"textract",
]

Expand Down Expand Up @@ -55,6 +55,8 @@
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Wagtail',
'Framework :: Wagtail :: 2',
'Topic :: Internet :: WWW/HTTP :: Site Management',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from django.core.management.base import BaseCommand

from wagtail.documents.models import get_document_model
try:
from wagtail.documents.models import get_document_model
except ImportError:
from wagtail.documents import get_document_model

from wagtail_textract.handlers import async_transcribe_document

Expand Down
2 changes: 1 addition & 1 deletion src/wagtail_textract/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from wagtail.tests.settings import *

WAGTAILDOCS_DOCUMENT_MODEL = 'wagtail_textract.document'
INSTALLED_APPS = INSTALLED_APPS + ('wagtail_textract',)
INSTALLED_APPS += ('wagtail_textract',)
5 changes: 4 additions & 1 deletion src/wagtail_textract/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@

MEDIA_ROOT = '.'
WAGTAILDOCS_DOCUMENT_MODEL = 'wagtail_textract.document'
INSTALLED_APPS = INSTALLED_APPS + ('wagtail_textract',)
if type(INSTALLED_APPS) is list:
INSTALLED_APPS = INSTALLED_APPS + ['wagtail_textract',]
else:
INSTALLED_APPS = INSTALLED_APPS + ('wagtail_textract',)
5 changes: 4 additions & 1 deletion src/wagtail_textract/tests/test_document_class.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from wagtail.documents.models import get_document_model
try:
from wagtail.documents.models import get_document_model # wagtail < 2.8
except ImportError:
from wagtail.documents import get_document_model # wagtail >= 2.8


def test_document_class():
Expand Down
5 changes: 4 additions & 1 deletion src/wagtail_textract/tests/test_management_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

from django.core.files import File
from django.core.management import call_command
from wagtail.documents.models import get_document_model
try:
from wagtail.documents.models import get_document_model # wagtail < 2.8
except ImportError:
from wagtail.documents import get_document_model # wagtail >= 2.8

Document = get_document_model()

Expand Down
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ envlist =
py{35,36}-dj{21}-wt{23}
py{35,36,37}-dj{21}-wt{24}
py{35,36,37}-dj{22}-wt{25}
py{35,36,37}-dj{22}-wt{26}
py{35,36,37}-dj{22}-wt{27}
py{35,36,37}-dj{22}-wt{28}
py{35,36,37}-dj{22}-wt{29}
py{36,37}-dj{22}-wt{210}
py{36,37}-dj{22}-wt{211}

[testenv]
basepython =
Expand All @@ -26,6 +32,12 @@ deps =
wt23: wagtail>=2.3,<2.4
wt24: wagtail>=2.4,<2.5
wt25: wagtail>=2.5,<2.6
wt26: wagtail>=2.6,<2.7
wt27: wagtail>=2.7,<2.8
wt28: wagtail>=2.8,<2.9
wt29: wagtail>=2.9,<2.10
wt210: wagtail>=2.10,<2.11
wt211: wagtail>=2.11,<2.12

whitelist_externals =
make
Expand Down
2 changes: 1 addition & 1 deletion travis-textract-requirements/python-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ requests==2.18.1
nose==1.3.7

# needed for managing versions
bumpversion==0.5.3
bumpversion==0.5.3
22 changes: 12 additions & 10 deletions travis-textract-requirements/python.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# This file contains all python dependencies that are required by the textract
# package in order for it to properly work.

argcomplete==1.8.2
argcomplete==1.10.0
chardet==3.0.4
python-pptx==0.6.12
python-pptx==0.6.18
pdfminer.six==20181108
#pdfminer.six <-- go back to this after the shebang fix is released (see https://github.com/goulu/pdfminer/issues/27)
https://github.com/goulu/pdfminer/zipball/e6ad15af79a26c31f4e384d8427b375c93b03533#egg=pdfminer.six
docx2txt==0.6
beautifulsoup4==4.6.0
xlrd==1.0.0
EbookLib==0.16
SpeechRecognition==3.7.1
#https://github.com/goulu/pdfminer/zipball/e6ad15af79a26c31f4e384d8427b375c93b03533#egg=pdfminer.six
docx2txt==0.8
beautifulsoup4=>4.8.0,<4.8.3
xlrd==1.2.0
EbookLib==0.17.1
SpeechRecognition==3.8.1
https://github.com/mattgwwalker/msg-extractor/zipball/master
six==1.10.0
pocketsphinx==0.1.3
six==1.12.0
extract-msg==0.23.1
tzlocal==1.5.1

0 comments on commit 8251e02

Please sign in to comment.