Skip to content

Commit

Permalink
Merge pull request #151 from caktus/prepare-1-0-release
Browse files Browse the repository at this point in the history
Prepare 1.0 release
  • Loading branch information
vkurup authored Oct 27, 2019
2 parents 21218e8 + d8d1d74 commit d2ae65b
Show file tree
Hide file tree
Showing 32 changed files with 115 additions and 268 deletions.
56 changes: 8 additions & 48 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,22 @@ language: python

sudo: false

# Ubuntu trusty (14.04) - latest that Travis offers
dist: trusty

# Make sure all the python versions we need are pre-installed
# (apt-get is not available in the container-based build system)
addons:
apt:
sources:
- deadsnakes
packages:
- python2.7
- python3.4
- python3.5
- python3.6

# The version of Python that'll be used to invoke tox. Has no effect
# on what version of Python tox uses to run each set of tests.
python:
- "3.4"
- "3.5"
- "3.6"
- "3.7"

env:
- TOXENV=py27-1.8.X
- TOXENV=py34-1.8.X
- TOXENV=py35-1.8.X

- TOXENV=py27-1.10.X
- TOXENV=py34-1.10.X
- TOXENV=py35-1.10.X

- TOXENV=py27-1.11.X
- TOXENV=py34-1.11.X
- TOXENV=py35-1.11.X
- TOXENV=py36-1.11.X

- TOXENV=py34-2.0.X
- TOXENV=py35-2.0.X
- TOXENV=py36-2.0.X

- TOXENV=py35-2.1.X
- TOXENV=py36-2.1.X

- TOXENV=coverage
- TOXENV=docs
- TOXENV=qunit

before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3
services:
- xvfb

install:
- pip install tox coveralls
- pip install pip -U
- pip install tox-travis
- pip install coveralls

script:
- tox


after_success:
- coveralls
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Nicolas Ippolito
David Ray
Yaroslav Klyuyev
Ben Phillips
Petr Dlouhý
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2016, Caktus Consulting Group, LLC
Copyright (c) 2012-2020, Caktus Consulting Group, LLC
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ Features
Installation
--------------------------------------

django-scribbler requires Django 1.8, 1.10, 1.11, or 2.0, and Python 2.7 or >= 3.4.
django-scribbler currently requires Django 2.0, 2.1 or 2.2 and Python >= 3.4. Older versions of
django-scribbler may support older versions of Django and Python.

To install from PyPi::

Expand Down Expand Up @@ -60,4 +61,3 @@ you can join the `Transifex project <https://www.transifex.com/projects/p/django

Development sponsored by `Caktus Consulting Group, LLC
<http://www.caktusgroup.com/services>`_.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

# General information about the project.
project = u'django-scribbler'
copyright = u'2012-2016, Caktus Consulting Group'
copyright = u'2012-2020, Caktus Consulting Group'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To test against multiple versions of Django you can use install and use ``tox>=1
# Build all environments
tox
# Build a single environment
tox -e py36-1.11.X
tox -e py37-2.2.X

Building all environments will also build the documentation. More on that in the next
section.
Expand Down
9 changes: 8 additions & 1 deletion docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ Release History

Release and change history for django-scribbler

v0.9.0 (Release 2017-
v1.0.0 (Release 2019-10-28)
------------------------------------

- Add support for Django 2.0 through 2.2 (Thanks Petr Dlouhý)
- Drop support for Django < 2
- Drop support for Python 2

v0.9.0 (Release 2017-12-11)
------------------------------------

- Add support for Django 1.11 and Python 3.6
Expand Down
2 changes: 0 additions & 2 deletions example/dayslog/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


Expand Down
8 changes: 4 additions & 4 deletions example/example/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@
},
]

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
MIDDLEWARE = (
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'example.urls'
Expand Down
10 changes: 3 additions & 7 deletions example/example/urls.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
from django.conf.urls import include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from django.views.i18n import javascript_catalog
from django.views.i18n import JavaScriptCatalog

from example.views import homepage
admin.autodiscover()

js_info_dict = {
'packages': ('scribbler', ),
}

urlpatterns = [
# Examples:
Expand All @@ -20,8 +16,8 @@
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/', admin.site.urls),
url(r'^scribble/', include('scribbler.urls')),
url(r'^jsi18n/$', javascript_catalog, js_info_dict, name='jsi18n'),
url(r'^jsi18n/$', JavaScriptCatalog.as_view(packages=['scribbler']), name='jsi18n'),
url(r'^$', homepage, name='home'),
]
2 changes: 1 addition & 1 deletion example/example/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def homepage(request):
'form': form
}

