Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
removed jsontableschema dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
roll committed Mar 27, 2016
1 parent 5fe35b4 commit f2a75a0
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 86 deletions.
18 changes: 0 additions & 18 deletions examples/topen.py
Expand Up @@ -134,24 +134,6 @@
print(exception)


print('\nUsing schema processor (parse):')
source = 'examples/data/table.csv'
with topen(source, with_headers=True) as table:
table.add_processor(processors.Schema())
print(table.headers)
for row in table:
print(row)


print('\nUsing schema processor (from schema):')
source = 'examples/data/table.csv'
with topen(source, with_headers=True) as table:
table.add_processor(processors.Schema('examples/data/schema.json'))
print(table.headers)
for row in table:
print(row)


print('\nSpaces in headers:')
source = 'https://raw.githubusercontent.com/datasets/gdp/master/data/gdp.csv'
with topen(source, with_headers=True) as table:
Expand Down
1 change: 0 additions & 1 deletion setup.py
Expand Up @@ -26,7 +26,6 @@ def read(*paths):
'chardet>=2.0',
'openpyxl>=2.0',
'requests>=2.8',
'jsontableschema>=0.5',
]
LINT_REQUIRES = [
'pylint',
Expand Down
2 changes: 1 addition & 1 deletion tabulator/helpers.py
Expand Up @@ -17,7 +17,7 @@
def detect_scheme(source):
"""Detect scheme by source.
Schema is a minimum 2 letters before `://` (will be lower cased).
Scheme is a minimum 2 letters before `://` (will be lower cased).
For example `http` from `http://example.com/table.csv`
"""
Expand Down
6 changes: 3 additions & 3 deletions tabulator/loaders/text.py
Expand Up @@ -28,10 +28,10 @@ def __init__(self, source, encoding=None, **options):
def load(self, mode):

# Prepare source
schema = 'text://'
scheme = 'text://'
source = self.__source
if source.startswith(schema):
source = source.replace(schema, '', 1)
if source.startswith(scheme):
source = source.replace(scheme, '', 1)

# Prepare encoding
encoding = self.__encoding
Expand Down
1 change: 0 additions & 1 deletion tabulator/processors/__init__.py
Expand Up @@ -7,5 +7,4 @@

from .api import Processor
from .headers import HeadersProcessor as Headers
from .schema import SchemaProcessor as Schema
from .strict import StrictProcessor as Strict
45 changes: 0 additions & 45 deletions tabulator/processors/schema.py

This file was deleted.

17 changes: 0 additions & 17 deletions tests/module/processors/test_schema.py

This file was deleted.

0 comments on commit f2a75a0

Please sign in to comment.