Skip to content

Commit

Permalink
Release 1.1.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed May 1, 2016
2 parents 8e1c02c + 952334b commit 2071571
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build Status](https://travis-ci.org/dennissiemensma/dsmr-reader.svg?branch=master)](https://travis-ci.org/dennissiemensma/dsmr-reader)
[![Coverage](https://codecov.io/github/dennissiemensma/dsmr-reader/coverage.svg?branch=master)](https://codecov.io/github/dennissiemensma/dsmr-reader?branch=master)
[![Requirements Status](https://requires.io/github/dennissiemensma/dsmr-reader/requirements.svg?branch=master)](https://requires.io/github/dennissiemensma/dsmr-reader/requirements/?branch=master)
[![Documentation Status](http://readthedocs.org/projects/dsmr-reader/badge/?version=latest)](http://dsmr-reader.readthedocs.org/en/latest/?badge=latest)
[![Documentation Status](http://readthedocs.org/projects/dsmr-reader/badge/?version=latest)](http://dsmr-reader.readthedocs.io/en/latest/?badge=latest)


# About
Expand All @@ -12,15 +12,15 @@ There are plenty of ‘scripts’ and websites available for performing DSMR rea

**English**

See [Read The Docs, in English](http://dsmr-reader.readthedocs.org/en/latest/). Installation guide can be found there as well.
See [Read The Docs, in English](http://dsmr-reader.readthedocs.io/en/latest/). Installation guide can be found there as well.

**Dutch / Nederlands**

Zie [Read The Docs, in het Nederlands](http://dsmr-reader.readthedocs.org/nl/latest/). Je kunt daar ook alle installatieinstructies vinden.
Zie [Read The Docs, in het Nederlands](http://dsmr-reader.readthedocs.io/nl/latest/). Je kunt daar ook alle installatieinstructies vinden.


# Screenshots
More screenshots can be found in the documentation at [Read The Docs](http://dsmr-reader.readthedocs.org/en/latest/screenshots.html).
More screenshots can be found in the documentation at [Read The Docs](http://dsmr-reader.readthedocs.io/en/latest/screenshots.html).

## Dashboard
![Dashboard](docs/_static/screenshots/dashboard.png)
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ Changelog
=========


v1.1.2 - 2016-05-01
^^^^^^^^^^^^^^^^^^^
- Trends page giving errors (when lacking data) (`#125 <https://github.com/dennissiemensma/dsmr-reader/issues/125>`_).


v1.1.1 - 2016-04-27
^^^^^^^^^^^^^^^^^^^
- Improve readme (`#124 <https://github.com/dennissiemensma/dsmr-reader/issues/124>`_).
Expand Down
2 changes: 2 additions & 0 deletions docs/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ Software

- `Full Page Screen Capture <https://chrome.google.com/webstore/detail/full-page-screen-capture/fdpohaocaechififmbbbbbknoalclacl?>`_


Testers & contributors
----------------------

- `Jeroen Peters <https://www.linkedin.com/in/jeroenpeters1986>`_ (`Github profile <https://github.com/jeroenpeters1986>`_)
- `Daniel ter Horst <https://www.linkedin.com/in/danielterhorst>`_ (`Github profile <https://github.com/danielterhorst>`_)
- `Sander de Leeuw <https://www.linkedin.com/in/sander-de-leeuw-58313aa0>`_ (`Github profile <https://github.com/sdeleeuw>`_)
- "WatskeBart" (`Github profile <https://github.com/WatskeBart>`_)
- `Gert Schaafsma <https://www.linkedin.com/in/gertschaafsma>`_
- `Bert-Jan Vos <https://www.linkedin.com/in/bert-jan-vos-82011712>`_

Expand Down
2 changes: 1 addition & 1 deletion dsmr_frontend/templates/dsmr_frontend/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{% block header_right %}{% endblock %}

<li>
<a href="http://dsmr-reader.readthedocs.org/{{ LANGUAGE_CODE }}/latest/changelog.html" target="_blank" title="{% trans 'View releases' %}">
<a href="http://dsmr-reader.readthedocs.io/{{ LANGUAGE_CODE }}/latest/changelog.html" target="_blank" title="{% trans 'View releases' %}">
<small>v{{ dsmr_version }}</small>
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions dsmr_frontend/templates/dsmr_frontend/status.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
<table class="table table-condensed">
<tr>
<td class="col-md-6">{% trans "Current version" %} {% trans "DSMR-reader" %}</td>
<td class="col-md-6"><a href="https://github.com/dennissiemensma/dsmr-reader/releases/tag/v{{ dsmr_version }}" target="_blank" title="{% trans 'View current release' %}">v{{ dsmr_version }}</a></td>
<td class="col-md-6"><a href="https://github.com/dennissiemensma/dsmr-reader/releases/" target="_blank" title="{% trans 'View releases' %}">v{{ dsmr_version }}</a></td>
</tr>
<tr>
<td class="col-md-6">{% trans "Changelog" %}</td>
<td class="col-md-6"><a href="http://dsmr-reader.readthedocs.org/{{ LANGUAGE_CODE }}/latest/changelog.html" target="_blank">{% trans 'View all releases' %}</a></td>
<td class="col-md-6"><a href="http://dsmr-reader.readthedocs.io/{{ LANGUAGE_CODE }}/latest/changelog.html" target="_blank">{% trans 'View all releases' %}</a></td>
</tr>
</table>
</div><!-- /.panel-body -->
Expand Down
5 changes: 5 additions & 0 deletions dsmr_stats/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ def electricity_tariff_percentage(start_date):
electricity1=Sum('electricity1'),
electricity2=Sum('electricity2'),
)

# Empty data will crash.
if not all(totals.values()):
return None

global_total = totals['electricity1'] + totals['electricity2']
totals['electricity1'] = math.ceil(totals['electricity1'] / global_total * 100)
totals['electricity2'] = 100 - totals['electricity1']
Expand Down
4 changes: 4 additions & 0 deletions dsmr_stats/tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ def test_electricity_tariff_percentage(self):
self.assertEqual(percentages['electricity1'], 25)
self.assertEqual(percentages['electricity2'], 75)

# Now try again without data.
DayStatistics.objects.all().delete()
percentages = dsmr_stats.services.electricity_tariff_percentage(start_date=target_date.date())


class TestServicesWithoutGas(TestServices):
fixtures = ['dsmr_stats/electricity-consumption.json']
2 changes: 1 addition & 1 deletion dsmrreader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
from django.utils.version import get_version


VERSION = (1, 1, 1, 'final', 0)
VERSION = (1, 1, 2, 'final', 0)

__version__ = get_version(VERSION)

0 comments on commit 2071571

Please sign in to comment.