keep pyexcel-xx 0.5.0 compactibility
This commit is contained in:
parent
9640ed4119
commit
725aa26ed6
|
@ -5,6 +5,9 @@ pyexcel-io - Let you focus on data, instead of file formats
|
|||
.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png
|
||||
:target: https://www.patreon.com/chfw
|
||||
|
||||
.. image:: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg
|
||||
:target: https://awesome-python.com/#specific-formats-processing
|
||||
|
||||
.. image:: https://travis-ci.org/pyexcel/pyexcel-io.svg?branch=master
|
||||
:target: http://travis-ci.org/pyexcel/pyexcel-io
|
||||
|
||||
|
@ -33,7 +36,7 @@ Support the project
|
|||
================================================================================
|
||||
|
||||
If your company has embedded pyexcel and its components into a revenue generating
|
||||
product, please support me on `patreon <https://www.patreon.com/bePatron?u=5537627>`_
|
||||
product, please support me on github, `patreon <https://www.patreon.com/bePatron?u=5537627>`_
|
||||
or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>`_ to maintain
|
||||
the project and develop it further.
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
:license: New BSD License, see LICENSE for more details
|
||||
"""
|
||||
import pyexcel_io.manager as manager
|
||||
from pyexcel_io._compact import PY2, OrderedDict, isstream
|
||||
from pyexcel_io._compact import OrderedDict, isstream
|
||||
|
||||
from .constants import MESSAGE_ERROR_03, MESSAGE_WRONG_IO_INSTANCE
|
||||
|
||||
|
||||
|
|
|
@ -247,3 +247,7 @@ def get_writer(
|
|||
writer.open_stream(file_stream, **keywords)
|
||||
# else: is resolved by earlier raise statement
|
||||
return writer
|
||||
|
||||
|
||||
# backward compactibility
|
||||
write_data = save_data
|
||||
|
|
|
@ -7,13 +7,12 @@
|
|||
:copyright: (c) 2014-2017 by Onni Software Ltd.
|
||||
:license: New BSD License, see LICENSE for more details
|
||||
"""
|
||||
from lml.loader import scan_plugins_regex
|
||||
from lml.plugin import PluginInfo, PluginManager, PluginInfoChain
|
||||
|
||||
import pyexcel_io.utils as ioutils
|
||||
import pyexcel_io.manager as manager
|
||||
import pyexcel_io.constants as constants
|
||||
import pyexcel_io.exceptions as exceptions
|
||||
from lml.loader import scan_plugins_regex
|
||||
from lml.plugin import PluginInfo, PluginManager, PluginInfoChain
|
||||
|
||||
ERROR_MESSAGE_FORMATTER = "one of these plugins for %s data in '%s': %s"
|
||||
UPGRADE_MESSAGE = "Please upgrade the plugin '%s' according to \
|
||||
|
|
|
@ -12,6 +12,7 @@ import zipfile
|
|||
from pyexcel_io.book import BookReader
|
||||
from pyexcel_io._compact import PY2, StringIO
|
||||
from pyexcel_io.constants import FILE_FORMAT_CSVZ
|
||||
|
||||
from .csvr import NamedContent, CSVinMemoryReader
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
:license: New BSD License, see LICENSE for more details
|
||||
"""
|
||||
import pyexcel_io.constants as constants
|
||||
|
||||
from .csvr import CSVBookReader
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
:license: New BSD License, see LICENSE for more details
|
||||
"""
|
||||
from pyexcel_io.constants import FILE_FORMAT_TSVZ, KEYWORD_TSV_DIALECT
|
||||
|
||||
from .csvz import CSVZipBookReader
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import zipfile
|
|||
from pyexcel_io.book import BookWriter
|
||||
from pyexcel_io._compact import StringIO
|
||||
from pyexcel_io.constants import FILE_FORMAT_CSVZ, DEFAULT_SHEET_NAME
|
||||
|
||||
from .csvw import CSVSheetWriter
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
:license: New BSD License, see LICENSE for more details
|
||||
"""
|
||||
import pyexcel_io.constants as constants
|
||||
|
||||
from .csvw import CSVBookWriter
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
:license: New BSD License, see LICENSE for more details
|
||||
"""
|
||||
from pyexcel_io.constants import FILE_FORMAT_TSVZ, KEYWORD_TSV_DIALECT
|
||||
|
||||
from .csvz import CSVZipBookWriter
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
from nose.tools import raises
|
||||
from pyexcel_io.book import BookWriter
|
||||
from pyexcel_io.sheet import SheetReader, SheetWriter, NamedContent
|
||||
from pyexcel_io.utils import is_empty_array
|
||||
|
||||
from nose.tools import raises
|
||||
|
||||
|
||||
@raises(NotImplementedError)
|
||||
def test_book_writer():
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
from nose import SkipTest
|
||||
from nose.tools import raises
|
||||
from pyexcel_io.book import (
|
||||
BookReader,
|
||||
BookWriter,
|
||||
|
@ -8,6 +6,9 @@ from pyexcel_io.book import (
|
|||
)
|
||||
from pyexcel_io._compact import PY2, BytesIO, StringIO
|
||||
|
||||
from nose import SkipTest
|
||||
from nose.tools import raises
|
||||
|
||||
|
||||
@raises(NotImplementedError)
|
||||
def test_rwinterface():
|
||||
|
|
|
@ -6,7 +6,6 @@ from textwrap import dedent
|
|||
from unittest import TestCase
|
||||
|
||||
import pyexcel_io.manager as manager
|
||||
from nose.tools import eq_, raises
|
||||
from pyexcel_io.sheet import NamedContent
|
||||
from pyexcel_io._compact import PY2, BytesIO, StringIO
|
||||
from pyexcel_io.readers.csvr import (
|
||||
|
@ -16,6 +15,8 @@ from pyexcel_io.readers.csvr import (
|
|||
)
|
||||
from pyexcel_io.writers.csvw import CSVFileWriter, CSVMemoryWriter
|
||||
|
||||
from nose.tools import eq_, raises
|
||||
|
||||
|
||||
class TestReaders(TestCase):
|
||||
def setUp(self):
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
from nose.tools import eq_, raises
|
||||
from pyexcel_io import save_data
|
||||
from pyexcel_io._compact import OrderedDict
|
||||
from pyexcel_io.constants import DB_DJANGO
|
||||
|
@ -17,6 +16,8 @@ from pyexcel_io.database.importers.django import (
|
|||
DjangoModelWriter,
|
||||
)
|
||||
|
||||
from nose.tools import eq_, raises
|
||||
|
||||
|
||||
class Package:
|
||||
def __init__(self, raiseException=False, **keywords):
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import os
|
||||
|
||||
import pyexcel_io.constants as constants
|
||||
from nose.tools import eq_
|
||||
from pyexcel_io import get_data, save_data
|
||||
from pyexcel_io.utils import _index_filter
|
||||
|
||||
from nose.tools import eq_
|
||||
|
||||
|
||||
def test_index_filter():
|
||||
current_index, start, limit, expected = (0, 1, -1, constants.SKIP_DATA)
|
||||
|
|
|
@ -6,11 +6,12 @@ from unittest import TestCase
|
|||
|
||||
import pyexcel_io.manager as manager
|
||||
import pyexcel_io.exceptions as exceptions
|
||||
from nose.tools import eq_, raises
|
||||
from pyexcel_io import get_data, iget_data, save_data
|
||||
from pyexcel_io.io import load_data, get_writer
|
||||
from pyexcel_io._compact import BytesIO, StringIO, OrderedDict, is_string
|
||||
|
||||
from nose.tools import eq_, raises
|
||||
|
||||
PY2 = sys.version_info[0] == 2
|
||||
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
import os
|
||||
|
||||
import pyexcel as p
|
||||
from pyexcel_io import get_data, save_data
|
||||
from pyexcel_io._compact import PY26
|
||||
|
||||
from nose import SkipTest
|
||||
from nose.tools import eq_
|
||||
from pyexcel_io import get_data, save_data
|
||||
from pyexcel_io._compact import PY26
|
||||
|
||||
IN_TRAVIS = "TRAVIS" in os.environ
|
||||
|
||||
|
|
|
@ -3,13 +3,14 @@ from textwrap import dedent
|
|||
from unittest import TestCase
|
||||
|
||||
import pyexcel_io.manager as manager
|
||||
from nose.tools import raises
|
||||
from pyexcel_io._compact import OrderedDict
|
||||
from pyexcel_io.readers.tsv import TSVBookReader
|
||||
from pyexcel_io.writers.tsv import TSVBookWriter
|
||||
from pyexcel_io.readers.csvr import CSVBookReader
|
||||
from pyexcel_io.writers.csvw import CSVBookWriter
|
||||
|
||||
from nose.tools import raises
|
||||
|
||||
|
||||
class TestCSVReaders(TestCase):
|
||||
file_type = "csv"
|
||||
|
|
|
@ -5,7 +5,6 @@ import zipfile
|
|||
from unittest import TestCase
|
||||
|
||||
import pyexcel_io.manager as manager
|
||||
from nose.tools import raises
|
||||
from pyexcel_io import save_data
|
||||
from pyexcel_io._compact import OrderedDict
|
||||
from pyexcel_io.readers.csvz import CSVZipBookReader
|
||||
|
@ -13,6 +12,8 @@ from pyexcel_io.readers.tsvz import TSVZipBookReader
|
|||
from pyexcel_io.writers.csvz import CSVZipBookWriter
|
||||
from pyexcel_io.writers.tsvz import TSVZipBookWriter
|
||||
|
||||
from nose.tools import raises
|
||||
|
||||
PY2 = sys.version_info[0] == 2
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ from textwrap import dedent
|
|||
from unittest import TestCase
|
||||
|
||||
import pyexcel as pe
|
||||
|
||||
from pyexcel_io._compact import text_type
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import os
|
||||
|
||||
from nose.tools import eq_
|
||||
from pyexcel_io import get_data, save_data
|
||||
|
||||
from nose.tools import eq_
|
||||
|
||||
|
||||
class TestRenderer:
|
||||
def setUp(self):
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
from nose import SkipTest
|
||||
from nose.tools import eq_, raises
|
||||
from pyexcel_io.service import (
|
||||
ODS_WRITE_FORMAT_COVERSION,
|
||||
date_value,
|
||||
|
@ -12,6 +10,9 @@ from pyexcel_io.service import (
|
|||
from pyexcel_io._compact import PY2
|
||||
from pyexcel_io.exceptions import IntegerAccuracyLossError
|
||||
|
||||
from nose import SkipTest
|
||||
from nose.tools import eq_, raises
|
||||
|
||||
|
||||
def test_date_util_parse():
|
||||
value = "2015-08-17T19:20:00"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import pyexcel_io.constants as constants
|
||||
from nose.tools import eq_
|
||||
from pyexcel_io.sheet import SheetReader, SheetWriter
|
||||
|
||||
from nose.tools import eq_
|
||||
|
||||
|
||||
class MyWriter(SheetWriter):
|
||||
def set_size(self, size):
|
||||
|
|
|
@ -3,6 +3,24 @@ import json
|
|||
import datetime
|
||||
import platform
|
||||
|
||||
from pyexcel_io._compact import OrderedDict
|
||||
from pyexcel_io.database.common import (
|
||||
SQLTableExporter,
|
||||
SQLTableImporter,
|
||||
SQLTableExportAdapter,
|
||||
SQLTableImportAdapter,
|
||||
)
|
||||
from pyexcel_io.database.querysets import QuerysetsReader
|
||||
from pyexcel_io.database.exporters.sqlalchemy import (
|
||||
SQLBookReader,
|
||||
SQLTableReader,
|
||||
)
|
||||
from pyexcel_io.database.importers.sqlalchemy import (
|
||||
SQLBookWriter,
|
||||
SQLTableWriter,
|
||||
PyexcelSQLSkipRowException,
|
||||
)
|
||||
|
||||
from nose.tools import eq_, raises
|
||||
from sqlalchemy import (
|
||||
Date,
|
||||
|
@ -15,24 +33,7 @@ from sqlalchemy import (
|
|||
create_engine,
|
||||
)
|
||||
from sqlalchemy.orm import backref, relationship, sessionmaker
|
||||
from pyexcel_io._compact import OrderedDict
|
||||
from pyexcel_io.database.common import (
|
||||
SQLTableExporter,
|
||||
SQLTableImporter,
|
||||
SQLTableExportAdapter,
|
||||
SQLTableImportAdapter,
|
||||
)
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from pyexcel_io.database.querysets import QuerysetsReader
|
||||
from pyexcel_io.database.exporters.sqlalchemy import (
|
||||
SQLBookReader,
|
||||
SQLTableReader,
|
||||
)
|
||||
from pyexcel_io.database.importers.sqlalchemy import (
|
||||
SQLBookWriter,
|
||||
SQLTableWriter,
|
||||
PyexcelSQLSkipRowException,
|
||||
)
|
||||
|
||||
PY3 = sys.version_info[0] == 3
|
||||
PY36 = PY3 and sys.version_info[1] == 6
|
||||
|
|
Loading…
Reference in New Issue