-
Notifications
You must be signed in to change notification settings - Fork 138
WIP: source: Mysql Source feature #114
Conversation
import unittest
from dffml.util.testing.source import SourceTest
from dffml.util.asynctestcase import AsyncTestCase
from dffml.source.mysql import MysqlSourceConfig, MysqlSource
class TestMysqlSource(SourceTest, AsyncTestCase):
async def setUpSource(self):
return MysqlSource(
MysqlSourceConfig(... parameters, get from os.getenv ...)
# user=os.getenv("MYSQL_USER")
# password=os.getenv("MYSQL_PASSWORD")
)
@unittest.SkipIf(os.getenv("MYSQL_USER", default=None) is None, "Need MYSQL_ env variables to run MySQL Source tests")
async def test_update():
await super().test_update() We will start a mysql database within travis CI and set environment variables the same way we start the database, aka, same |
To have # ...
packages=find_packages(),
install_requires=[
"aiomysql>=Go find the latest version number of PyPi and put it here",
],
include_package_data=True,
# ... |
Codecov Report
@@ Coverage Diff @@
## master #114 +/- ##
=======================================
Coverage 92.79% 92.79%
=======================================
Files 57 57
Lines 3537 3537
Branches 408 408
=======================================
Hits 3282 3282
Misses 198 198
Partials 57 57 Continue to review full report at Codecov.
|
dffml/source/mysql_source.py
Outdated
yield await self.repo(src_url) | ||
|
||
async def repo(self, src_url: str): | ||
if self.parent.config.repo_query != "": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repo_query is required, so you don't need to check if it's an empty string
tests/source/test_mysql.py
Outdated
table="repo_data", | ||
repo_query="", | ||
update_query="", | ||
repos_query="", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work unless you set repo_query, update_query, repos_query
Signed-off-by: John Andersen <[email protected]>
For testing purpose, SSL certificate was generated using
|
This pull request introduces 1 alert when merging c791b2c into 26e8313 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 6c67cee into d4b2a35 - view on LGTM.com new alerts:
|
Signed-off-by: John Andersen <[email protected]>
This pull request introduces 2 alerts when merging 181bf51 into d4b2a35 - view on LGTM.com new alerts:
|
…l: Permission denied Signed-off-by: John Andersen <[email protected]>
This pull request introduces 2 alerts when merging 67c139b into d4b2a35 - view on LGTM.com new alerts:
|
Signed-off-by: John Andersen <[email protected]>
Signed-off-by: John Andersen <[email protected]>
Signed-off-by: John Andersen <[email protected]>
…certificate chain Signed-off-by: John Andersen <[email protected]>
Signed-off-by: John Andersen <[email protected]>
Signed-off-by: John Andersen <[email protected]>
Signed-off-by: John Andersen <[email protected]>
Signed-off-by: John Andersen <[email protected]>
Signed-off-by: John Andersen <[email protected]>
Signed-off-by: John Andersen <[email protected]>
commit 2a459b3 Author: Yash Lamba <[email protected]> Date: Fri Sep 6 22:18:19 2019 +0530 README: Add black badge commit 5bf5701 Author: John Andersen <[email protected]> Date: Tue Sep 3 14:18:21 2019 -0700 model: scikit: Fix CLI based configuration Signed-off-by: John Andersen <[email protected]> commit 917d997 Author: John Andersen <[email protected]> Date: Tue Sep 3 13:36:02 2019 -0700 base: Log config on init Signed-off-by: John Andersen <[email protected]> commit f4a5dda Author: John Andersen <[email protected]> Date: Tue Sep 3 08:55:04 2019 -0700 setup: Not zip safe Signed-off-by: John Andersen <[email protected]> commit 2864a11 Author: John Andersen <[email protected]> Date: Wed Aug 28 11:17:51 2019 -0700 README: Add link to master docs Signed-off-by: John Andersen <[email protected]> commit 47f76b0 Author: Yash Lamba <[email protected]> Date: Wed Aug 28 17:15:09 2019 +0530 model: scikit: Changed self to cls commit 1823b9e Author: John Andersen <[email protected]> Date: Tue Aug 27 08:48:52 2019 -0700 service: http: Fix type in securiy docs Signed-off-by: John Andersen <[email protected]> commit c4d5d2f Author: John Andersen <[email protected]> Date: Tue Aug 27 08:39:38 2019 -0700 service: http: Release HTTP service (intel#182) Signed-off-by: John Andersen <[email protected]> commit 075577a Author: Pankaj Patil <[email protected]> Date: Mon Aug 26 09:04:26 2019 +0530 examples: source: Rename testcase Fixes: intel#117 commit af19211 Author: John Andersen <[email protected]> Date: Fri Aug 23 13:44:14 2019 -0700 setup: Capitalize version and readme Signed-off-by: John Andersen <[email protected]> commit 15597c9 Author: John Andersen <[email protected]> Date: Fri Aug 23 13:36:35 2019 -0700 README: Remove link to HACKING.md Signed-off-by: John Andersen <[email protected]> commit 9fd0c55 Author: John Andersen <[email protected]> Date: Fri Aug 23 13:31:57 2019 -0700 docs: CONTRIBUTING: Merge HACKING Fixes: intel#166 Signed-off-by: John Andersen <[email protected]> commit ce03f9b Author: John Andersen <[email protected]> Date: Fri Aug 23 12:42:19 2019 -0700 cli: Enable usage via module invokation * Example: $ python3.7 -m dffml list repos Signed-off-by: John Andersen <[email protected]> commit db326cb Author: John Andersen <[email protected]> Date: Thu Aug 22 14:56:34 2019 -0700 service: dev: List entrypoints Signed-off-by: John Andersen <[email protected]> commit 7d1c6f6 Author: John Andersen <[email protected]> Date: Thu Aug 22 14:07:31 2019 -0700 model: scikit: Correct entrypoints again Signed-off-by: John Andersen <[email protected]> commit bab734e Author: Yash Lamba <[email protected]> Date: Thu Aug 22 05:36:53 2019 +0530 model: scikit: corrected entry points Fixes: intel#165 commit eb9b600 Author: John Andersen <[email protected]> Date: Fri Aug 16 13:46:51 2019 -0700 style: Correct style of all submodules * Enforce style in all submodules via ci Fixes: intel#173 Signed-off-by: John Andersen <[email protected]> commit c9cd3ea Author: John Andersen <[email protected]> Date: Fri Aug 16 11:45:04 2019 -0700 examples: shouldi: Add dev mode hack Fixes: intel#174 Signed-off-by: John Andersen <[email protected]> commit 452a182 Author: John Andersen <[email protected]> Date: Thu Aug 15 14:48:17 2019 -0700 news: origin/master August 15 2019 Signed-off-by: John Andersen <[email protected]> commit 3d04591 Author: John Andersen <[email protected]> Date: Mon Aug 12 18:34:53 2019 -0700 skel: source: entry_points correction * setup() kwargs entry_points was the service entrypoint, corrected to the source entrypoint. Fixes: intel#162 commit c854e40 Author: Sudharsana K J L <[email protected]> Date: Sun Aug 11 09:33:19 2019 +0530 source: csv: Add label Co-authored-by: John Andersen <[email protected]> Signed-off-by: John Andersen <[email protected]> commit 7afd85a Author: Yash Lamba <[email protected]> Date: Sun Aug 11 03:00:45 2019 +0530 model: scikit: Create models and configs dynamicly commit d478dee Author: Saksham Arora <[email protected]> Date: Sun Aug 11 02:32:36 2019 +0530 docs: HACKING: Added logging for testing
Signed-off-by: John Andersen <[email protected]>
Signed-off-by: John Andersen <[email protected]>
This pull request introduces 6 alerts when merging 39512c3 into 2a459b3 - view on LGTM.com new alerts:
|
This PR hopes to add a feature to work with data from a mysql database.