From 690e8ec9fe9c8d0f5bf9bd3b4066c2ed49a29a16 Mon Sep 17 00:00:00 2001 From: josuebrunel Date: Sun, 24 May 2015 10:14:38 +0200 Subject: [PATCH 1/4] #1: updating documentation --- README.md | 6 +++--- README.rst | 50 ++++++++++++-------------------------------------- setup.py | 2 +- 3 files changed, 16 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index ae9d7d6..2149e65 100755 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Yahoo! Query Language Documentation and Support Release Notes ============== -v 1.2.2 ( development ) +v 1.2.2 ------- * **Python3** support OK [#71](https://github.com/josuebrunel/myql/issues/71) * Fixed issue with **IN** condition in **where** clause @@ -39,7 +39,7 @@ v 1.2.2 ( development ) v 1.2.1 ------ -* Multiple requests while using OAuth fixed +* Multiple requests while using OAuth fixed v 1.2.0 ------- @@ -53,7 +53,7 @@ v 0.5.6 * select data format (xml/json) * change data source * filter data -* fix handling of default and on the fly response format +* fix handling of default response format on the fly * fix limit on ***select(...).where(...)*** when no limit value is passed * fix limit on ***get(...)*** diff --git a/README.rst b/README.rst index 7153a15..4f1ad75 100644 --- a/README.rst +++ b/README.rst @@ -1,33 +1,17 @@ -`MYQL <.>`_ - -- `MYQL `_ -- `StockScraper `_ -- `YOAuth `_ -- `Open Table `_ -- `Contribute `_ - -  ** ` <.>`_ - -- `Docs <.>`_ » -- Home -- `Edit on GitHub `_ - --------------- - -MYQL +mYQL ==== -MYQL is a Python wrapper of the Yahoo Query Language. +mYQL is a Python wrapper of the Yahoo Query Language. Read the full Documentation `Here ` Yahoo! Query Language Documentation and Support =============================================== -- `Yahoo! Query Language `_ -- `Yahoo! Developer Network `_ -- `Yahoo! Application Platform `_ -- `Yahoo! Social APIs `_ +- `Yahoo! Query Language `__ +- `Yahoo! Developer Network `__ +- `Yahoo! Application Platform `__ +- `Yahoo! Social APIs `__ - `Yahoo! Query Language - Console `_ + Console `__ Installation ============ @@ -36,16 +20,6 @@ Installation $ pip install myql -:: - - $ pip install git+https://github.com/josuebrunel/myql.git - -Or download the package and run - -:: - - $ python setup.py install --record files_path.txt - Quick Start =========== @@ -247,12 +221,12 @@ Using OAuth to fetch protected resources >>> yql = MYQL(format='xml', oauth=oauth) >>> response = yql.getGUID('josue_brunel') # Deal with the response -` `_\ Next +` `__\ Next -------------- -Built with `MkDocs `_ using a -`theme `_ provided by `Read -the Docs `_. +Built with `MkDocs `__ using a +`theme `__ provided by `Read +the Docs `__. -GitHub `« Previous <>`_ `Next » `_ +GitHub `« Previous <>`__ `Next » `__ diff --git a/setup.py b/setup.py index 0280cc6..364c47d 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( - name = "mYQL", + name = "myql", version = __version__, description = "Python Wrapper for the Yahoo! Query Language. Allowing to run YQL queries, fetch financial data and create YQL Open Tables", long_description = read("README.rst"), From 6b4f6eb37efd439a6d427f48598ad957b61b9e32 Mon Sep 17 00:00:00 2001 From: josuebrunel Date: Sun, 24 May 2015 11:51:50 +0200 Subject: [PATCH 2/4] #1: link to myql documentation added --- README.md | 2 +- README.rst | 2 +- tests/tests.py | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2149e65..5c8d941 100755 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ mYQL [![Join the chat at https://gitter.im/josuebrunel/myql](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/josuebrunel/myql?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Code Issues](https://www.quantifiedcode.com/project/gh:josuebrunel:myql/badge.svg)](https://www.quantifiedcode.com/app/project/gh:josuebrunel:myql) -mYQL is a Python wrapper of the Yahoo Query Language. +mYQL is a Python wrapper of the Yahoo Query Language. Full documentation [here](http://myql.readthedocs.org/en/latest/) Yahoo! Query Language Documentation and Support =============================================== diff --git a/README.rst b/README.rst index 4f1ad75..3505082 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ mYQL ==== -mYQL is a Python wrapper of the Yahoo Query Language. Read the full Documentation `Here ` +mYQL is a Python wrapper of the Yahoo Query Language. Read the full Documentation `http://myql.readthedocs.org/en/latest/` Yahoo! Query Language Documentation and Support =============================================== diff --git a/tests/tests.py b/tests/tests.py index 0a27721..31489a1 100755 --- a/tests/tests.py +++ b/tests/tests.py @@ -20,12 +20,11 @@ readline.parse_and_bind('tab: complete') logging.basicConfig(level=logging.DEBUG,format="[%(asctime)s %(levelname)s] [%(name)s.%(module)s.%(funcName)s] %(message)s \n") -logging.getLogger(__name__) +logging.getLogger('Test-mYQL') def json_write_data(json_data, filename): with open(filename, 'w') as fp: - #json.dump(json_data, fp, indent=4, encoding= 'utf-8', sort_keys=True) json.dump(json_data, fp, indent=4, sort_keys=True, ensure_ascii=False) return True return False @@ -34,14 +33,14 @@ def json_get_data(filename): with open(filename, 'r') as fp: json_data = json.load(fp) return json_data - + class TestMYQL(unittest.TestCase): def setUp(self,): self.yql = MYQL(format='json',community=True) self.insert_result = None - + def tearDown(self): pass @@ -110,7 +109,7 @@ def test_2_check_insert(self,): except (Exception,) as e: logging.error(response.content) logging.error(e) - + self.assertEqual(response.status_code,200) def test_3_update(self,): From 9421047b752884f8a5436e4e627c82c79ccfd4d3 Mon Sep 17 00:00:00 2001 From: josuebrunel Date: Mon, 25 May 2015 11:06:22 +0200 Subject: [PATCH 3/4] updating stuff up --- myql/myql.py | 4 ---- setup.py | 6 ++++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/myql/myql.py b/myql/myql.py index c838051..395c902 100755 --- a/myql/myql.py +++ b/myql/myql.py @@ -5,10 +5,6 @@ from myql.contrib.auth import YOAuth import myql.errors -import importlib - -__author__ = 'Josue Kouka' -__email__ = 'josuebrunel@gmail.com' logging.basicConfig(level=logging.DEBUG,format="[%(asctime)s %(levelname)s] [%(name)s.%(module)s.%(funcName)s] %(message)s \n") logger = logging.getLogger('mYQL') diff --git a/setup.py b/setup.py index 364c47d..4fabd28 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,8 @@ import os from setuptools import setup, find_packages +__author__ = 'Josue Kouka' +__email__ = 'josuebrunel@gmail.com' __version__ = "1.2.2" #requirements.txt @@ -15,8 +17,8 @@ def read(fname): version = __version__, description = "Python Wrapper for the Yahoo! Query Language. Allowing to run YQL queries, fetch financial data and create YQL Open Tables", long_description = read("README.rst"), - author = "Josue Kouka", - author_email = "josuebrunel@gmail.com", + author = __author__, + author_email = __email__, url = "https://github.com/josuebrunel/MYQL", download_url = "https://github.com/josuebrunel/myql/archive/{0}.tar.gz".format(__version__), keywords = ['myql', 'yql', 'yahoo', 'query', 'language'], From 125682382eb67766f452bbf007563ca3cc08e267 Mon Sep 17 00:00:00 2001 From: josuebrunel Date: Mon, 25 May 2015 22:44:21 +0200 Subject: [PATCH 4/4] access to community table by default --- myql/myql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myql/myql.py b/myql/myql.py index 395c902..468bf44 100755 --- a/myql/myql.py +++ b/myql/myql.py @@ -24,7 +24,7 @@ class MYQL(object): private_url = 'http://query.yahooapis.com/v1/yql' community_data = "env 'store://datatables.org/alltableswithkeys'; " #Access to community table - def __init__(self, table=None, url=public_url, community=False, format='json', jsonCompact=False, crossProduct=None, debug=False, oauth=None): + def __init__(self, table=None, url=public_url, community=True, format='json', jsonCompact=False, crossProduct=None, debug=False, oauth=None): self.table = table self.format = format self._query = None # used to build query when using methods such as