Skip to content

Commit

Permalink
Released 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Apr 16, 2019
1 parent c5c038a commit 7f52bc4
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 27 deletions.
5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
LET OP: Wegens verminderde beschikbaarheid tot aan medio april 2019,
kan het zijn dat de auteur minder snel of helemaal niet in de
gelegenheid is om te reageren. Zie ook issue #576.
----

### Jouw omgeving
*(Indien van toepassing)*
* DSMR-reader versie *(rechtsbovenin applicatie zichtbaar)*: `v1.X.Y`
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: python

# https://docs.travis-ci.com/user/languages/python/
python:
- 3.4
- 3.5
- 3.6
- 3.5-dev
Expand All @@ -24,7 +23,8 @@ addons:
postgresql: "9.4"

env:
- DB=sqlite DJANGO_SETTINGS_MODULE='dsmrreader.config.travis.sqlite'
### Disabled until Travis upgrades SQLite.
### - DB=sqlite DJANGO_SETTINGS_MODULE='dsmrreader.config.travis.sqlite'
- DB=mysql DJANGO_SETTINGS_MODULE='dsmrreader.config.travis.mysql'
- DB=postgresql DJANGO_SETTINGS_MODULE='dsmrreader.config.travis.postgresql'

Expand Down
22 changes: 22 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ Please make sure you have a fresh **database backup** before upgrading! Upgradin
----



v2.0.0 - 2019-04-16
^^^^^^^^^^^^^^^^^^^^

.. warning:: **Change in Python support**

