Switch to SQLAlchemy for the Recorder component. Gives the ability t… (#2377)

* Switch to SQLAlchemy for the Recorder component.  Gives the ability to use MySQL or other.

* fixes for failed lint

* add conversion script

* code review fixes and refactor to use to_native() model methods and execute() helper

* move script to homeassistant.scripts module

* style fixes my tox lint/flake8 missed

* move exclusion up
This commit is contained in:
rhooper authored and Paulus Schoutsen committed 2016-07-02 11:22:51 -07:00
1 parent a65f196d19
commit a2e45b8fdd
11 files changed
+779 -639

No files matched your search

+8 -3
View File
@@ -6,7 +6,7 @@ import pkgutil
import re
import sys
COMMENT_REQUIREMENTS = [
COMMENT_REQUIREMENTS = (
'RPi.GPIO',
'rpi-rf',
'Adafruit_Python_DHT',
@@ -14,7 +14,11 @@ COMMENT_REQUIREMENTS = [
'pybluez',
'bluepy',
'python-lirc',
]
)
IGNORE_PACKAGES = (
'homeassistant.components.recorder.models',
)
def explore_module(package, explore_children):
@@ -59,7 +63,8 @@ def gather_modules():
try:
module = importlib.import_module(package)
except ImportError:
errors.append(package)
if package not in IGNORE_PACKAGES:
errors.append(package)
continue
if not getattr(module, 'REQUIREMENTS', None):