Skip to content

Commit

Permalink
Merge branch 'release/0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
storax committed Aug 9, 2015
2 parents 34fd762 + 908119b commit a46dacd
Show file tree
Hide file tree
Showing 15 changed files with 102 additions and 312 deletions.
7 changes: 4 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[bumpversion]
current_version = 0.1.0
files = setup.py /__init__.py docs/conf.py
current_version = 0.4.0
files = src/easymodel/__init__.py docs/conf.py
commit = True
tag = False
tag = False

18 changes: 14 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
sudo: false
language: python
python: 2.7
env:
global:
PIP_INDEX_URL=https://storax.github.io/travis-pyside-test/simple/
PIP_EXTRA_INDEX_URL=https://pypi.python.org/simple
LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
matrix:
- TOXENV=check
- TOXENV=2.6,coveralls
- TOXENV=2.6-nocover
- TOXENV=2.7,coveralls
- TOXENV=2.7-nocover
- TOXENV=3.3,coveralls
- TOXENV=3.3-nocover
- TOXENV=3.4,coveralls
- TOXENV=3.4-nocover
addons:
apt:
packages:
- xvfb
before_install:
- python --version
- virtualenv --version
- pip --version
- uname -a
- lsb_release -a
install:
- sudo apt-get install libqt4-dev
- pip install tox
script:
- tox -v -c travistox.ini
- Xvfb :0 -screen 0 1600x1200x24 &
- export DISPLAY=:0.0
- tox -v
notifications:
email:
on_success: never
Expand Down
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ History
* Add ItemDataRoles to retrieve the internal objects of an index
* Easy conversion from ItemData to TreeItem
* Emit clicks on widgetdelegate via QApplication and to the actual child widget

0.4.0 (2015-08-09)
+++++++++++++++++++++++++++++++++++++++

* python 3 support
19 changes: 1 addition & 18 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,10 @@
Run bootstrap for each update.
"""
import os
import sys

import jinja2
import matrix

if not os.path.exists('.tox/configure'):
import virtualenv
import subprocess
print("Bootstrapping ...")
virtualenv.create_environment('.tox/configure')
print("Installing `jinja2` and `matrix` into bootstrap environment ...")
if sys.platform == 'win32':
subprocess.check_call(['.tox/configure/Scripts/pip', 'install', 'jinja2', 'matrix'])
else:
subprocess.check_call(['.tox/configure/bin/pip', 'install', 'jinja2', 'matrix'])

if sys.platform == 'win32':
execfile('.tox/configure/Scripts/activate_this.py', dict(__file__='.tox/configure/Scripts/activate_this.py'))
else:
execfile('.tox/configure/bin/activate_this.py', dict(__file__='.tox/configure/bin/activate_this.py'))


jinja = jinja2.Environment(
loader=jinja2.FileSystemLoader('conf'),
Expand All @@ -55,4 +38,4 @@
fh.write(jinja.get_template(name).render(tox_environments=tox_environments))
print("Wrote %s" % name)

print("DONE.")
print("DONE.")
12 changes: 10 additions & 2 deletions conf/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
sudo: false
language: python
python: 2.7
env:
global:
PIP_INDEX_URL=https://storax.github.io/travis-pyside-test/simple/
PIP_EXTRA_INDEX_URL=https://pypi.python.org/simple
LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
matrix:
- TOXENV=check
{% for env, config in tox_environments|dictsort %}
- TOXENV={{ env }}{% if config.cover %},coveralls{% endif %}

{% endfor %}
addons:
apt:
packages:
- xvfb
before_install:
- python --version
- virtualenv --version
- pip --version
- uname -a
- lsb_release -a
install:
- sudo apt-get install libqt4-dev
- pip install tox
script:
- tox -v -c travistox.ini
- Xvfb :0 -screen 0 1600x1200x24 &
- export DISPLAY=:0.0
- tox -v
notifications:
email:
on_success: never
Expand Down
13 changes: 12 additions & 1 deletion conf/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ envlist =
docs

[testenv]
passenv = DISPLAY
setenv =
PYTHONPATH={toxinidir}/tests
PYTHONUNBUFFERED=yes
deps =
pytest
pytest-capturelog
commands =
python {envbindir}/pyside_postinstall.py -install
{posargs:py.test -vv}

[testenv:spell]
setenv =
SPELLCHECK = 1
commands =
python {envbindir}/pyside_postinstall.py -install
sphinx-build -b spelling docs dist/docs
usedevelop = true
deps =
Expand All @@ -33,6 +36,7 @@ deps =
whitelist_externals =
rm
commands =
python {envbindir}/pyside_postinstall.py -install
rm -rf dist/docs || rmdir /S /Q dist\docs
sphinx-build -b linkcheck docs dist/docs
sphinx-build -b html docs dist/docs
Expand All @@ -56,29 +60,35 @@ deps =
collective.checkdocs
usedevelop = true
commands =
python {envbindir}/pyside_postinstall.py -install
python setup.py checkdocs
python setup.py check --restructuredtext --strict --metadata
flake8 src

[testenv:coveralls]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
deps =
coverage<3.999
coveralls
usedevelop = true
commands =
python {envbindir}/pyside_postinstall.py -install
coverage combine
coverage report
coveralls

[testenv:report]
commands =
python {envbindir}/pyside_postinstall.py -install
coverage combine
coverage report
usedevelop = true
deps = coverage<3.999

[testenv:clean]
commands = coverage erase
commands =
python {envbindir}/pyside_postinstall.py -install
coverage erase
usedevelop = true
deps = coverage<3.999

Expand All @@ -96,6 +106,7 @@ setenv =
WITH_COVERAGE=yes
usedevelop = true
commands =
python {envbindir}/pyside_postinstall.py -install
{posargs:py.test --cov src -vv}
{% endif %}
deps =
Expand Down
113 changes: 0 additions & 113 deletions conf/travistox.ini

This file was deleted.

4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
# built documents.
#
# The short X.Y version.
version = '0.2.0'
version = '0.4.0'
# The full version, including alpha/beta/rc tags.
release = '0.2.0'
release = '0.4.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ addopts =
# - can use as many you want

python_versions =
2.6
2.7
3.3
3.4

dependencies =
-
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,7 @@ def run_tests(self):
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
)
2 changes: 1 addition & 1 deletion src/easymodel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__author__ = 'David Zuber'
__email__ = 'zuber.david@gmx.de'
__version__ = '0.3.0'
__version__ = '0.4.0'
5 changes: 3 additions & 2 deletions src/easymodel/treemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""

import abc
import types

from PySide import QtCore

Expand Down Expand Up @@ -167,7 +166,9 @@ def data(self, column, role):
return
if role == QtCore.Qt.DisplayRole:
data = self._list[column]
if type(data) in (types.IntType, types.FloatType, types.NoneType):
if data is None\
or (isinstance(data, int) and not isinstance(data, bool))\
or isinstance(data, float):
return data
else:
return str(data)
Expand Down

0 comments on commit a46dacd

Please sign in to comment.