Skip to content

Commit

Permalink
Merge branch 'master' into feature/test_coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rm-hull committed Jan 8, 2018
2 parents bb2a128 + 6caffc5 commit a438892
Show file tree
Hide file tree
Showing 23 changed files with 50 additions and 32 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -4,6 +4,8 @@ ChangeLog
+------------+---------------------------------------------------------------------+------------+
| Version | Description | Date |
+============+=====================================================================+============+
| **1.0.2** | * Changed version number to inside ``luma/emulator/__init__.py`` | 2017/11/23 |
+------------+---------------------------------------------------------------------+------------+
| **1.0.1** | * Workaround pygame bug & use io module | 2017/11/22 |
+------------+---------------------------------------------------------------------+------------+
| **1.0.0** | * Stable version | 2017/11/03 |
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.rst
@@ -1,7 +1,7 @@
The MIT License (MIT)
---------------------

Copyright (c) 2017 Richard Hull & Contributors
Copyright (c) 2017-18 Richard Hull and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1,4 +1,4 @@
include VERSION.txt README.rst CHANGES.rst CONTRIBUTING.rst LICENSE.rst tox.ini setup.cfg .coveragerc
include README.rst CHANGES.rst CONTRIBUTING.rst LICENSE.rst tox.ini setup.cfg .coveragerc

recursive-include luma *.py *.png

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -21,7 +21,7 @@ Luma.Emulator
.. image:: https://img.shields.io/pypi/v/luma.emulator.svg
:target: https://pypi.python.org/pypi/luma.emulator

.. image:: https://img.shields.io/maintenance/yes/2017.svg?maxAge=2592000
.. image:: https://img.shields.io/maintenance/yes/2018.svg?maxAge=2592000

**luma.emulator** provides a series of pseudo-display devices which allow
the `luma.core <https://github.com/rm-hull/luma.core>`_ components to be used
Expand Down Expand Up @@ -56,7 +56,7 @@ License
-------
The MIT License (MIT)

Copyright (c) 2017 Richard Hull & Contributors
Copyright (c) 2017-18 Richard Hull and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 0 additions & 1 deletion VERSION.txt

This file was deleted.

10 changes: 6 additions & 4 deletions doc/conf.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

# luma.emulator documentation build configuration file, created by
Expand All @@ -15,16 +15,18 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import os, sys
import os
import sys
from datetime import datetime

version = open("../VERSION.txt").read().strip()

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.

sys.path.insert(0, os.path.abspath('..'))

from luma.emulator import __version__ as version

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Expand Up @@ -6,7 +6,7 @@ Luma.Emulator
.. image:: https://coveralls.io/repos/github/rm-hull/luma.emulator/badge.svg?branch=master
:target: https://coveralls.io/github/rm-hull/luma.emulator?branch=master

.. image:: https://img.shields.io/maintenance/yes/2017.svg?maxAge=2592000
.. image:: https://img.shields.io/maintenance/yes/2018.svg?maxAge=2592000

.. image:: https://img.shields.io/pypi/pyversions/luma.emulator.svg
:target: https://pypi.python.org/pypi/luma.emulator
Expand Down
2 changes: 1 addition & 1 deletion luma/__init__.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

from pkgutil import extend_path
Expand Down
4 changes: 3 additions & 1 deletion luma/emulator/__init__.py
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

__version__ = '1.0.2'
2 changes: 1 addition & 1 deletion luma/emulator/clut.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

# From a comment by @TerrorBite on https://gist.github.com/MicahElliott/719710
Expand Down
2 changes: 1 addition & 1 deletion luma/emulator/device.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

import os
Expand Down
2 changes: 1 addition & 1 deletion luma/emulator/render.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

import os
Expand Down
2 changes: 1 addition & 1 deletion luma/emulator/segment_mapper.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.


Expand Down
27 changes: 20 additions & 7 deletions setup.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import re
import os
import sys
from io import open
Expand All @@ -12,17 +13,29 @@ def read_file(fname, encoding='utf-8'):
return r.read()


README = read_file("README.rst")
CONTRIB = read_file("CONTRIBUTING.rst")
CHANGES = read_file("CHANGES.rst")
version = read_file("VERSION.txt").strip()
def find_version(*file_paths):
fpath = os.path.join(os.path.dirname(__file__), *file_paths)
version_file = read_file(fpath)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)

err_msg = 'Unable to find version string in {}'.format(fpath)
raise RuntimeError(err_msg)


README = read_file('README.rst')
CONTRIB = read_file('CONTRIBUTING.rst')
CHANGES = read_file('CHANGES.rst')
version = find_version('luma', 'emulator', '__init__.py')

needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []
test_deps = [
'mock;python_version<"3.3"',
"pytest>=3.1",
"pytest-cov"
'pytest>=3.1',
'pytest-cov'
]

setup(
Expand All @@ -45,7 +58,7 @@ def read_file(fname, encoding='utf-8'):
"luma/emulator/images/7-segment.png"
]},
install_requires=[
"luma.core>=1.1.0",
"luma.core>=1.1.1",
"pygame"
],
setup_requires=pytest_runner,
Expand Down
2 changes: 1 addition & 1 deletion tests/baseline_data.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.


Expand Down
2 changes: 1 addition & 1 deletion tests/helpers.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

import hashlib
Expand Down
2 changes: 1 addition & 1 deletion tests/test_capture.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_clut.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_emulator.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_gifanim.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_segment_mapper.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_transformer.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

"""
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,4 +1,4 @@
# Copyright (c) 2017 Richard Hull and contributors
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.

[tox]
Expand Down

0 comments on commit a438892

Please sign in to comment.