From 246f57b34caa1b590fc00a8d6ab22c8125b12b9a Mon Sep 17 00:00:00 2001 From: Aphiwe Moshesh Date: Wed, 18 Sep 2019 11:46:27 +0200 Subject: [PATCH 1/2] add django 2.2 support --- mote/tests/requirements/225.txt | 9 +++++ mote/tests/settings/225.py | 68 +++++++++++++++++++++++++++++++++ tox.ini | 6 +++ 3 files changed, 83 insertions(+) create mode 100644 mote/tests/requirements/225.txt create mode 100644 mote/tests/settings/225.py diff --git a/mote/tests/requirements/225.txt b/mote/tests/requirements/225.txt new file mode 100644 index 0000000..2845acf --- /dev/null +++ b/mote/tests/requirements/225.txt @@ -0,0 +1,9 @@ +django>=2.2.5,<3.0 +beautifulsoup4==4.4.1 +djangorestframework==3.10.3 +six==1.9.0 +djangorestframework-jwt==1.8.0 +xmltodict==0.10.2 +PyYAML==3.12 +yamlordereddictloader==0.4.0 +pypandoc==1.3.3 diff --git a/mote/tests/settings/225.py b/mote/tests/settings/225.py new file mode 100644 index 0000000..3e45956 --- /dev/null +++ b/mote/tests/settings/225.py @@ -0,0 +1,68 @@ +import os +import glob +from os.path import expanduser + +if "VIRTUAL_ENV" in os.environ: + BASE_DIR = os.path.join( + glob.glob(os.environ["VIRTUAL_ENV"] + "/lib/*/site-packages")[0], + "mote" + ) +else: + BASE_DIR = os.path.dirname(os.path.dirname(__file__)) + +SECRET_KEY = "SECRET_KEY_PLACEHOLDER" + +DEBUG = True + +TEMPLATE_DEBUG = True + +INSTALLED_APPS = ( + "mote", + "mote.tests", + "django.contrib.auth", + "django.contrib.contenttypes", + "django.contrib.staticfiles", + "rest_framework", +) + +TEMPLATE_CONTEXT_PROCESSORS = [ + "django.contrib.auth.context_processors.auth", + "django.template.context_processors.debug", + "django.template.context_processors.i18n", + "django.template.context_processors.media", + "django.template.context_processors.static", + "django.template.context_processors.tz", + "django.template.context_processors.request", + "django.contrib.messages.context_processors.messages", +] + +TEMPLATES = [ + { + "BACKEND": "django.template.backends.django.DjangoTemplates", + "DIRS": [], + "APP_DIRS": False, + "OPTIONS": { + "context_processors": TEMPLATE_CONTEXT_PROCESSORS, + "loaders": [ + "django.template.loaders.filesystem.Loader", + "mote.loaders.app_directories.Loader", + "django.template.loaders.app_directories.Loader", + ] + }, + }, +] + +ROOT_URLCONF = "mote.tests.urls" + +DATABASES = { + "default": { + "ENGINE": "django.db.backends.sqlite3", + "NAME": os.path.join(BASE_DIR, "db.sqlite3"), + } +} + +USE_TZ = True + +STATIC_URL = "/static/" + +MOTE = {"project": lambda request: "myproject"} diff --git a/tox.ini b/tox.ini index 865007f..5514b50 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,7 @@ envlist = django111-{py27,py35} django20-py35 + django225-py36 [testenv] basepython = python2.7 @@ -19,3 +20,8 @@ commands = python manage.py test mote{posargs} --settings=mote.tests.settings.11 basepython = python3.5 deps = -rmote/tests/requirements/20.txt commands = python manage.py test mote{posargs} --settings=mote.tests.settings.20 + +[testenv:django225-py36] +basepython = python3.6 +deps = -rmote/tests/requirements/225.txt +commands = python manage.py test mote{posargs} --settings=mote.tests.settings.225 From 44f0b55e74a4df4f74decef1c6bc15633978472c Mon Sep 17 00:00:00 2001 From: Aphiwe Moshesh Date: Wed, 18 Sep 2019 12:18:01 +0200 Subject: [PATCH 2/2] rename mote, update version and trav conf --- .travis.yml | 13 +++++++++++++ README.rst | 2 +- mote/__init__.py | 2 +- setup.py | 8 ++++---- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8dba3c4..ae78bfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,3 +10,16 @@ install: - pip install tox script: tox + +after_success: + - coveralls + +deploy: + provider: pypi + user: Praekelt + password: + # NOTE: See http://docs.travis-ci.com/user/encryption-keys/ for more info. + secure: "insert encrypted pypi password here" + on: + tags: true + all_branches: true \ No newline at end of file diff --git a/README.rst b/README.rst index d7ad2eb..3a904f4 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ Mote - the pattern library framework ==================================== -.. figure:: https://travis-ci.org/praekelt/mote.svg?branch=develop +.. figure:: https://travis-ci.org/praekeltfoundation/mote.svg?branch=develop :align: center :alt: Travis diff --git a/mote/__init__.py b/mote/__init__.py index 9545351..de2f74b 100644 --- a/mote/__init__.py +++ b/mote/__init__.py @@ -1,7 +1,7 @@ import threading -__version__ = "0.3.1" +__version__ = "0.0.1" default_app_config = "mote.apps.MoteConfig" PROJECT_PATHS = {} _thread_locals = threading.local() diff --git a/setup.py b/setup.py index b214c9e..9edce39 100644 --- a/setup.py +++ b/setup.py @@ -14,12 +14,12 @@ def get_version(fname): setup( - name="mote-prk", + name="mote-praekelt", version=get_version('mote/__init__.py'), description="Mote - the pattern library framework.", - long_description = open("README.rst", "r").read() + open("AUTHORS.rst", "r").read() + open("CHANGELOG.rst", "r").read(), - author="Praekelt Consulting", - author_email="dev@praekelt.com", + long_description=open("README.rst", "r").read() + open("AUTHORS.rst", "r").read() + open("CHANGELOG.rst", "r").read(), + author="Praekelt Foundation", + author_email="dev@praekelt.org", url="https://github.com/praekelt/mote", license="BSD", packages=find_packages(),