From b54857087842196cfe69980e26e5db3f88d87e3d Mon Sep 17 00:00:00 2001
From: Markus Konrad <post@mkonrad.net>
Date: Thu, 19 Dec 2019 10:56:26 +0100
Subject: [PATCH 1/3] also test macos on travis

---
 .travis.yml | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 3435f3c..1a9ce3d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,16 +1,30 @@
 language: python
-dist: bionic
+
+jobs:
+  include:
+    - os: linux
+      dist: bionic
+    - os: osx
+
 cache: pip
 
 python:
   - "3.6"
   - "3.7"
 
-before_install:
-  - sudo apt-get -y install libgmp-dev libmpfr-dev libmpc-dev
 addons:
   apt:
     update: true
+    packages:
+      - libgmp-dev
+      - libmpfr-dev
+      - libmpc-dev
+  homebrew:
+    update: true
+    packages:
+      - gmp
+      - mpfr
+      - libmpc
 
 before_script:
   - python3 -m tmtoolkit setup test

From 4432ad06d21e826b8db803bd8ce68d7a1d459ac0 Mon Sep 17 00:00:00 2001
From: Markus Konrad <post@mkonrad.net>
Date: Thu, 19 Dec 2019 11:04:14 +0100
Subject: [PATCH 2/3] reverting travis conf -- 'Python builds are not available
 on the macOS and Windows environments.'

---
 .travis.yml | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 1a9ce3d..263e742 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,17 +1,11 @@
 language: python
-
-jobs:
-  include:
-    - os: linux
-      dist: bionic
-    - os: osx
-
+dist: bionic
 cache: pip
 
 python:
   - "3.6"
   - "3.7"
-
+  -
 addons:
   apt:
     update: true
@@ -19,12 +13,6 @@ addons:
       - libgmp-dev
       - libmpfr-dev
       - libmpc-dev
-  homebrew:
-    update: true
-    packages:
-      - gmp
-      - mpfr
-      - libmpc
 
 before_script:
   - python3 -m tmtoolkit setup test

From 1486e68c8f084b0c2a864e882bc30bf04cf3e856 Mon Sep 17 00:00:00 2001
From: Markus Konrad <post@mkonrad.net>
Date: Thu, 19 Dec 2019 11:32:58 +0100
Subject: [PATCH 3/3] [skip travis] coverage and pypi downloads badge

---
 Makefile     |  4 +++-
 README.rst   | 10 +++++++++-
 coverage.svg | 21 +++++++++++++++++++++
 3 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 coverage.svg

diff --git a/Makefile b/Makefile
index 1e9dd26..20cb66d 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@ run_tests:
 	PYTHONPATH=. pytest -l tests/
 
 cov_tests:
-	PYTHONPATH=. pytest --cov-report html:.covreport --cov=tmtoolkit tests/; rm .coverage*
+	PYTHONPATH=. pytest --cov-report html:.covreport --cov=tmtoolkit tests/
+	coverage-badge -o coverage.svg
+	rm .coverage*
 
 sdist:
 	python setup.py sdist
diff --git a/README.rst b/README.rst
index eea7efd..ac3db63 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
 tmtookit: Text mining and topic modeling toolkit
 ================================================
 
-|pypi| |rtd| |travis|
+|pypi| |pypi_downloads| |rtd| |travis| |coverage|
 
 *tmtoolkit* is a set of tools for text mining and topic modeling with Python developed especially for the use in the
 social sciences. It aims for easy installation, extensive documentation and a clear programming interface while
@@ -230,10 +230,18 @@ See `LICENSE <https://github.com/WZBSocialScienceCenter/tmtoolkit/blob/master/LI
     :target: https://badge.fury.io/py/tmtoolkit
     :alt: PyPI Version
 
+.. |pypi_downloads| image:: https://img.shields.io/pypi/dm/tmtoolkit
+    :target: https://pypi.org/project/tmtoolkit/
+    :alt: Downloads from PyPI
+
 .. |travis| image:: https://travis-ci.org/WZBSocialScienceCenter/tmtoolkit.svg?branch=master
     :target: https://travis-ci.org/WZBSocialScienceCenter/tmtoolkit
     :alt: Travis CI Build Status
 
+.. |coverage| image:: https://raw.githubusercontent.com/WZBSocialScienceCenter/tmtoolkit/master/coverage.svg
+    :target: https://github.com/WZBSocialScienceCenter/tmtoolkit/tree/master/tests
+    :alt: Coverage status
+
 .. |rtd| image:: https://readthedocs.org/projects/tmtoolkit/badge/?version=latest
     :target: https://tmtoolkit.readthedocs.io/en/latest/?badge=latest
     :alt: Documentation Status
diff --git a/coverage.svg b/coverage.svg
new file mode 100644
index 0000000..b3e8ba0
--- /dev/null
+++ b/coverage.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="99" height="20">
+    <linearGradient id="b" x2="0" y2="100%">
+        <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
+        <stop offset="1" stop-opacity=".1"/>
+    </linearGradient>
+    <mask id="a">
+        <rect width="99" height="20" rx="3" fill="#fff"/>
+    </mask>
+    <g mask="url(#a)">
+        <path fill="#555" d="M0 0h63v20H0z"/>
+        <path fill="#a4a61d" d="M63 0h36v20H63z"/>
+        <path fill="url(#b)" d="M0 0h99v20H0z"/>
+    </g>
+    <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
+        <text x="31.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
+        <text x="31.5" y="14">coverage</text>
+        <text x="80" y="15" fill="#010101" fill-opacity=".3">88%</text>
+        <text x="80" y="14">88%</text>
+    </g>
+</svg>