Commits

Matthew Schinckel committed 4db5cd9

Add support for coverage badges.
Currently support drone.io badges.

Comments (0)

Files changed (162)

 include django_coverage/utils/module_tools/*.py
 include django_coverage/utils/coverage_report/*.py
 include django_coverage/utils/coverage_report.templates/*.py
-include django_coverage/utils/coverage_report/badges/*.png
+include django_coverage/utils/coverage_report/badges/*/*.png
 
Add a comment to this file

assets/badges/drone.io/coverage_status.png

Added
New image
Add a comment to this file

assets/badges/drone.io/layered.acorn

Binary file added.

Add a comment to this file

assets/badges/drone.io/status.png

Added
New image

django_coverage/settings.py

 # This makes it possible to both generate HTML reports and see coverage
 # information on STDOUT.
 COVERAGE_USE_STDOUT = getattr(settings, 'COVERAGE_USE_STDOUT', COVERAGE_REPORT_HTML_OUTPUT_DIR is None)
+
+# The name of the folder within utils/coverage_report/badges/ that
+# contains the badges we want to use.
+COVERAGE_BADGE_TYPE = getattr(settings, 'COVERAGE_BADGE_TYPE', 'drone.io')
Add a comment to this file

django_coverage/utils/coverage_report/badges/100.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/47.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/48.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/49.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/50.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/51.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/52.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/53.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/54.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/55.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/56.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/57.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/58.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/59.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/60.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/61.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/62.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/63.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/64.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/65.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/66.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/67.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/68.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/69.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/70.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/71.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/72.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/73.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/74.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/75.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/76.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/77.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/78.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/79.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/80.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/81.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/82.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/83.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/84.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/85.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/86.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/87.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/88.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/89.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/90.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/91.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/92.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/93.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/94.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/95.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/96.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/97.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/98.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/99.png

Removed
Old image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/0.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/1.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/10.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/100.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/11.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/12.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/13.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/14.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/15.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/16.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/17.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/18.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/19.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/2.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/20.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/21.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/22.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/23.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/24.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/25.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/26.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/27.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/28.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/29.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/3.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/30.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/31.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/32.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/33.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/34.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/35.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/36.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/37.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/38.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/39.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/4.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/40.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/41.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/42.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/43.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/44.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/45.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/46.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/47.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/48.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/49.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/5.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/50.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/51.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/52.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/53.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/54.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/55.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/56.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/57.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/58.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/59.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/6.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/60.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/61.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/62.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/63.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/64.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/65.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/66.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/67.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/68.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/69.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/7.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/70.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/71.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/72.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/73.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/74.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/75.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/76.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/77.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/78.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/79.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/8.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/80.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/81.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/82.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/83.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/84.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/85.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/86.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/87.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/88.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/89.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/9.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/90.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/91.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/92.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/93.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/94.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/95.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/96.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/97.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/98.png

Added
New image
Add a comment to this file

django_coverage/utils/coverage_report/badges/drone.io/99.png

Added
New image

django_coverage/utils/coverage_report/html_report.py

 from html_module_errors import html_module_errors
 from html_module_excludes import html_module_excludes
 from templates import default_module_index as module_index
+from django_coverage import settings
 
 def html_report(outdir, modules, excludes=None, errors=None):
     """
     print >>fo, module_index.BOTTOM
     fo.close()
     
-    badge = open(os.path.join(os.path.dirname(__file__), 'badges', '%s.png' % int(overall_covered))).read()
+    badge = open(os.path.join(
+        os.path.dirname(__file__), 
+        'badges', 
+        settings.COVERAGE_BADGE_TYPE, 
+        '%s.png' % int(overall_covered)
+    )).read()
     open(os.path.join(outdir, 'coverage_status.png'), 'wb').write(badge)
 
                 'django_coverage.utils.module_tools',
                 'django_coverage.utils.coverage_report',
                 'django_coverage.utils.coverage_report.templates'],
-      package_data={'django_coverage': ['utils/coverage_report/badges/*.png']},
+      package_data={'django_coverage': ['utils/coverage_report/badges/*/*.png']},
 
       requires = ['django (>=1.2)', 'coverage (>= 2.85)'],
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.