Skip to content

Commit

Permalink
Merge branch 'release/0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser committed Mar 26, 2020
2 parents 2ab363e + 66f7d44 commit bac8434
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 35 deletions.
42 changes: 25 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
language: python

python:
- "3.5"

- 3.5
- 3.6
env:
- DJANGO="" # no django
- DJANGO="Django>=1.11,<1.12"

- DJANGO=""
- DJANGO=1.11
- DJANGO=2.0
- DJANGO=2.1
- DJANGO=2.2
- DJANGO=3.0
jobs:
exclude:
- python: 3.5
env: DJANGO=3.0
install:
- pip install -e .
- pip install -e '.[test]'
- if [ ! -z $DJANGO ]; then pip install -q $DJANGO; fi
- if [ $DJANGO != '' ]; then pip install django-autocomplete-light pytest-django; fi
- pip install codecov
- cp ci/testsettings.py testsettings.py
- python -c "import uuid; print('SECRET_KEY = \'%s\'' % uuid.uuid4())" >> testsettings.py

- pip install -e .
- pip install -e '.[test]'
- if [ ! -z $DJANGO ]; then pip install -q Django==$DJANGO; fi
- if [ $DJANGO != '' ]; then pip install django-autocomplete-light pytest-django;
fi
- pip install codecov
- cp ci/testsettings.py testsettings.py
- python -c "import uuid; print('SECRET_KEY = \'%s\'' % uuid.uuid4())" >> testsettings.py
script:
- py.test --cov=viapy

- py.test --cov=viapy
after_success:
- codecov
- codecov
notifications:
slack:
secure: fGFC9zMgsSTUlFFtS4mmUyFq/eZLABF2Q9VmfIWOdZjHBLu9pXrX7x4trrmG6+ZMDf0tLIyyO6Wa8W+zz6xkhpW+bhdMVnDJomLmLfc/ZbavdkY1LGM+Dj6CDMtPIU26z1y8PmxhpWd/uO0JT6QtYqkfmMy6OaK7BU4NCXse3HYD434UBvce30x2w2Q9JQHDSWvSMqP17vdJMLmpmQl4Nl5gjduR8sqe/itxwlvShxwBJjjQjZSAcCUNqjSSQNjdaLM7hdu6byQhVCbuEi7IQMXvSSPTkyQpIvTAoXJQ/SoYOxmI6fA5vHNO8sSO3yTJPpZCm+KzjE8wJEun8lPkd7vExrw7iwVXPtCeL6PE/9k8ax1lTn68Sc+FdGlDgiHqZ/2b5/btuuhsjY3DibPDmbJy7C42cO0YvvCkUaY2NlbWn59p92NBcttyVUJ8fSE/iJZmIOqHsfREVzB4liOwpQYiNe9LB4WxmbCFssxMvIqR5+86n0bdV4dDu+u+9IibwQhfOVliGaoDnt8sEc/ESrBwvPcev55nJcuag1gnjQAk3azCKbYrMUe3+c6DquiwQpQmY/uIaQhuILeEyEZSlcCjB9wrs7hbdnH5ZVNsmGe7ZrgR+0ySwdZrQl0FxYgCXMIQyTSkMJnlZy7U544HBlYFXvX2UcVIMLCH268yorM=
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
CHANGELOG
=========

0.2
---

* Now supports Django versions 1.11 through 3.0.

0.1.4
-----

Expand Down
25 changes: 14 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,27 @@ Authority File) data and APIs.
**viapy** provides optional Django integration; this currently includes a
django-autocomplete-light lookup view and a VIAF url widget.

Python 3.5 / Django 1.11

.. image:: https://travis-ci.org/Princeton-CDH/viapy.svg?branch=develop
.. image:: https://travis-ci.org/Princeton-CDH/viapy.svg
:target: https://travis-ci.org/Princeton-CDH/viapy
:alt: Build status

.. image:: https://codecov.io/gh/Princeton-CDH/viapy/branch/develop/graph/badge.svg
:target: https://codecov.io/gh/Princeton-CDH/viapy/branch/develop
.. image:: https://codecov.io/gh/Princeton-CDH/viapy/branch/master/graph/badge.svg
:target: https://codecov.io/gh/Princeton-CDH/viapy/branch/master
:alt: Code coverage

.. image:: https://landscape.io/github/Princeton-CDH/viapy/develop/landscape.svg?style=flat
:target: https://landscape.io/github/Princeton-CDH/viapy/develop
:alt: Code Health
.. image:: https://requires.io/github/Princeton-CDH/viapy/requirements.svg
:target: https://requires.io/github/Princeton-CDH/viapy/requirements/
:alt: Requirements Status

.. image:: https://requires.io/github/Princeton-CDH/viapy/requirements.svg?branch=develop
:target: https://requires.io/github/Princeton-CDH/viapy/requirements/?branch=develop
:alt: Requirements Status
.. image:: https://www.codefactor.io/repository/github/princeton-cdh/viapy/badge
:target: https://www.codefactor.io/repository/github/princeton-cdh/viapy
:alt: CodeFactor

.. image:: https://img.shields.io/pypi/pyversions/viapy
:alt: PyPI - Python Version

.. image:: https://img.shields.io/pypi/djversions/viapy
:alt: PyPI - Django Version


Installation
Expand Down
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import sys
from setuptools import find_packages, setup

from viapy import __version__

with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
Expand All @@ -11,7 +11,7 @@

REQUIREMENTS = ['requests', 'rdflib', 'cached_property', 'attrdict']
TEST_REQUIREMENTS = ['pytest', 'pytest-cov']
DJANGO_REQS = ['django>=1.11', 'django-autocomplete-light']
DJANGO_REQS = ['django>=1.11,<3.1', 'django-autocomplete-light']
DJANGO_TEST_REQS = ['pytest-django']


Expand Down Expand Up @@ -39,15 +39,17 @@
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
# maybe we'll add 2.7 support if it's easy
# 'Programming Language :: Python :: 2',
# 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries :: Python Modules',
],
Expand Down
2 changes: 1 addition & 1 deletion viapy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version_info__ = (0, 1, 4, None)
__version_info__ = (0, 2, 0, None)


# Dot-connect all but the last. Last is dash-connected if not None.
Expand Down
2 changes: 2 additions & 0 deletions viapy/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from viapy.views import ViafLookup, ViafSearch


app_name = 'viapy'

urlpatterns = [
url(r'^suggest/$', ViafLookup.as_view(), name='suggest'),
url(r'^suggest/person/$', ViafLookup.as_view(),
Expand Down
2 changes: 1 addition & 1 deletion viapy/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ViafWidget(autocomplete.Select2):
'''Custom autocomplete select widget that displays VIAF id as a link.
Extends :class:`dal.autocomplete.Select2`.'''

def render(self, name, value, attrs=None):
def render(self, name, value, renderer=None, attrs=None):
# select2 filters based on existing choices (non-existent here),
# so when a value is set, add it to the list of choices
if value:
Expand Down

0 comments on commit bac8434

Please sign in to comment.