Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #46

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
246f57b
add django 2.2 support
moh-moola Sep 18, 2019
44f0b55
rename mote, update version and trav conf
moh-moola Sep 18, 2019
01e2075
update change log, version, license and authors log files
moh-moola Sep 18, 2019
9039ef8
Merge branch 'release/0.1.0' into develop
moh-moola Sep 18, 2019
7f67d04
update trav test envs
moh-moola Sep 18, 2019
3712c50
update travis python version
moh-moola Sep 18, 2019
3230d83
update changes and version files
moh-moola Sep 18, 2019
e6d6329
Merge branch 'release/0.1.1' into develop
moh-moola Sep 18, 2019
60452e7
update change log and version
moh-moola Sep 18, 2019
e63bfc3
Merge branch 'release/0.1.2' into develop
moh-moola Sep 18, 2019
6519e73
update change log, version and pypi creds
moh-moola Sep 18, 2019
edf89a6
Merge branch 'release/0.1.3' into develop
moh-moola Sep 18, 2019
02dd94a
update deploy creds
moh-moola Sep 19, 2019
03fddf4
update version and change log
moh-moola Sep 19, 2019
63dab49
Merge branch 'release/0.1.4' into develop
moh-moola Sep 19, 2019
c59e0a3
update pypi creds
moh-moola Sep 19, 2019
cffd123
update change log and version
moh-moola Sep 19, 2019
2ad33a8
Merge branch 'release/0.1.5' into develop
moh-moola Sep 19, 2019
19b203a
update pypi creds
moh-moola Sep 19, 2019
12ef390
update pypi creds
moh-moola Sep 19, 2019
d0e631d
update creds
moh-moola Sep 19, 2019
8e63573
update version and change log
moh-moola Sep 19, 2019
65e6070
Merge branch 'release/0.1.6' into develop
moh-moola Sep 19, 2019
843a8f9
Django 3 compatible
codiebeulaine Dec 16, 2020
d879dfa
remove python 2.7 support
codiebeulaine Dec 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
language: python
python:
- "3.5"
- '3.6'
env:
- TOXENV=django111-py27
- TOXENV=django111-py35
- TOXENV=django20-py35
- TOXENV=django111-py27
- TOXENV=django111-py35
- TOXENV=django20-py35
- TOXENV=django225-py36

install:
- pip install tox

- pip install tox
script: tox

after_success:
- coveralls
deploy:
provider: pypi
distributions: sdist bdist_wheel
user: __token__
password:
secure: hCFsFXn3x1DO23LB91l80YTvZRXWNUt+HHXukReQ/DFwXp3ar8sX7usCLyRwqjT+hibAbppJobCpINARPkczMWFnyk6sUQbw2BexR41a1pwCR4xR9mA7ap+fVkwAkFOy+FPl1H7xgKdmZpFmO6HvU7Y0DfnOLLAdgDFM6lIHsycnJEnxy5PfaiPaUwbW7pzjo2Z1XCMRI+Q+iBsUsSI2IwjrogrurNhmEClv9clcy+h1iHRwztAdDcSW23y6GiJSVK2+60Fh+FHMKIJZjGQDISKpnkIwdB7fmbTOOtGvPU+r+v7UjDxLFlBBNRt6YYSIVdntBGQX4gWwA40ajWp2cT1AXupi6HQkGzYgRdElnGozoH2orU19uHQFukunwP9+pic3SXBZwwCvtsB+dwNZlEVXxCdoq9vD5XsWfkYquMug9iYlzAO8O+RTCZC75E4Gjtf1z5fyV8vqQUlJUhp81mxqRXwGUI7Srl6nfFz6D6OKeWLfs1l8yMUQZNJr9nmnQTUBnLOW7+shj2X70VTY5m2XdgZx9IATjuWj6FbhqvNKczOaZLmj8NGK08tOnUoqqu97+txyI7Pj77joFDv3Dpag11Adf+hLdFNtM6PMdZfJgjnVyYfF+RlzRk8zLrVfdI6KNaKGAY5oX8wswEQU3LEk/nWQA9kLOpDToM+xu7M=
on:
tags: true
python: 3.6
6 changes: 2 additions & 4 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
Authors
=======

Praekelt Consulting
Praekelt Foundation
-------------------

* Hedley Roos
* Chris Sergienko
* Jason Paidoussi
* Aphiwe Moshesh

36 changes: 2 additions & 34 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,39 +1,7 @@
Changelog
=========

next
----
#. Vastly simplify the templating. This introduces major backward incompatibility.
#. Implement caching to speed up the Explorer.
#. Added a cached loader to speed up rendering during development.

0.3.1
0.1.6
-----
#. Django 1.11 compatibility.

0.3
---
#. Simplify layout and models. This introduces some backward incompatibility with 0.2.1. You may need to update your templates.
#. Vastly simplify the RESTful API.
#. PyPy and Python 3.5 compatibility.

0.2.1
-----
#. Consider the entire nested structure when computing a cache key.
#. Deepmerge now merges through nested lists.
#. Deepmerge now does automatic type conversion from a dictionary to a dictionary in a list if required.

0.2
---
#. Make it possible to override `iframe.html` for each project.
#. New UI theme.
#. Django template and RESTful API.

0.1.1
-----
#. Inevitable rename to avoid name collision.

0.1
----
#. First release.

#. This package is a fork of mote-prk see https://github.com/praekelt/mote
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) Praekelt Consulting
Copyright (c) Praekelt Foundation
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion mote/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import threading


__version__ = "0.3.1"
__version__ = "0.1.6"
default_app_config = "mote.apps.MoteConfig"
PROJECT_PATHS = {}
_thread_locals = threading.local()
2 changes: 1 addition & 1 deletion mote/templatetags/mote_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from django.template.response import TemplateResponse
from django.utils.translation import ugettext as _
from django.utils.functional import Promise
from django.utils.six import string_types, text_type
from six import string_types, text_type
try:
from django.urls import reverse
except ImportError:
Expand Down
9 changes: 9 additions & 0 deletions mote/tests/requirements/225.txt
Original file line number Diff line number Diff line change
@@ -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
68 changes: 68 additions & 0 deletions mote/tests/settings/225.py
Original file line number Diff line number Diff line change
@@ -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"}
3 changes: 1 addition & 2 deletions mote/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from django.template.loader import render_to_string
from django.templatetags.static import PrefixNode
from django.utils.functional import cached_property
from django.utils.six.moves.urllib.parse import urljoin
from urllib.parse import urljoin
from django.views.generic.base import TemplateView

from mote import PROJECT_PATHS
Expand Down Expand Up @@ -195,4 +195,3 @@ def get_context_data(self, **kwargs):
for prime in PRIMES:
result = str(is_prime(prime))
return {}

8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
15 changes: 7 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
[tox]
envlist =
django111-{py27,py35}
django111-py35
django20-py35

[testenv]
basepython = python2.7

[testenv:django111-py27]
deps = -rmote/tests/requirements/111.txt
commands = python manage.py test mote{posargs} --settings=mote.tests.settings.111
django225-py36

[testenv:django111-py35]
basepython = python3.5
Expand All @@ -19,3 +13,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