- The support for ``Python 3.4`` has been **dropped** due to the Django upgrade (`#512 <https://github.com/dennissiemensma/dsmr-reader/issues/512>`.


**Tickets resolved in this release:**


- [`#512 <https://github.com/dennissiemensma/dsmr-reader/issues/512>`_] Drop support for Python 3.4
- [`#510 <https://github.com/dennissiemensma/dsmr-reader/issues/510>`_] Django 2.1 released
- [`#616 <https://github.com/dennissiemensma/dsmr-reader/issues/616>`_] Requirements update (April 2019)
- [`#596 <https://github.com/dennissiemensma/dsmr-reader/issues/596>`_] Update django to 2.0.13 - by Timdebruijn
- [`#580 <https://github.com/dennissiemensma/dsmr-reader/issues/580>`_] Django security releases issued: 2.0.10 - by mjanssens


----


v1.28.0 - 2019-01-04
^^^^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 2 additions & 0 deletions docs/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Listed in any order, sorted by name.
- `mbnn <https://github.com/mbnn>`_
- `meijjaa <https://github.com/meijjaa>`_
- `michielvisser <https://github.com/michielvisser>`_
- `mjanssens <https://github.com/mjanssens>`_
- `mkruiver <https://github.com/mkruiver>`_
- `mrvanes <https://github.com/mrvanes>`_
- `Oliver Payne <https://github.com/olipayne>`_
Expand All @@ -64,6 +65,7 @@ Listed in any order, sorted by name.
- `ThinkPadNL <https://github.com/ThinkPadNL>`_
- `thommy101 <https://github.com/thommy101>`_
- Tijs van Noije
- `Timdebruijn <https://github.com/Timdebruijn>`_
- `TopdRob <https://github.com/TopdRob>`_
- `tpjanssen <https://github.com/tpjanssen>`_
- `trbs <https://github.com/trbs>`_
Expand Down
3 changes: 3 additions & 0 deletions dsmr_api/tests/v2/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def app(self):

def test_user_does_not_exist(self):
""" Tests what happens when the API user was not created. """
if connection.vendor == 'sqlite': # pragma: no cover
return self.skipTest(reason='SQLite cannot be used while foreign key constraint checks are enabled')

# Roll back migration creating the API user.
MigrationExecutor(connection=connection).migrate([(self.app, '0002_generate_random_auth_key')])

Expand Down
3 changes: 1 addition & 2 deletions dsmr_consumption/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def live_electricity_consumption(use_naturaltime=True):
data['currently_returned'] = int(latest_reading.electricity_currently_returned * 1000)

if use_naturaltime:
data['timestamp'] = naturaltime(data['timestamp'])
data['timestamp'] = str(naturaltime(data['timestamp']))

try:
# This WILL fail when we either have no prices at all or conflicting ranges.
Expand All @@ -327,7 +327,6 @@ def live_electricity_consumption(use_naturaltime=True):
data['cost_per_hour'] = formats.number_format(
round_decimal(cost_per_hour)
)

return data


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ def setUp(self):

def test_no_reverse_match_docs(self):
""" Test whether the docs URL in old notfications are converted to their new location. """
if connection.vendor == 'sqlite': # pragma: no cover
return self.skipTest(reason='SQLite cannot be used while foreign key constraint checks are enabled')

Notification.objects.create(
message='Fake',
redirect_to='frontend:docs', # Non-existing legacy.
Expand Down
3 changes: 1 addition & 2 deletions dsmr_frontend/tests/webinterface/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from django.utils import timezone
from django.urls import reverse
from django.contrib.auth.models import User
from django.db.models import F

from dsmr_consumption.models.consumption import ElectricityConsumption, GasConsumption
from dsmr_consumption.models.energysupplier import EnergySupplierPrice
Expand Down Expand Up @@ -90,7 +89,7 @@ def test_dashboard_xhr_header(self, now_mock):

def test_dashboard_xhr_header_future(self):
# Set timestamp to the future, so the view will reset the timestamp displayed to 'now'.
DsmrReading.objects.all().update(timestamp=F('timestamp') + timezone.timedelta(weeks=999))
DsmrReading.objects.all().update(timestamp=timezone.now() + timezone.timedelta(weeks=1))

response = self.client.get(
reverse('{}:dashboard-xhr-header'.format(self.namespace))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def app(self):

def test_next_sync_setting_retroactive(self):
""" Test whether the migration can also handle existing data. """
if connection.vendor == 'sqlite': # pragma: no cover
return self.skipTest(reason='SQLite cannot be used while foreign key constraint checks are enabled')

now = timezone.now().replace(microsecond=0)

TemperatureReading.objects.create(
Expand Down
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, 28, 0, 'final', 0)
VERSION = (2, 0, 0, 'final', 0)

__version__ = get_version(VERSION)
10 changes: 5 additions & 5 deletions dsmrreader/provisioning/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
crcmod==1.7
coreapi==2.3.3
django==2.0.9
django==2.2
django-colorfield==0.1.15
django-debug-toolbar==1.11
django-filter==2.0.0
djangorestframework==3.9.0
django-filter==2.1.0
djangorestframework==3.9.2
django-solo==1.1.3
dropbox==9.3.0
gunicorn==19.9.0
paho-mqtt==1.3.1
pyserial==3.4
python-dateutil==2.7.5
pytz==2018.7
python-dateutil==2.8.0
pytz==2019.1
requests==2.21.0
urllib3==1.24.1
4 changes: 2 additions & 2 deletions dsmrreader/provisioning/requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx==1.8.3
sphinx==2.0.1
sphinx-autobuild==0.7.1
sphinx-intl==0.9.11
sphinx-rtd-theme==0.4.2
sphinx-rtd-theme==0.4.3
2 changes: 1 addition & 1 deletion dsmrreader/provisioning/requirements/mysql.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mysqlclient==1.3.14
mysqlclient==1.4.2.post1
4 changes: 2 additions & 2 deletions dsmrreader/provisioning/requirements/postgresql.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
psycopg2==2.7.6.1
psycopg2-binary==2.7.6.1
psycopg2==2.8.2
psycopg2-binary==2.8.2
8 changes: 4 additions & 4 deletions dsmrreader/provisioning/requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
polib==1.1.0
pylama==7.6.6 ; python_version < '3.7' # Re-check since project seems alive again?
pytest-cov==2.6.0
pytest-django==3.4.4
pytest-xdist==1.25.0
pylama==7.7.1 ; python_version < '3.7' # Re-check since project seems alive again?
pytest-cov==2.6.1
pytest-django==3.4.8
pytest-xdist==1.28.0
2 changes: 1 addition & 1 deletion dsmrreader/provisioning/requirements/travis.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# For some reason Travis needs to be forced installing this version, or the build pretend like it doesn't know 'pytest'.
pytest==4.0.2
pytest==4.4.0

0 comments on commit 7f52bc4

Please sign in to comment.