if request.user.is_authenticated():
if request.user.is_authenticated:
context['days_log'], created = DaysLog.objects.get_or_create(day=datetime.date.today())

return render(request, 'home.html', context)
4 changes: 2 additions & 2 deletions example/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Django==1.11.7
django-scribbler==0.9.0
Django==2.2.6
django-scribbler==1.0.0
2 changes: 1 addition & 1 deletion example/templates/home.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
{% load scribbler_tags staticfiles %}
{% load scribbler_tags static %}
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "django-scribbler",
"version": "0.6.0",
"version": "1.0.0",
"description": " An application for managing snippets of text for a Django website.",
"keywords": [],
"main": "scribbler/static/scribbler/js/scribbler.js",
Expand Down
51 changes: 16 additions & 35 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,8 @@
from optparse import OptionParser

import django
from django import VERSION as django_version
from django.conf import settings

MIDDLEWARES=(
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)

class DisableMigrations(object):
def __contains__(self, item):
return True

def __getitem__(self, item):
return 'notmigrations'

from django.test.utils import get_runner

if not settings.configured:
settings.configure(
Expand All @@ -38,9 +22,15 @@ def __getitem__(self, item):
'django.contrib.staticfiles',
'scribbler',
),
MIDDLEWARE_CLASSES=MIDDLEWARES,
MIDDLEWARE=MIDDLEWARES,
SITE_ID=1,
MIDDLEWARE=(
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
),
SECRET_KEY='super-secret',

ROOT_URLCONF='scribbler.tests.urls',
Expand Down Expand Up @@ -74,12 +64,11 @@ def __getitem__(self, item):
},
],
MIGRATION_MODULES={
# these 'tests.migrations' modules don't actually exist, but this lets
# us skip creating migrations for the test models.
# https://docs.djangoproject.com/en/1.11/ref/settings/#migration-modules
'scribbler': 'scribbler.tests.migrations' if django_version < (1, 9) else None,
'dayslog': 'dayslog.tests.migrations' if django_version < (1, 9) else None,
} if django_version >= (1, 9) else DisableMigrations(),
# this lets us skip creating migrations for the test models.
# https://docs.djangoproject.com/en/2.2/ref/settings/#migration-modules
'scribbler': None,
'dayslog': None,
},
MEDIA_ROOT='',
MEDIA_URL='/media/',
STATIC_ROOT='',
Expand All @@ -88,16 +77,8 @@ def __getitem__(self, item):
)


from django.test.utils import get_runner


def runtests(*test_args, **kwargs):
if django_version < (1, 11):
# Try lots of ports until we find one we can use
os.environ['DJANGO_LIVE_TEST_SERVER_ADDRESS'] = 'localhost:8099-9999'

if hasattr(django, 'setup'):
django.setup()
django.setup()
if not test_args:
test_args = ['scribbler', ]
TestRunner = get_runner(settings)
Expand Down
2 changes: 1 addition & 1 deletion scribbler/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"django-scribbler is an application for managing snippets of text for a Django website."


__version__ = '0.9.0'
__version__ = '1.0.0'


default_app_config = 'scribbler.apps.ScribblerAppConfig'
2 changes: 0 additions & 2 deletions scribbler/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"Default settings for django-scribbler."
from __future__ import unicode_literals

import hashlib

from django.conf import settings
Expand Down
Loading

0 comments on commit d2ae65b

Please sign in to comment.