From 36feb3c0a2e3615464ba7e75fb22c36446cbc646 Mon Sep 17 00:00:00 2001 From: roll Date: Sat, 5 Mar 2016 23:37:51 +0300 Subject: [PATCH] [#18] renamed module to jsontableschema_sql --- README.md | 8 ++++---- examples/base.py | 4 ++-- {jtssql => jsontableschema_sql}/VERSION | 0 {jtssql => jsontableschema_sql}/__init__.py | 0 {jtssql => jsontableschema_sql}/helpers.py | 0 {jtssql => jsontableschema_sql}/storage.py | 0 setup.py | 2 +- tests/module/test_storage.py | 2 +- tox.ini | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) rename {jtssql => jsontableschema_sql}/VERSION (100%) rename {jtssql => jsontableschema_sql}/__init__.py (100%) rename {jtssql => jsontableschema_sql}/helpers.py (100%) rename {jtssql => jsontableschema_sql}/storage.py (100%) diff --git a/README.md b/README.md index 8de5491..5e23584 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ Package implements [Tabular Storage](https://github.com/okfn/datapackage-storage SQLAlchemy is used as sql wrapper. We can get storage this way: ```python -import jtssql from sqlalchemy import create_engine +from jsontableschema_sql import Storage engine = create_engine('sqlite:///:memory:', prefix='prefix') -storage = jtssql.Storage(engine) +storage = Storage(engine) ``` Then we could interact with storage: @@ -24,7 +24,7 @@ Then we could interact with storage: ```python storage.tables storage.check('table_name') # check existence -storage.create('table_name', shema) +storage.create('table_name', schema) storage.delete('table_name') storage.describe('table_name') # return schema storage.read('table_name') # return data @@ -45,7 +45,7 @@ SQLAlchemy is used - [docs](http://www.sqlalchemy.org/). ## Documentation API documentation is presented as docstings: -- [Storage](https://github.com/okfn/jsontableschema-sql-py/blob/master/jtssql/storage.py) +- [Storage](https://github.com/okfn/jsontableschema-sql-py/blob/master/jsontableschema_sql/storage.py) ## Contributing diff --git a/examples/base.py b/examples/base.py index f5a60ff..2a532d1 100644 --- a/examples/base.py +++ b/examples/base.py @@ -8,14 +8,14 @@ from sqlalchemy import create_engine sys.path.insert(0, '.') -import jtssql +from jsontableschema_sql import Storage def run(url, prefix, table, schema, data): # Storage engine = create_engine(url) - storage = jtssql.Storage(engine=engine, prefix=prefix) + storage = Storage(engine=engine, prefix=prefix) # Check table if storage.check(table): diff --git a/jtssql/VERSION b/jsontableschema_sql/VERSION similarity index 100% rename from jtssql/VERSION rename to jsontableschema_sql/VERSION diff --git a/jtssql/__init__.py b/jsontableschema_sql/__init__.py similarity index 100% rename from jtssql/__init__.py rename to jsontableschema_sql/__init__.py diff --git a/jtssql/helpers.py b/jsontableschema_sql/helpers.py similarity index 100% rename from jtssql/helpers.py rename to jsontableschema_sql/helpers.py diff --git a/jtssql/storage.py b/jsontableschema_sql/storage.py similarity index 100% rename from jtssql/storage.py rename to jsontableschema_sql/storage.py diff --git a/setup.py b/setup.py index cafb5a3..002b4ee 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ def read(*paths): # Prepare -PACKAGE = 'jtssql' +PACKAGE = 'jsontableschema_sql' INSTALL_REQUIRES = [ 'six', 'sqlalchemy', diff --git a/tests/module/test_storage.py b/tests/module/test_storage.py index 59cb17a..796d649 100644 --- a/tests/module/test_storage.py +++ b/tests/module/test_storage.py @@ -8,7 +8,7 @@ import unittest from mock import MagicMock, patch, ANY from importlib import import_module -module = import_module('jtssql.storage') +module = import_module('jsontableschema_sql.storage') class TestTable(unittest.TestCase): diff --git a/tox.ini b/tox.ini index df5f8a8..3c7d36e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -package=jtssql +package=jsontableschema_sql skip_missing_interpreters=true envlist= py27