From bdb95c2af2c04a81865bb465b15d2e7e2fe7a4e8 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 18 Oct 2019 11:57:20 +0200 Subject: [PATCH 1/6] Add project release config and use Travis build stages. Refs #378. --- .travis.yml | 49 +++++++++++++++++++++------------ setup.py | 14 ++-------- tablib/packages/dbfpy/dbf.py | 8 +++--- tablib/packages/dbfpy/dbfnew.py | 12 ++++---- tablib/packages/dbfpy3/dbf.py | 5 ++-- tox.ini | 7 +++-- 6 files changed, 51 insertions(+), 44 deletions(-) diff --git a/.travis.yml b/.travis.yml index 79a51758..d25bcaf9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,35 @@ language: python +python: +- 2.7 +- 3.6 +- 3.7 +- 3.8-dev cache: pip - -matrix: +dist: xenial +install: travis_retry pip install tox-travis +script: echo "Running tests against $(python --version) ..." +stages: +- test +- name: deploy + if: repo = jazzband/tablib AND tag IS present +jobs: include: - - python: 2.7 - - python: 3.5 - - python: 3.6 - - python: 3.7 - - python: 3.8-dev - -install: - - pip install -r requirements.txt - - pip install -U pytest pytest-cov - -script: pytest --cov tablib - -after_success: - - pip install -U codecov - - codecov + - stage: test + script: tox + after_success: + - pip install -U codecov + - codecov + - stage: deploy + install: skip + script: skip + python: 3.7 + deploy: + provider: pypi + user: jazzband + server: https://jazzband.co/projects/tablib/upload + distributions: sdist bdist_wheel + password: + secure: svV4fYtodwW+iTyFOm5ISEfhVwcA+6vTskD3x6peznc40TdMV9Ek8nT3Q/NB4lCbXoUw2qR4H6uhLCjesnv/VvVk/qbitCyD8ySlgwOV5n7NzJs8lC8EYaHSjGQjatTwJAokfGVYkPawkI7HXDqtDggLUQBK+Ag8HDW+XBSbQIU= + on: + tags: true + repo: jazzband/tablib diff --git a/setup.py b/setup.py index 0ec96599..263085b5 100755 --- a/setup.py +++ b/setup.py @@ -13,18 +13,9 @@ sys.exit() -if sys.argv[-1] == 'test': - try: - __import__('py') - except ImportError: - print('py.test required.') - sys.exit(1) - - errors = os.system('py.test test_tablib.py') - sys.exit(bool(errors)) - packages = [ - 'tablib', 'tablib.formats', + 'tablib', + 'tablib.formats', 'tablib.packages', 'tablib.packages.dbfpy', 'tablib.packages.dbfpy3' @@ -71,7 +62,6 @@ 'Programming Language :: Python :: 3.7', ], python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', - tests_require=['pytest'], install_requires=install, extras_require={ 'pandas': ['pandas'], diff --git a/tablib/packages/dbfpy/dbf.py b/tablib/packages/dbfpy/dbf.py index add74da0..8147d0e7 100644 --- a/tablib/packages/dbfpy/dbf.py +++ b/tablib/packages/dbfpy/dbf.py @@ -31,9 +31,9 @@ dbf = Dbf(filename, True) for rec in dbf: for fldName in dbf.fieldNames: - print '%s:\t %s (%s)' % (fldName, rec[fldName], - type(rec[fldName])) - print + print('%s:\t %s (%s)' % (fldName, rec[fldName], + type(rec[fldName]))) + print() dbf.close() """ @@ -258,7 +258,7 @@ def __setitem__(self, index, record): def demo_read(filename): _dbf = Dbf(filename, True) for _rec in _dbf: - print + print() print(repr(_rec)) _dbf.close() diff --git a/tablib/packages/dbfpy/dbfnew.py b/tablib/packages/dbfpy/dbfnew.py index 7a06d001..008d3077 100644 --- a/tablib/packages/dbfpy/dbfnew.py +++ b/tablib/packages/dbfpy/dbfnew.py @@ -160,9 +160,9 @@ def write_stream(self, stream): dbfn.add_field("date", 'D', 8) dbfn.write("tst.dbf") # test new dbf - print "*** created tst.dbf: ***" + print("*** created tst.dbf: ***") dbft = Dbf('tst.dbf', readOnly=0) - print repr(dbft) + print(repr(dbft)) # add a record rec = DbfRecord(dbft) rec['name'] = 'something' @@ -177,13 +177,13 @@ def write_stream(self, stream): rec.store() # show the records - print "*** inserted 2 records into tst.dbf: ***" - print repr(dbft) + print("*** inserted 2 records into tst.dbf: ***") + print(repr(dbft)) for i1 in range(len(dbft)): rec = dbft[i1] for fldName in dbft.fieldNames: - print '%s:\t %s' % (fldName, rec[fldName]) - print + print('%s:\t %s' % (fldName, rec[fldName])) + print() dbft.close() # vim: set et sts=4 sw=4 : diff --git a/tablib/packages/dbfpy3/dbf.py b/tablib/packages/dbfpy3/dbf.py index 6fee4574..218353e1 100644 --- a/tablib/packages/dbfpy3/dbf.py +++ b/tablib/packages/dbfpy3/dbf.py @@ -31,9 +31,8 @@ dbf = Dbf(filename, True) for rec in dbf: for fldName in dbf.fieldNames: - print '%s:\t %s (%s)' % (fldName, rec[fldName], - type(rec[fldName])) - print + print('%s:\t %s (%s)' % (fldName, rec[fldName], + type(rec[fldName]))) dbf.close() """ diff --git a/tox.ini b/tox.ini index 0a954c48..9c017412 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,9 @@ minversion = 2.4 envlist = py27, py35, py36, py37 [testenv] -deps = pytest +deps = + pytest + pytest-cov + -rrequirements.txt extras = pandas -commands = python setup.py test +commands = pytest --cov tablib From 3fb83af26d875a473ddbafa98787b98bbc6bdd4b Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 18 Oct 2019 14:26:43 +0200 Subject: [PATCH 2/6] Restructure project to use src/ and tests/ directories. --- .gitignore | 1 + docs/conf.py | 10 +- pytest.ini | 4 + setup.py | 25 +- src/tablib.egg-info/PKG-INFO | 464 ++++++++++++++++++ src/tablib.egg-info/SOURCES.txt | 77 +++ src/tablib.egg-info/dependency_links.txt | 1 + src/tablib.egg-info/requires.txt | 12 + src/tablib.egg-info/top_level.txt | 1 + src/tablib/__init__.py | 13 + {tablib => src/tablib}/compat.py | 0 {tablib => src/tablib}/core.py | 2 - {tablib => src/tablib}/formats/__init__.py | 0 {tablib => src/tablib}/formats/_csv.py | 0 {tablib => src/tablib}/formats/_dbf.py | 0 {tablib => src/tablib}/formats/_df.py | 0 {tablib => src/tablib}/formats/_html.py | 0 {tablib => src/tablib}/formats/_jira.py | 0 {tablib => src/tablib}/formats/_json.py | 0 {tablib => src/tablib}/formats/_latex.py | 0 {tablib => src/tablib}/formats/_ods.py | 0 {tablib => src/tablib}/formats/_rst.py | 0 {tablib => src/tablib}/formats/_tsv.py | 0 {tablib => src/tablib}/formats/_xls.py | 0 {tablib => src/tablib}/formats/_xlsx.py | 0 {tablib => src/tablib}/formats/_yaml.py | 0 {tablib => src/tablib}/packages/__init__.py | 0 .../tablib}/packages/dbfpy/__init__.py | 0 {tablib => src/tablib}/packages/dbfpy/dbf.py | 0 .../tablib}/packages/dbfpy/dbfnew.py | 0 .../tablib}/packages/dbfpy/fields.py | 0 .../tablib}/packages/dbfpy/header.py | 0 .../tablib}/packages/dbfpy/record.py | 0 .../tablib}/packages/dbfpy/utils.py | 0 .../tablib}/packages/dbfpy3/__init__.py | 0 {tablib => src/tablib}/packages/dbfpy3/dbf.py | 0 .../tablib}/packages/dbfpy3/dbfnew.py | 0 .../tablib}/packages/dbfpy3/fields.py | 0 .../tablib}/packages/dbfpy3/header.py | 0 .../tablib}/packages/dbfpy3/record.py | 0 .../tablib}/packages/dbfpy3/utils.py | 0 {tablib => src/tablib}/packages/statistics.py | 0 tablib/__init__.py | 7 - test_tablib.py => tests/test_tablib.py | 0 tox.ini | 2 +- 45 files changed, 585 insertions(+), 34 deletions(-) create mode 100644 pytest.ini create mode 100644 src/tablib.egg-info/PKG-INFO create mode 100644 src/tablib.egg-info/SOURCES.txt create mode 100644 src/tablib.egg-info/dependency_links.txt create mode 100644 src/tablib.egg-info/requires.txt create mode 100644 src/tablib.egg-info/top_level.txt create mode 100644 src/tablib/__init__.py rename {tablib => src/tablib}/compat.py (100%) rename {tablib => src/tablib}/core.py (99%) rename {tablib => src/tablib}/formats/__init__.py (100%) rename {tablib => src/tablib}/formats/_csv.py (100%) rename {tablib => src/tablib}/formats/_dbf.py (100%) rename {tablib => src/tablib}/formats/_df.py (100%) rename {tablib => src/tablib}/formats/_html.py (100%) rename {tablib => src/tablib}/formats/_jira.py (100%) rename {tablib => src/tablib}/formats/_json.py (100%) rename {tablib => src/tablib}/formats/_latex.py (100%) rename {tablib => src/tablib}/formats/_ods.py (100%) rename {tablib => src/tablib}/formats/_rst.py (100%) rename {tablib => src/tablib}/formats/_tsv.py (100%) rename {tablib => src/tablib}/formats/_xls.py (100%) rename {tablib => src/tablib}/formats/_xlsx.py (100%) rename {tablib => src/tablib}/formats/_yaml.py (100%) rename {tablib => src/tablib}/packages/__init__.py (100%) rename {tablib => src/tablib}/packages/dbfpy/__init__.py (100%) rename {tablib => src/tablib}/packages/dbfpy/dbf.py (100%) rename {tablib => src/tablib}/packages/dbfpy/dbfnew.py (100%) rename {tablib => src/tablib}/packages/dbfpy/fields.py (100%) rename {tablib => src/tablib}/packages/dbfpy/header.py (100%) rename {tablib => src/tablib}/packages/dbfpy/record.py (100%) rename {tablib => src/tablib}/packages/dbfpy/utils.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/__init__.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/dbf.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/dbfnew.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/fields.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/header.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/record.py (100%) rename {tablib => src/tablib}/packages/dbfpy3/utils.py (100%) rename {tablib => src/tablib}/packages/statistics.py (100%) delete mode 100644 tablib/__init__.py rename test_tablib.py => tests/test_tablib.py (100%) diff --git a/.gitignore b/.gitignore index 432f8e08..988fd396 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ tablib.egg-info/* # Coverage .coverage htmlcov +.eggs diff --git a/docs/conf.py b/docs/conf.py index c38dd06e..39d13795 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,6 +12,7 @@ # serve to show the default. import sys, os +from pkg_resources import get_distribution # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -47,10 +48,11 @@ # |version| and |release|, also used in various other places throughout the # built documents. # -# The short X.Y version. -version = tablib.__version__ # The full version, including alpha/beta/rc tags. -release = version +release = get_distribution('tablib').version +# The short X.Y version. +version = '.'.join(release.split('.')[:2]) +# for example take major/minor # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -234,4 +236,4 @@ sys.path.append(os.path.abspath('_themes')) html_theme_path = ['_themes'] -html_theme = 'kr' \ No newline at end of file +html_theme = 'kr' diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000..f69d3367 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +norecursedirs = .git .* +addopts = -rsxX --showlocals --tb=native --cov=tablib --cov-report xml --cov-report term --cov-report html +python_paths = . diff --git a/setup.py b/setup.py index 263085b5..5a3ab4a9 100755 --- a/setup.py +++ b/setup.py @@ -5,22 +5,9 @@ import re import sys -from setuptools import setup +from setuptools import find_packages, setup -if sys.argv[-1] == 'publish': - os.system("python setup.py sdist upload") - sys.exit() - - -packages = [ - 'tablib', - 'tablib.formats', - 'tablib.packages', - 'tablib.packages.dbfpy', - 'tablib.packages.dbfpy3' -] - install = [ 'odfpy', 'openpyxl>=2.4.0', @@ -32,13 +19,10 @@ ] -with open('tablib/core.py', 'r') as fd: - version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - setup( name='tablib', - version=version, + use_scm_version=True, + setup_requires=['setuptools_scm'], description='Format agnostic tabular data library (XLS, JSON, YAML, CSV)', long_description=(open('README.md').read() + '\n\n' + open('HISTORY.md').read()), @@ -46,7 +30,8 @@ author='Kenneth Reitz', author_email='me@kennethreitz.org', url='https://tablib.readthedocs.io', - packages=packages, + packages=find_packages(where="src"), + package_dir={"": "src"}, license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', diff --git a/src/tablib.egg-info/PKG-INFO b/src/tablib.egg-info/PKG-INFO new file mode 100644 index 00000000..93ab9464 --- /dev/null +++ b/src/tablib.egg-info/PKG-INFO @@ -0,0 +1,464 @@ +Metadata-Version: 2.1 +Name: tablib +Version: 0.13.1.dev47+gbdb95c2.d20191018 +Summary: Format agnostic tabular data library (XLS, JSON, YAML, CSV) +Home-page: https://tablib.readthedocs.io +Author: Kenneth Reitz +Author-email: me@kennethreitz.org +License: MIT +Description: # Tablib: format-agnostic tabular dataset library + + [![Jazzband](https://jazzband.co/static/img/badge.svg)](https://jazzband.co/) + [![Build Status](https://travis-ci.org/jazzband/tablib.svg?branch=master)](https://travis-ci.org/jazzband/tablib) + [![codecov](https://codecov.io/gh/jazzband/tablib/branch/master/graph/badge.svg)](https://codecov.io/gh/jazzband/tablib) + + _____ ______ ___________ ______ + __ /_______ ____ /_ ___ /___(_)___ /_ + _ __/_ __ `/__ __ \__ / __ / __ __ \ + / /_ / /_/ / _ /_/ /_ / _ / _ /_/ / + \__/ \__,_/ /_.___/ /_/ /_/ /_.___/ + + + Tablib is a format-agnostic tabular dataset library, written in Python. + + Output formats supported: + + - Excel (Sets + Books) + - JSON (Sets + Books) + - YAML (Sets + Books) + - Pandas DataFrames (Sets) + - HTML (Sets) + - Jira (Sets) + - TSV (Sets) + - ODS (Sets) + - CSV (Sets) + - DBF (Sets) + + Note that tablib *purposefully* excludes XML support. It always will. (Note: This is a + joke. Pull requests are welcome.) + + + ## Overview + + `tablib.Dataset()` + + A Dataset is a table of tabular data. + It may or may not have a header row. + They can be build and manipulated as raw Python datatypes (Lists of tuples|dictionaries). + Datasets can be imported from JSON, YAML, DBF, and CSV; + they can be exported to XLSX, XLS, ODS, JSON, YAML, DBF, CSV, TSV, and HTML. + + `tablib.Databook()` + + A Databook is a set of Datasets. + The most common form of a Databook is an Excel file with multiple spreadsheets. + Databooks can be imported from JSON and YAML; + they can be exported to XLSX, XLS, ODS, JSON, and YAML. + + + ## Usage + + Populate fresh data files: + + ```python + headers = ('first_name', 'last_name') + + data = [ + ('John', 'Adams'), + ('George', 'Washington') + ] + + data = tablib.Dataset(*data, headers=headers) + ``` + + Intelligently add new rows: + + ```python + >>> data.append(('Henry', 'Ford')) + ``` + + Intelligently add new columns: + + ```python + >>> data.append_col((90, 67, 83), header='age') + ``` + + Slice rows: + + ```python + >>> print(data[:2]) + [('John', 'Adams', 90), ('George', 'Washington', 67)] + ``` + + Slice columns by header: + + ```python + >>> print(data['first_name']) + ['John', 'George', 'Henry'] + ``` + + Easily delete rows: + + ```python + >>> del data[1] + ``` + + + ## Exports + + Drumroll please........... + + ### JSON! + + ```python + >>> print(data.export('json')) + [ + { + "last_name": "Adams", + "age": 90, + "first_name": "John" + }, + { + "last_name": "Ford", + "age": 83, + "first_name": "Henry" + } + ] + ``` + + ### YAML! + + ```python + >>> print(data.export('yaml')) + - {age: 90, first_name: John, last_name: Adams} + - {age: 83, first_name: Henry, last_name: Ford} + ``` + + ### CSV... + + ```python + >>> print(data.export('csv')) + first_name,last_name,age + John,Adams,90 + Henry,Ford,83 + ``` + + ### EXCEL! + + ```python + >>> with open('people.xls', 'wb') as f: + ... f.write(data.export('xls')) + ``` + + ### DBF! + + ```python + >>> with open('people.dbf', 'wb') as f: + ... f.write(data.export('dbf')) + ``` + + ### Pandas DataFrame! + + ```python + >>> print(data.export('df')): + first_name last_name age + 0 John Adams 90 + 1 Henry Ford 83 + ``` + + It's that easy. + + + ## Installation + + To install tablib, simply: + + ```console + $ pip install tablib[pandas] + ``` + + Make sure to check out [Tablib on PyPI](https://pypi.org/project/tablib/)! + + + ## Contribute + + Please see the [contributing guide](https://github.com/jazzband/tablib/blob/master/.github/CONTRIBUTING.md). + + + # History + + ## Unreleased + + - The project is now maintained by the Jazzband team, https://jazzband.co + - Fixed `DataBook().load` parameter ordering (first stream, then format). + - Fixed a regression for xlsx exports where non-string values were forced to + strings (#314). + - Fixed xlsx format detection (which was often detected as `xls` format). + - Improved format autodetection and added autodetection for the odf format. + - Added search to all documentation pages + - Open xlsx workbooks in read-only mode (#316) + - Unpin requirements + - Only install backports.csv on Python 2 + - Added Python 3.7 support + - Dropped Python 3.4 support + + ## 0.13.0 (2019-03-08) + + - Added reStructuredText output capability (#336) + - Added Jira output capability + - Stopped calling openpyxl deprecated methods (accessing cells, removing sheets) + (openpyxl minimal version is now 2.4.0) + - Fixed a circular dependency issue in JSON output (#332) + - Fixed Unicode error for the CSV export on Python 2 (#215) + - Removed usage of optional `ujson` (#311) + - Dropped Python 3.3 support + + ## 0.12.1 (2017-09-01) + + - Favor `Dataset.export()` over `Dataset.` syntax in docs + - Make Panda dependency optional + + ## 0.12.0 (2017-08-27) + + - Add initial Panda DataFrame support + - Dropped Python 2.6 support + + ## 0.11.5 (2017-06-13) + + - Use `yaml.safe_load` for importing yaml. + + ## 0.11.4 (2017-01-23) + + - Use built-in `json` package if available + - Support Python 3.5+ in classifiers + + ### Bugfixes + + - Fixed textual representation for Dataset with no headers + - Handle decimal types + + ## 0.11.3 (2016-02-16) + + - Release fix. + + ## 0.11.2 (2016-02-16) + + ### Bugfixes + + - Fix export only formats. + - Fix for xlsx output. + + ## 0.11.1 (2016-02-07) + + ### Bugfixes + + - Fixed packaging error on Python 3. + + + ## 0.11.0 (2016-02-07) + + ### New Formats! + + - Added LaTeX table export format (`Dataset.latex`). + - Support for dBase (DBF) files (`Dataset.dbf`). + + ### Improvements + + - New import/export interface (`Dataset.export()`, `Dataset.load()`). + - CSV custom delimiter support (`Dataset.export('csv', delimiter='$')`). + - Adding ability to remove duplicates to all rows in a dataset (`Dataset.remove_duplicates()`). + - Added a mechanism to avoid `datetime.datetime` issues when serializing data. + - New `detect_format()` function (mostly for internal use). + - Update the vendored unicodecsv to fix `None` handling. + - Only freeze the headers row, not the headers columns (xls). + + ### Breaking Changes + + - `detect()` function removed. + + ### Bugfixes + + - Fix XLSX import. + - Bugfix for `Dataset.transpose().transpose()`. + + + ## 0.10.0 (2014-05-27) + + * Unicode Column Headers + * ALL the bugfixes! + + ## 0.9.11 (2011-06-30) + + * Bugfixes + + ## 0.9.10 (2011-06-22) + + * Bugfixes + + ## 0.9.9 (2011-06-21) + + * Dataset API Changes + * `stack_rows` => `stack`, `stack_columns` => `stack_cols` + * column operations have their own methods now (`append_col`, `insert_col`) + * List-style `pop()` + * Redis-style `rpush`, `lpush`, `rpop`, `lpop`, `rpush_col`, and `lpush_col` + + ## 0.9.8 (2011-05-22) + + * OpenDocument Spreadsheet support (.ods) + * Full Unicode TSV support + + + ## 0.9.7 (2011-05-12) + + * Full XLSX Support! + * Pickling Bugfix + * Compat Module + + + ## 0.9.6 (2011-05-12) + + * `seperators` renamed to `separators` + * Full unicode CSV support + + + ## 0.9.5 (2011-03-24) + + * Python 3.1, Python 3.2 Support (same code base!) + * Formatter callback support + * Various bug fixes + + + + ## 0.9.4 (2011-02-18) + + * Python 2.5 Support! + * Tox Testing for 2.5, 2.6, 2.7 + * AnyJSON Integrated + * OrderedDict support + * Caved to community pressure (spaces) + + + ## 0.9.3 (2011-01-31) + + * Databook duplication leak fix. + * HTML Table output. + * Added column sorting. + + + ## 0.9.2 (2010-11-17) + + * Transpose method added to Datasets. + * New frozen top row in Excel output. + * Pickling support for Datasets and Rows. + * Support for row/column stacking. + + + ## 0.9.1 (2010-11-04) + + * Minor reference shadowing bugfix. + + + ## 0.9.0 (2010-11-04) + + * Massive documentation update! + * Tablib.org! + * Row tagging and Dataset filtering! + * Column insert/delete support + * Column append API change (header required) + * Internal Changes (Row object and use thereof) + + + ## 0.8.5 (2010-10-06) + + * New import system. All dependencies attempt to load from site-packages, + then fallback on tenderized modules. + + + ## 0.8.4 (2010-10-04) + + * Updated XLS output: Only wrap if '\\n' in cell. + + + ## 0.8.3 (2010-10-04) + + * Ability to append new column passing a callable + as the value that will be applied to every row. + + + ## 0.8.2 (2010-10-04) + + * Added alignment wrapping to written cells. + * Added separator support to XLS. + + + ## 0.8.1 (2010-09-28) + + * Packaging Fix + + + ## 0.8.0 (2010-09-25) + + * New format plugin system! + * Imports! ELEGANT Imports! + * Tests. Lots of tests. + + + ## 0.7.1 (2010-09-20) + + * Reverting methods back to properties. + * Windows bug compensated in documentation. + + + ## 0.7.0 (2010-09-20) + + * Renamed DataBook Databook for consistency. + * Export properties changed to methods (XLS filename / StringIO bug). + * Optional Dataset.xls(path='filename') support (for writing on windows). + * Added utf-8 on the worksheet level. + + + ## 0.6.4 (2010-09-19) + + * Updated unicode export for XLS. + * More exhaustive unit tests. + + + ## 0.6.3 (2010-09-14) + + * Added Dataset.append() support for columns. + + + ## 0.6.2 (2010-09-13) + + * Fixed Dataset.append() error on empty dataset. + * Updated Dataset.headers property w/ validation. + * Added Testing Fixtures. + + ## 0.6.1 (2010-09-12) + + * Packaging hotfixes. + + + ## 0.6.0 (2010-09-11) + + * Public Release. + * Export Support for XLS, JSON, YAML, and CSV. + * DataBook Export for XLS, JSON, and YAML. + * Python Dict Property Support. + +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: Natural Language :: English +Classifier: License :: OSI Approved :: MIT License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* +Description-Content-Type: text/markdown +Provides-Extra: pandas diff --git a/src/tablib.egg-info/SOURCES.txt b/src/tablib.egg-info/SOURCES.txt new file mode 100644 index 00000000..dfa034c4 --- /dev/null +++ b/src/tablib.egg-info/SOURCES.txt @@ -0,0 +1,77 @@ +.coveragerc +.gitignore +.travis.yml +AUTHORS +HACKING +HISTORY.md +LICENSE +MANIFEST.in +Makefile +README.md +requirements.txt +setup.py +tox.ini +.github/CONTRIBUTING.md +docs/Makefile +docs/Pipfile +docs/__init__.py +docs/api.rst +docs/conf.py +docs/development.rst +docs/index.rst +docs/install.rst +docs/intro.rst +docs/krstyle.sty +docs/tutorial.rst +docs/_templates/sidebarintro.html +docs/_templates/sidebarlogo.html +docs/_themes/.gitignore +docs/_themes/LICENSE +docs/_themes/README.rst +docs/_themes/flask_theme_support.py +docs/_themes/kr/layout.html +docs/_themes/kr/relations.html +docs/_themes/kr/theme.conf +docs/_themes/kr/static/flasky.css_t +docs/_themes/kr/static/small_flask.css +docs/_themes/kr_small/layout.html +docs/_themes/kr_small/theme.conf +docs/_themes/kr_small/static/flasky.css_t +src/tablib/__init__.py +src/tablib/compat.py +src/tablib/core.py +src/tablib.egg-info/PKG-INFO +src/tablib.egg-info/SOURCES.txt +src/tablib.egg-info/dependency_links.txt +src/tablib.egg-info/requires.txt +src/tablib.egg-info/top_level.txt +src/tablib/formats/__init__.py +src/tablib/formats/_csv.py +src/tablib/formats/_dbf.py +src/tablib/formats/_df.py +src/tablib/formats/_html.py +src/tablib/formats/_jira.py +src/tablib/formats/_json.py +src/tablib/formats/_latex.py +src/tablib/formats/_ods.py +src/tablib/formats/_rst.py +src/tablib/formats/_tsv.py +src/tablib/formats/_xls.py +src/tablib/formats/_xlsx.py +src/tablib/formats/_yaml.py +src/tablib/packages/__init__.py +src/tablib/packages/statistics.py +src/tablib/packages/dbfpy/__init__.py +src/tablib/packages/dbfpy/dbf.py +src/tablib/packages/dbfpy/dbfnew.py +src/tablib/packages/dbfpy/fields.py +src/tablib/packages/dbfpy/header.py +src/tablib/packages/dbfpy/record.py +src/tablib/packages/dbfpy/utils.py +src/tablib/packages/dbfpy3/__init__.py +src/tablib/packages/dbfpy3/dbf.py +src/tablib/packages/dbfpy3/dbfnew.py +src/tablib/packages/dbfpy3/fields.py +src/tablib/packages/dbfpy3/header.py +src/tablib/packages/dbfpy3/record.py +src/tablib/packages/dbfpy3/utils.py \ No newline at end of file diff --git a/src/tablib.egg-info/dependency_links.txt b/src/tablib.egg-info/dependency_links.txt new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/src/tablib.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/src/tablib.egg-info/requires.txt b/src/tablib.egg-info/requires.txt new file mode 100644 index 00000000..37c1be5f --- /dev/null +++ b/src/tablib.egg-info/requires.txt @@ -0,0 +1,12 @@ +odfpy +openpyxl>=2.4.0 +markuppy +xlrd +xlwt +pyyaml + +[:python_version < "3.0"] +backports.csv + +[pandas] +pandas diff --git a/src/tablib.egg-info/top_level.txt b/src/tablib.egg-info/top_level.txt new file mode 100644 index 00000000..e3839332 --- /dev/null +++ b/src/tablib.egg-info/top_level.txt @@ -0,0 +1 @@ +tablib diff --git a/src/tablib/__init__.py b/src/tablib/__init__.py new file mode 100644 index 00000000..fafb569a --- /dev/null +++ b/src/tablib/__init__.py @@ -0,0 +1,13 @@ +""" Tablib. """ +from pkg_resources import get_distribution, DistributionNotFound + +from tablib.core import ( + Databook, Dataset, detect_format, import_set, import_book, + InvalidDatasetType, InvalidDimensions, UnsupportedFormat +) + +try: + __version__ = get_distribution(__name__).version +except DistributionNotFound: + # package is not installed + __version__ = None diff --git a/tablib/compat.py b/src/tablib/compat.py similarity index 100% rename from tablib/compat.py rename to src/tablib/compat.py diff --git a/tablib/core.py b/src/tablib/core.py similarity index 99% rename from tablib/core.py rename to src/tablib/core.py index 6c4a4bfc..107cbe8a 100644 --- a/tablib/core.py +++ b/src/tablib/core.py @@ -19,8 +19,6 @@ __title__ = 'tablib' -__version__ = '0.13.0' -__build__ = 0x001201 __author__ = 'Kenneth Reitz' __license__ = 'MIT' __copyright__ = 'Copyright 2017 Kenneth Reitz' diff --git a/tablib/formats/__init__.py b/src/tablib/formats/__init__.py similarity index 100% rename from tablib/formats/__init__.py rename to src/tablib/formats/__init__.py diff --git a/tablib/formats/_csv.py b/src/tablib/formats/_csv.py similarity index 100% rename from tablib/formats/_csv.py rename to src/tablib/formats/_csv.py diff --git a/tablib/formats/_dbf.py b/src/tablib/formats/_dbf.py similarity index 100% rename from tablib/formats/_dbf.py rename to src/tablib/formats/_dbf.py diff --git a/tablib/formats/_df.py b/src/tablib/formats/_df.py similarity index 100% rename from tablib/formats/_df.py rename to src/tablib/formats/_df.py diff --git a/tablib/formats/_html.py b/src/tablib/formats/_html.py similarity index 100% rename from tablib/formats/_html.py rename to src/tablib/formats/_html.py diff --git a/tablib/formats/_jira.py b/src/tablib/formats/_jira.py similarity index 100% rename from tablib/formats/_jira.py rename to src/tablib/formats/_jira.py diff --git a/tablib/formats/_json.py b/src/tablib/formats/_json.py similarity index 100% rename from tablib/formats/_json.py rename to src/tablib/formats/_json.py diff --git a/tablib/formats/_latex.py b/src/tablib/formats/_latex.py similarity index 100% rename from tablib/formats/_latex.py rename to src/tablib/formats/_latex.py diff --git a/tablib/formats/_ods.py b/src/tablib/formats/_ods.py similarity index 100% rename from tablib/formats/_ods.py rename to src/tablib/formats/_ods.py diff --git a/tablib/formats/_rst.py b/src/tablib/formats/_rst.py similarity index 100% rename from tablib/formats/_rst.py rename to src/tablib/formats/_rst.py diff --git a/tablib/formats/_tsv.py b/src/tablib/formats/_tsv.py similarity index 100% rename from tablib/formats/_tsv.py rename to src/tablib/formats/_tsv.py diff --git a/tablib/formats/_xls.py b/src/tablib/formats/_xls.py similarity index 100% rename from tablib/formats/_xls.py rename to src/tablib/formats/_xls.py diff --git a/tablib/formats/_xlsx.py b/src/tablib/formats/_xlsx.py similarity index 100% rename from tablib/formats/_xlsx.py rename to src/tablib/formats/_xlsx.py diff --git a/tablib/formats/_yaml.py b/src/tablib/formats/_yaml.py similarity index 100% rename from tablib/formats/_yaml.py rename to src/tablib/formats/_yaml.py diff --git a/tablib/packages/__init__.py b/src/tablib/packages/__init__.py similarity index 100% rename from tablib/packages/__init__.py rename to src/tablib/packages/__init__.py diff --git a/tablib/packages/dbfpy/__init__.py b/src/tablib/packages/dbfpy/__init__.py similarity index 100% rename from tablib/packages/dbfpy/__init__.py rename to src/tablib/packages/dbfpy/__init__.py diff --git a/tablib/packages/dbfpy/dbf.py b/src/tablib/packages/dbfpy/dbf.py similarity index 100% rename from tablib/packages/dbfpy/dbf.py rename to src/tablib/packages/dbfpy/dbf.py diff --git a/tablib/packages/dbfpy/dbfnew.py b/src/tablib/packages/dbfpy/dbfnew.py similarity index 100% rename from tablib/packages/dbfpy/dbfnew.py rename to src/tablib/packages/dbfpy/dbfnew.py diff --git a/tablib/packages/dbfpy/fields.py b/src/tablib/packages/dbfpy/fields.py similarity index 100% rename from tablib/packages/dbfpy/fields.py rename to src/tablib/packages/dbfpy/fields.py diff --git a/tablib/packages/dbfpy/header.py b/src/tablib/packages/dbfpy/header.py similarity index 100% rename from tablib/packages/dbfpy/header.py rename to src/tablib/packages/dbfpy/header.py diff --git a/tablib/packages/dbfpy/record.py b/src/tablib/packages/dbfpy/record.py similarity index 100% rename from tablib/packages/dbfpy/record.py rename to src/tablib/packages/dbfpy/record.py diff --git a/tablib/packages/dbfpy/utils.py b/src/tablib/packages/dbfpy/utils.py similarity index 100% rename from tablib/packages/dbfpy/utils.py rename to src/tablib/packages/dbfpy/utils.py diff --git a/tablib/packages/dbfpy3/__init__.py b/src/tablib/packages/dbfpy3/__init__.py similarity index 100% rename from tablib/packages/dbfpy3/__init__.py rename to src/tablib/packages/dbfpy3/__init__.py diff --git a/tablib/packages/dbfpy3/dbf.py b/src/tablib/packages/dbfpy3/dbf.py similarity index 100% rename from tablib/packages/dbfpy3/dbf.py rename to src/tablib/packages/dbfpy3/dbf.py diff --git a/tablib/packages/dbfpy3/dbfnew.py b/src/tablib/packages/dbfpy3/dbfnew.py similarity index 100% rename from tablib/packages/dbfpy3/dbfnew.py rename to src/tablib/packages/dbfpy3/dbfnew.py diff --git a/tablib/packages/dbfpy3/fields.py b/src/tablib/packages/dbfpy3/fields.py similarity index 100% rename from tablib/packages/dbfpy3/fields.py rename to src/tablib/packages/dbfpy3/fields.py diff --git a/tablib/packages/dbfpy3/header.py b/src/tablib/packages/dbfpy3/header.py similarity index 100% rename from tablib/packages/dbfpy3/header.py rename to src/tablib/packages/dbfpy3/header.py diff --git a/tablib/packages/dbfpy3/record.py b/src/tablib/packages/dbfpy3/record.py similarity index 100% rename from tablib/packages/dbfpy3/record.py rename to src/tablib/packages/dbfpy3/record.py diff --git a/tablib/packages/dbfpy3/utils.py b/src/tablib/packages/dbfpy3/utils.py similarity index 100% rename from tablib/packages/dbfpy3/utils.py rename to src/tablib/packages/dbfpy3/utils.py diff --git a/tablib/packages/statistics.py b/src/tablib/packages/statistics.py similarity index 100% rename from tablib/packages/statistics.py rename to src/tablib/packages/statistics.py diff --git a/tablib/__init__.py b/tablib/__init__.py deleted file mode 100644 index a2175743..00000000 --- a/tablib/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -""" Tablib. """ - -from tablib.core import ( - Databook, Dataset, detect_format, import_set, import_book, - InvalidDatasetType, InvalidDimensions, UnsupportedFormat, - __version__ -) diff --git a/test_tablib.py b/tests/test_tablib.py similarity index 100% rename from test_tablib.py rename to tests/test_tablib.py diff --git a/tox.ini b/tox.ini index 9c017412..fdfb05da 100644 --- a/tox.ini +++ b/tox.ini @@ -8,4 +8,4 @@ deps = pytest-cov -rrequirements.txt extras = pandas -commands = pytest --cov tablib +commands = pytest From 99c32ced4f3b715db2865becb34d0e6369fcbe2b Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 18 Oct 2019 14:29:18 +0200 Subject: [PATCH 3/6] Fix testing. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d25bcaf9..c050028f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ python: cache: pip dist: xenial install: travis_retry pip install tox-travis -script: echo "Running tests against $(python --version) ..." +script: tox stages: - test - name: deploy @@ -15,7 +15,6 @@ stages: jobs: include: - stage: test - script: tox after_success: - pip install -U codecov - codecov From 11df300aa43c51184bd04c0b129e6d70a6976963 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 18 Oct 2019 14:39:35 +0200 Subject: [PATCH 4/6] Remove eggs. --- .gitignore | 3 + src/tablib.egg-info/PKG-INFO | 464 ----------------------- src/tablib.egg-info/SOURCES.txt | 77 ---- src/tablib.egg-info/dependency_links.txt | 1 - src/tablib.egg-info/requires.txt | 12 - src/tablib.egg-info/top_level.txt | 1 - 6 files changed, 3 insertions(+), 555 deletions(-) delete mode 100644 src/tablib.egg-info/PKG-INFO delete mode 100644 src/tablib.egg-info/SOURCES.txt delete mode 100644 src/tablib.egg-info/dependency_links.txt delete mode 100644 src/tablib.egg-info/requires.txt delete mode 100644 src/tablib.egg-info/top_level.txt diff --git a/.gitignore b/.gitignore index 988fd396..7f307270 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,7 @@ tablib.egg-info/* # Coverage .coverage htmlcov + +# setuptools noise .eggs +*.egg-info diff --git a/src/tablib.egg-info/PKG-INFO b/src/tablib.egg-info/PKG-INFO deleted file mode 100644 index 93ab9464..00000000 --- a/src/tablib.egg-info/PKG-INFO +++ /dev/null @@ -1,464 +0,0 @@ -Metadata-Version: 2.1 -Name: tablib -Version: 0.13.1.dev47+gbdb95c2.d20191018 -Summary: Format agnostic tabular data library (XLS, JSON, YAML, CSV) -Home-page: https://tablib.readthedocs.io -Author: Kenneth Reitz -Author-email: me@kennethreitz.org -License: MIT -Description: # Tablib: format-agnostic tabular dataset library - - [![Jazzband](https://jazzband.co/static/img/badge.svg)](https://jazzband.co/) - [![Build Status](https://travis-ci.org/jazzband/tablib.svg?branch=master)](https://travis-ci.org/jazzband/tablib) - [![codecov](https://codecov.io/gh/jazzband/tablib/branch/master/graph/badge.svg)](https://codecov.io/gh/jazzband/tablib) - - _____ ______ ___________ ______ - __ /_______ ____ /_ ___ /___(_)___ /_ - _ __/_ __ `/__ __ \__ / __ / __ __ \ - / /_ / /_/ / _ /_/ /_ / _ / _ /_/ / - \__/ \__,_/ /_.___/ /_/ /_/ /_.___/ - - - Tablib is a format-agnostic tabular dataset library, written in Python. - - Output formats supported: - - - Excel (Sets + Books) - - JSON (Sets + Books) - - YAML (Sets + Books) - - Pandas DataFrames (Sets) - - HTML (Sets) - - Jira (Sets) - - TSV (Sets) - - ODS (Sets) - - CSV (Sets) - - DBF (Sets) - - Note that tablib *purposefully* excludes XML support. It always will. (Note: This is a - joke. Pull requests are welcome.) - - - ## Overview - - `tablib.Dataset()` - - A Dataset is a table of tabular data. - It may or may not have a header row. - They can be build and manipulated as raw Python datatypes (Lists of tuples|dictionaries). - Datasets can be imported from JSON, YAML, DBF, and CSV; - they can be exported to XLSX, XLS, ODS, JSON, YAML, DBF, CSV, TSV, and HTML. - - `tablib.Databook()` - - A Databook is a set of Datasets. - The most common form of a Databook is an Excel file with multiple spreadsheets. - Databooks can be imported from JSON and YAML; - they can be exported to XLSX, XLS, ODS, JSON, and YAML. - - - ## Usage - - Populate fresh data files: - - ```python - headers = ('first_name', 'last_name') - - data = [ - ('John', 'Adams'), - ('George', 'Washington') - ] - - data = tablib.Dataset(*data, headers=headers) - ``` - - Intelligently add new rows: - - ```python - >>> data.append(('Henry', 'Ford')) - ``` - - Intelligently add new columns: - - ```python - >>> data.append_col((90, 67, 83), header='age') - ``` - - Slice rows: - - ```python - >>> print(data[:2]) - [('John', 'Adams', 90), ('George', 'Washington', 67)] - ``` - - Slice columns by header: - - ```python - >>> print(data['first_name']) - ['John', 'George', 'Henry'] - ``` - - Easily delete rows: - - ```python - >>> del data[1] - ``` - - - ## Exports - - Drumroll please........... - - ### JSON! - - ```python - >>> print(data.export('json')) - [ - { - "last_name": "Adams", - "age": 90, - "first_name": "John" - }, - { - "last_name": "Ford", - "age": 83, - "first_name": "Henry" - } - ] - ``` - - ### YAML! - - ```python - >>> print(data.export('yaml')) - - {age: 90, first_name: John, last_name: Adams} - - {age: 83, first_name: Henry, last_name: Ford} - ``` - - ### CSV... - - ```python - >>> print(data.export('csv')) - first_name,last_name,age - John,Adams,90 - Henry,Ford,83 - ``` - - ### EXCEL! - - ```python - >>> with open('people.xls', 'wb') as f: - ... f.write(data.export('xls')) - ``` - - ### DBF! - - ```python - >>> with open('people.dbf', 'wb') as f: - ... f.write(data.export('dbf')) - ``` - - ### Pandas DataFrame! - - ```python - >>> print(data.export('df')): - first_name last_name age - 0 John Adams 90 - 1 Henry Ford 83 - ``` - - It's that easy. - - - ## Installation - - To install tablib, simply: - - ```console - $ pip install tablib[pandas] - ``` - - Make sure to check out [Tablib on PyPI](https://pypi.org/project/tablib/)! - - - ## Contribute - - Please see the [contributing guide](https://github.com/jazzband/tablib/blob/master/.github/CONTRIBUTING.md). - - - # History - - ## Unreleased - - - The project is now maintained by the Jazzband team, https://jazzband.co - - Fixed `DataBook().load` parameter ordering (first stream, then format). - - Fixed a regression for xlsx exports where non-string values were forced to - strings (#314). - - Fixed xlsx format detection (which was often detected as `xls` format). - - Improved format autodetection and added autodetection for the odf format. - - Added search to all documentation pages - - Open xlsx workbooks in read-only mode (#316) - - Unpin requirements - - Only install backports.csv on Python 2 - - Added Python 3.7 support - - Dropped Python 3.4 support - - ## 0.13.0 (2019-03-08) - - - Added reStructuredText output capability (#336) - - Added Jira output capability - - Stopped calling openpyxl deprecated methods (accessing cells, removing sheets) - (openpyxl minimal version is now 2.4.0) - - Fixed a circular dependency issue in JSON output (#332) - - Fixed Unicode error for the CSV export on Python 2 (#215) - - Removed usage of optional `ujson` (#311) - - Dropped Python 3.3 support - - ## 0.12.1 (2017-09-01) - - - Favor `Dataset.export()` over `Dataset.` syntax in docs - - Make Panda dependency optional - - ## 0.12.0 (2017-08-27) - - - Add initial Panda DataFrame support - - Dropped Python 2.6 support - - ## 0.11.5 (2017-06-13) - - - Use `yaml.safe_load` for importing yaml. - - ## 0.11.4 (2017-01-23) - - - Use built-in `json` package if available - - Support Python 3.5+ in classifiers - - ### Bugfixes - - - Fixed textual representation for Dataset with no headers - - Handle decimal types - - ## 0.11.3 (2016-02-16) - - - Release fix. - - ## 0.11.2 (2016-02-16) - - ### Bugfixes - - - Fix export only formats. - - Fix for xlsx output. - - ## 0.11.1 (2016-02-07) - - ### Bugfixes - - - Fixed packaging error on Python 3. - - - ## 0.11.0 (2016-02-07) - - ### New Formats! - - - Added LaTeX table export format (`Dataset.latex`). - - Support for dBase (DBF) files (`Dataset.dbf`). - - ### Improvements - - - New import/export interface (`Dataset.export()`, `Dataset.load()`). - - CSV custom delimiter support (`Dataset.export('csv', delimiter='$')`). - - Adding ability to remove duplicates to all rows in a dataset (`Dataset.remove_duplicates()`). - - Added a mechanism to avoid `datetime.datetime` issues when serializing data. - - New `detect_format()` function (mostly for internal use). - - Update the vendored unicodecsv to fix `None` handling. - - Only freeze the headers row, not the headers columns (xls). - - ### Breaking Changes - - - `detect()` function removed. - - ### Bugfixes - - - Fix XLSX import. - - Bugfix for `Dataset.transpose().transpose()`. - - - ## 0.10.0 (2014-05-27) - - * Unicode Column Headers - * ALL the bugfixes! - - ## 0.9.11 (2011-06-30) - - * Bugfixes - - ## 0.9.10 (2011-06-22) - - * Bugfixes - - ## 0.9.9 (2011-06-21) - - * Dataset API Changes - * `stack_rows` => `stack`, `stack_columns` => `stack_cols` - * column operations have their own methods now (`append_col`, `insert_col`) - * List-style `pop()` - * Redis-style `rpush`, `lpush`, `rpop`, `lpop`, `rpush_col`, and `lpush_col` - - ## 0.9.8 (2011-05-22) - - * OpenDocument Spreadsheet support (.ods) - * Full Unicode TSV support - - - ## 0.9.7 (2011-05-12) - - * Full XLSX Support! - * Pickling Bugfix - * Compat Module - - - ## 0.9.6 (2011-05-12) - - * `seperators` renamed to `separators` - * Full unicode CSV support - - - ## 0.9.5 (2011-03-24) - - * Python 3.1, Python 3.2 Support (same code base!) - * Formatter callback support - * Various bug fixes - - - - ## 0.9.4 (2011-02-18) - - * Python 2.5 Support! - * Tox Testing for 2.5, 2.6, 2.7 - * AnyJSON Integrated - * OrderedDict support - * Caved to community pressure (spaces) - - - ## 0.9.3 (2011-01-31) - - * Databook duplication leak fix. - * HTML Table output. - * Added column sorting. - - - ## 0.9.2 (2010-11-17) - - * Transpose method added to Datasets. - * New frozen top row in Excel output. - * Pickling support for Datasets and Rows. - * Support for row/column stacking. - - - ## 0.9.1 (2010-11-04) - - * Minor reference shadowing bugfix. - - - ## 0.9.0 (2010-11-04) - - * Massive documentation update! - * Tablib.org! - * Row tagging and Dataset filtering! - * Column insert/delete support - * Column append API change (header required) - * Internal Changes (Row object and use thereof) - - - ## 0.8.5 (2010-10-06) - - * New import system. All dependencies attempt to load from site-packages, - then fallback on tenderized modules. - - - ## 0.8.4 (2010-10-04) - - * Updated XLS output: Only wrap if '\\n' in cell. - - - ## 0.8.3 (2010-10-04) - - * Ability to append new column passing a callable - as the value that will be applied to every row. - - - ## 0.8.2 (2010-10-04) - - * Added alignment wrapping to written cells. - * Added separator support to XLS. - - - ## 0.8.1 (2010-09-28) - - * Packaging Fix - - - ## 0.8.0 (2010-09-25) - - * New format plugin system! - * Imports! ELEGANT Imports! - * Tests. Lots of tests. - - - ## 0.7.1 (2010-09-20) - - * Reverting methods back to properties. - * Windows bug compensated in documentation. - - - ## 0.7.0 (2010-09-20) - - * Renamed DataBook Databook for consistency. - * Export properties changed to methods (XLS filename / StringIO bug). - * Optional Dataset.xls(path='filename') support (for writing on windows). - * Added utf-8 on the worksheet level. - - - ## 0.6.4 (2010-09-19) - - * Updated unicode export for XLS. - * More exhaustive unit tests. - - - ## 0.6.3 (2010-09-14) - - * Added Dataset.append() support for columns. - - - ## 0.6.2 (2010-09-13) - - * Fixed Dataset.append() error on empty dataset. - * Updated Dataset.headers property w/ validation. - * Added Testing Fixtures. - - ## 0.6.1 (2010-09-12) - - * Packaging hotfixes. - - - ## 0.6.0 (2010-09-11) - - * Public Release. - * Export Support for XLS, JSON, YAML, and CSV. - * DataBook Export for XLS, JSON, and YAML. - * Python Dict Property Support. - -Platform: UNKNOWN -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: Natural Language :: English -Classifier: License :: OSI Approved :: MIT License -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Programming Language :: Python :: 3.7 -Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* -Description-Content-Type: text/markdown -Provides-Extra: pandas diff --git a/src/tablib.egg-info/SOURCES.txt b/src/tablib.egg-info/SOURCES.txt deleted file mode 100644 index dfa034c4..00000000 --- a/src/tablib.egg-info/SOURCES.txt +++ /dev/null @@ -1,77 +0,0 @@ -.coveragerc -.gitignore -.travis.yml -AUTHORS -HACKING -HISTORY.md -LICENSE -MANIFEST.in -Makefile -README.md -requirements.txt -setup.py -tox.ini -.github/CONTRIBUTING.md -docs/Makefile -docs/Pipfile -docs/__init__.py -docs/api.rst -docs/conf.py -docs/development.rst -docs/index.rst -docs/install.rst -docs/intro.rst -docs/krstyle.sty -docs/tutorial.rst -docs/_templates/sidebarintro.html -docs/_templates/sidebarlogo.html -docs/_themes/.gitignore -docs/_themes/LICENSE -docs/_themes/README.rst -docs/_themes/flask_theme_support.py -docs/_themes/kr/layout.html -docs/_themes/kr/relations.html -docs/_themes/kr/theme.conf -docs/_themes/kr/static/flasky.css_t -docs/_themes/kr/static/small_flask.css -docs/_themes/kr_small/layout.html -docs/_themes/kr_small/theme.conf -docs/_themes/kr_small/static/flasky.css_t -src/tablib/__init__.py -src/tablib/compat.py -src/tablib/core.py -src/tablib.egg-info/PKG-INFO -src/tablib.egg-info/SOURCES.txt -src/tablib.egg-info/dependency_links.txt -src/tablib.egg-info/requires.txt -src/tablib.egg-info/top_level.txt -src/tablib/formats/__init__.py -src/tablib/formats/_csv.py -src/tablib/formats/_dbf.py -src/tablib/formats/_df.py -src/tablib/formats/_html.py -src/tablib/formats/_jira.py -src/tablib/formats/_json.py -src/tablib/formats/_latex.py -src/tablib/formats/_ods.py -src/tablib/formats/_rst.py -src/tablib/formats/_tsv.py -src/tablib/formats/_xls.py -src/tablib/formats/_xlsx.py -src/tablib/formats/_yaml.py -src/tablib/packages/__init__.py -src/tablib/packages/statistics.py -src/tablib/packages/dbfpy/__init__.py -src/tablib/packages/dbfpy/dbf.py -src/tablib/packages/dbfpy/dbfnew.py -src/tablib/packages/dbfpy/fields.py -src/tablib/packages/dbfpy/header.py -src/tablib/packages/dbfpy/record.py -src/tablib/packages/dbfpy/utils.py -src/tablib/packages/dbfpy3/__init__.py -src/tablib/packages/dbfpy3/dbf.py -src/tablib/packages/dbfpy3/dbfnew.py -src/tablib/packages/dbfpy3/fields.py -src/tablib/packages/dbfpy3/header.py -src/tablib/packages/dbfpy3/record.py -src/tablib/packages/dbfpy3/utils.py \ No newline at end of file diff --git a/src/tablib.egg-info/dependency_links.txt b/src/tablib.egg-info/dependency_links.txt deleted file mode 100644 index 8b137891..00000000 --- a/src/tablib.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/tablib.egg-info/requires.txt b/src/tablib.egg-info/requires.txt deleted file mode 100644 index 37c1be5f..00000000 --- a/src/tablib.egg-info/requires.txt +++ /dev/null @@ -1,12 +0,0 @@ -odfpy -openpyxl>=2.4.0 -markuppy -xlrd -xlwt -pyyaml - -[:python_version < "3.0"] -backports.csv - -[pandas] -pandas diff --git a/src/tablib.egg-info/top_level.txt b/src/tablib.egg-info/top_level.txt deleted file mode 100644 index e3839332..00000000 --- a/src/tablib.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -tablib From 70e2977ba1316cea07170b05b8661cd5b58b200c Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 18 Oct 2019 15:01:52 +0200 Subject: [PATCH 5/6] More fixes. - isort and flake8 config - manifest template update - tox ini extension - docs build fixes - docs content fixes --- .isort.cfg | 6 ++++ .travis.yml | 34 ++++++------------- HACKING | 14 -------- MANIFEST.in | 7 +++- Makefile | 6 ---- docs/api.rst | 4 +-- docs/development.rst | 26 +-------------- docs/tutorial.rst | 5 +-- src/tablib/core.py | 9 ++--- requirements.txt => tests/requirements.txt | 2 ++ tests/test_tablib.py | 4 --- tox.ini | 39 +++++++++++++++++++--- 12 files changed, 68 insertions(+), 88 deletions(-) create mode 100644 .isort.cfg delete mode 100644 HACKING delete mode 100644 Makefile rename requirements.txt => tests/requirements.txt (83%) diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 00000000..ba2778dc --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,6 @@ +[settings] +multi_line_output=3 +include_trailing_comma=True +force_grid_wrap=0 +use_parentheses=True +line_length=88 diff --git a/.travis.yml b/.travis.yml index c050028f..92538283 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,27 +8,15 @@ cache: pip dist: xenial install: travis_retry pip install tox-travis script: tox -stages: -- test -- name: deploy - if: repo = jazzband/tablib AND tag IS present -jobs: - include: - - stage: test - after_success: - - pip install -U codecov - - codecov - - stage: deploy - install: skip - script: skip +after_success: bash <(curl -s https://codecov.io/bash) +deploy: + provider: pypi + user: jazzband + server: https://jazzband.co/projects/tablib/upload + distributions: sdist bdist_wheel + password: + secure: svV4fYtodwW+iTyFOm5ISEfhVwcA+6vTskD3x6peznc40TdMV9Ek8nT3Q/NB4lCbXoUw2qR4H6uhLCjesnv/VvVk/qbitCyD8ySlgwOV5n7NzJs8lC8EYaHSjGQjatTwJAokfGVYkPawkI7HXDqtDggLUQBK+Ag8HDW+XBSbQIU= + on: + tags: true + repo: jazzband/tablib python: 3.7 - deploy: - provider: pypi - user: jazzband - server: https://jazzband.co/projects/tablib/upload - distributions: sdist bdist_wheel - password: - secure: svV4fYtodwW+iTyFOm5ISEfhVwcA+6vTskD3x6peznc40TdMV9Ek8nT3Q/NB4lCbXoUw2qR4H6uhLCjesnv/VvVk/qbitCyD8ySlgwOV5n7NzJs8lC8EYaHSjGQjatTwJAokfGVYkPawkI7HXDqtDggLUQBK+Ag8HDW+XBSbQIU= - on: - tags: true - repo: jazzband/tablib diff --git a/HACKING b/HACKING deleted file mode 100644 index ebbb24cc..00000000 --- a/HACKING +++ /dev/null @@ -1,14 +0,0 @@ -Where possible, please follow PEP8 with regard to coding style. Sometimes the line -length restriction is too hard to follow, so don't bend over backwards there. - -Triple-quotes should always be """, single quotes are ' unless using " -would result in less escaping within the string. - -All modules, functions, and methods should be well documented reStructuredText for -Sphinx AutoDoc. - -All functionality should be available in pure Python. Optional C (via Cython) -implementations may be written for performance reasons, but should never -replace the Python implementation. - -Lastly, don't take yourself too seriously :) \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index 65583dc6..2f5f4f3d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,6 @@ -include HISTORY.md README.md LICENSE AUTHORS test_tablib.py +recursive-include docs * +recursive-include tests * +include pytest.ini tox.ini .isort.cfg .coveragerc HISTORY.md README.md LICENSE AUTHORS +prune docs/_build +prune *.pyc +prune __pycache__ diff --git a/Makefile b/Makefile deleted file mode 100644 index 35470bd2..00000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -test: - python test_tablib.py -publish: - python setup.py register - python setup.py sdist upload - python setup.py bdist_wheel --universal upload diff --git a/docs/api.rst b/docs/api.rst index 942b69d2..1792eb59 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -36,7 +36,7 @@ Functions --------- -.. autofunction:: detect +.. autofunction:: detect_format .. autofunction:: import_set @@ -61,4 +61,4 @@ Exceptions You're trying to add something that doesn't quite taste right. -Now, go start some :ref:`Tablib Development `. \ No newline at end of file +Now, go start some :ref:`Tablib Development `. diff --git a/docs/development.rst b/docs/development.rst index 83fd159a..c481d0da 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -150,31 +150,7 @@ the easiest way to test your changes for potential issues is to simply run the t .. code-block:: console - $ ./test_tablib.py - - -`Jenkins CI`_, amongst other tools, supports Java's xUnit testing report format. -Nose_ allows us to generate our own xUnit reports. - -Installing nose is simple. - -.. code-block:: console - - $ pip install nose - -Once installed, we can generate our xUnit report with a single command. - -.. code-block:: console - - $ nosetests test_tablib.py --with-xunit - -This will generate a **nosetests.xml** file, which can then be analyzed. - -.. _Nose: https://github.com/nose-devs/nose - - - -.. _jenkins: + $ tox ---------------------- Continuous Integration diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 421954a7..4189269d 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -5,9 +5,6 @@ Quickstart ========== -.. module:: tablib - - Eager to get started? This page gives a good introduction in how to get started with Tablib. This assumes you already have Tablib installed. @@ -301,7 +298,7 @@ Now that we have extra meta-data on our rows, we can easily filter our :class:`D It's that simple. The original :class:`Dataset` is untouched. Open an Excel Workbook and read first sheet --------------------------------- +------------------------------------------- To open an Excel 2007 and later workbook with a single sheet (or a workbook with multiple sheets but you just want the first sheet), use the following: diff --git a/src/tablib/core.py b/src/tablib/core.py index 107cbe8a..9d21d749 100644 --- a/src/tablib/core.py +++ b/src/tablib/core.py @@ -815,12 +815,13 @@ def get_col(self, index): # ---- def add_formatter(self, col, handler): - """Adds a :ref:`formatter` to the :class:`Dataset`. + """Adds a formatter to the :class:`Dataset`. .. versionadded:: 0.9.5 - :param col: column to. Accepts index int or header str. - :param handler: reference to callback function to execute - against each cell value. + + :param col: column to. Accepts index int or header str. + :param handler: reference to callback function to execute + against each cell value. """ if isinstance(col, unicode): diff --git a/requirements.txt b/tests/requirements.txt similarity index 83% rename from requirements.txt rename to tests/requirements.txt index 11061933..cd43514a 100644 --- a/requirements.txt +++ b/tests/requirements.txt @@ -1,3 +1,5 @@ +pytest +pytest-cov backports.csv; python_version < '3.0' MarkupPy odfpy diff --git a/tests/test_tablib.py b/tests/test_tablib.py index 216ca880..c872e81c 100755 --- a/tests/test_tablib.py +++ b/tests/test_tablib.py @@ -1103,7 +1103,3 @@ class DocTests(unittest.TestCase): def test_rst_formatter_doctests(self): results = doctest.testmod(tablib.formats._rst) self.assertEqual(results.failed, 0) - - -if __name__ == '__main__': - unittest.main() diff --git a/tox.ini b/tox.ini index fdfb05da..ebd8f538 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,40 @@ [tox] +usedevelop = true minversion = 2.4 -envlist = py27, py35, py36, py37 +envlist = + py{27,35,36,37,38}-tests, + py37-{docs,lint} [testenv] +basepython = + py27: python2.7 + py35: python3.5 + py36: python3.6 + py37: python3.7 + py38: python3.8 deps = - pytest - pytest-cov - -rrequirements.txt + tests: -rtests/requirements.txt + docs: sphinx extras = pandas -commands = pytest +commands = + tests: pytest {posargs:tests} + docs: sphinx-build -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html + +[testenv:py37-lint] +basepython = python3.7 +deps = + flake8 + # flake8-black + # flake8-isort + twine + check-manifest +commands = + # flake8 src/tablib tests/ + check-manifest -v + python setup.py sdist + twine check dist/* + +[flake8] +exclude = + .tox +ignore=E501,E127,E128,E124 From 12ce6102bb1d4affad42bd07223db8568e70fcc5 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 18 Oct 2019 15:19:13 +0200 Subject: [PATCH 6/6] Docs and license cleanup. --- LICENSE | 3 +- docs/_templates/sidebarintro.html | 31 -- docs/_templates/sidebarlogo.html | 22 - docs/_themes/.gitignore | 3 - docs/_themes/LICENSE | 45 --- docs/_themes/README.rst | 24 -- docs/_themes/flask_theme_support.py | 86 ---- docs/_themes/kr/layout.html | 54 --- docs/_themes/kr/relations.html | 19 - docs/_themes/kr/static/flasky.css_t | 470 ---------------------- docs/_themes/kr/static/small_flask.css | 70 ---- docs/_themes/kr/theme.conf | 7 - docs/_themes/kr_small/layout.html | 22 - docs/_themes/kr_small/static/flasky.css_t | 287 ------------- docs/_themes/kr_small/theme.conf | 10 - docs/conf.py | 26 +- setup.py | 2 + src/tablib/core.py | 8 +- 18 files changed, 16 insertions(+), 1173 deletions(-) delete mode 100644 docs/_themes/.gitignore delete mode 100644 docs/_themes/LICENSE delete mode 100644 docs/_themes/README.rst delete mode 100644 docs/_themes/flask_theme_support.py delete mode 100644 docs/_themes/kr/layout.html delete mode 100644 docs/_themes/kr/relations.html delete mode 100644 docs/_themes/kr/static/flasky.css_t delete mode 100644 docs/_themes/kr/static/small_flask.css delete mode 100644 docs/_themes/kr/theme.conf delete mode 100644 docs/_themes/kr_small/layout.html delete mode 100644 docs/_themes/kr_small/static/flasky.css_t delete mode 100644 docs/_themes/kr_small/theme.conf diff --git a/LICENSE b/LICENSE index 068005bd..9bfca256 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,5 @@ Copyright 2016 Kenneth Reitz +Copyright 2019 Jazzband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -16,4 +17,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html index 6da5e197..376af426 100644 --- a/docs/_templates/sidebarintro.html +++ b/docs/_templates/sidebarintro.html @@ -2,37 +2,6 @@

About Tablib

Tablib is an MIT Licensed format-agnostic tabular dataset library, written in Python. It allows you to import, export, and manipulate tabular data sets. Advanced features include, segregation, dynamic columns, tags & filtering, and seamless format import & export.

- - - - - -

Feedback

-

- Feedback is greatly appreciated. If you have any questions, comments, - random praise, or anonymous threats, - shoot me an email. -

- -

Useful Links

  • The Tablib Website
  • diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html index 32f382ba..a755281c 100644 --- a/docs/_templates/sidebarlogo.html +++ b/docs/_templates/sidebarlogo.html @@ -2,25 +2,3 @@

    About Tablib

    Tablib is an MIT Licensed format-agnostic tabular dataset library, written in Python. It allows you to import, export, and manipulate tabular data sets. Advanced features include, segregation, dynamic columns, tags & filtering, and seamless format import & export.

    - - - - \ No newline at end of file diff --git a/docs/_themes/.gitignore b/docs/_themes/.gitignore deleted file mode 100644 index 66b6e4c2..00000000 --- a/docs/_themes/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.pyc -*.pyo -.DS_Store diff --git a/docs/_themes/LICENSE b/docs/_themes/LICENSE deleted file mode 100644 index 3d1e04a2..00000000 --- a/docs/_themes/LICENSE +++ /dev/null @@ -1,45 +0,0 @@ -Modifications: - -Copyright (c) 2011 Kenneth Reitz. - - -Original Project: - -Copyright (c) 2010 by Armin Ronacher. - - -Some rights reserved. - -Redistribution and use in source and binary forms of the theme, with or -without modification, are permitted provided that the following conditions -are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - -* The names of the contributors may not be used to endorse or - promote products derived from this software without specific - prior written permission. - -We kindly ask you to only use these themes in an unmodified manner just -for Flask and Flask-related products, not for unrelated projects. If you -like the visual style and want to use it for your own projects, please -consider making some larger changes to the themes (such as changing -font faces, sizes, colors or margins). - -THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/docs/_themes/README.rst b/docs/_themes/README.rst deleted file mode 100644 index c97a9a53..00000000 --- a/docs/_themes/README.rst +++ /dev/null @@ -1,24 +0,0 @@ -krTheme Sphinx Style -==================== - -This repository contains sphinx styles Kenneth Reitz uses in most of -his projects. It is a drivative of Mitsuhiko's themes for Flask and Flask related -projects. To use this style in your Sphinx documentation, follow -this guide: - -1. put this folder as _themes into your docs folder. Alternatively - you can also use git submodules to check out the contents there. - -2. add this to your conf.py: :: - - sys.path.append(os.path.abspath('_themes')) - html_theme_path = ['_themes'] - html_theme = 'flask' - -The following themes exist: - -**kr** - the standard flask documentation theme for large projects - -**kr_small** - small one-page theme. Intended to be used by very small addon libraries. diff --git a/docs/_themes/flask_theme_support.py b/docs/_themes/flask_theme_support.py deleted file mode 100644 index 33f47449..00000000 --- a/docs/_themes/flask_theme_support.py +++ /dev/null @@ -1,86 +0,0 @@ -# flasky extensions. flasky pygments style based on tango style -from pygments.style import Style -from pygments.token import Keyword, Name, Comment, String, Error, \ - Number, Operator, Generic, Whitespace, Punctuation, Other, Literal - - -class FlaskyStyle(Style): - background_color = "#f8f8f8" - default_style = "" - - styles = { - # No corresponding class for the following: - #Text: "", # class: '' - Whitespace: "underline #f8f8f8", # class: 'w' - Error: "#a40000 border:#ef2929", # class: 'err' - Other: "#000000", # class 'x' - - Comment: "italic #8f5902", # class: 'c' - Comment.Preproc: "noitalic", # class: 'cp' - - Keyword: "bold #004461", # class: 'k' - Keyword.Constant: "bold #004461", # class: 'kc' - Keyword.Declaration: "bold #004461", # class: 'kd' - Keyword.Namespace: "bold #004461", # class: 'kn' - Keyword.Pseudo: "bold #004461", # class: 'kp' - Keyword.Reserved: "bold #004461", # class: 'kr' - Keyword.Type: "bold #004461", # class: 'kt' - - Operator: "#582800", # class: 'o' - Operator.Word: "bold #004461", # class: 'ow' - like keywords - - Punctuation: "bold #000000", # class: 'p' - - # because special names such as Name.Class, Name.Function, etc. - # are not recognized as such later in the parsing, we choose them - # to look the same as ordinary variables. - Name: "#000000", # class: 'n' - Name.Attribute: "#c4a000", # class: 'na' - to be revised - Name.Builtin: "#004461", # class: 'nb' - Name.Builtin.Pseudo: "#3465a4", # class: 'bp' - Name.Class: "#000000", # class: 'nc' - to be revised - Name.Constant: "#000000", # class: 'no' - to be revised - Name.Decorator: "#888", # class: 'nd' - to be revised - Name.Entity: "#ce5c00", # class: 'ni' - Name.Exception: "bold #cc0000", # class: 'ne' - Name.Function: "#000000", # class: 'nf' - Name.Property: "#000000", # class: 'py' - Name.Label: "#f57900", # class: 'nl' - Name.Namespace: "#000000", # class: 'nn' - to be revised - Name.Other: "#000000", # class: 'nx' - Name.Tag: "bold #004461", # class: 'nt' - like a keyword - Name.Variable: "#000000", # class: 'nv' - to be revised - Name.Variable.Class: "#000000", # class: 'vc' - to be revised - Name.Variable.Global: "#000000", # class: 'vg' - to be revised - Name.Variable.Instance: "#000000", # class: 'vi' - to be revised - - Number: "#990000", # class: 'm' - - Literal: "#000000", # class: 'l' - Literal.Date: "#000000", # class: 'ld' - - String: "#4e9a06", # class: 's' - String.Backtick: "#4e9a06", # class: 'sb' - String.Char: "#4e9a06", # class: 'sc' - String.Doc: "italic #8f5902", # class: 'sd' - like a comment - String.Double: "#4e9a06", # class: 's2' - String.Escape: "#4e9a06", # class: 'se' - String.Heredoc: "#4e9a06", # class: 'sh' - String.Interpol: "#4e9a06", # class: 'si' - String.Other: "#4e9a06", # class: 'sx' - String.Regex: "#4e9a06", # class: 'sr' - String.Single: "#4e9a06", # class: 's1' - String.Symbol: "#4e9a06", # class: 'ss' - - Generic: "#000000", # class: 'g' - Generic.Deleted: "#a40000", # class: 'gd' - Generic.Emph: "italic #000000", # class: 'ge' - Generic.Error: "#ef2929", # class: 'gr' - Generic.Heading: "bold #000080", # class: 'gh' - Generic.Inserted: "#00A000", # class: 'gi' - Generic.Output: "#888", # class: 'go' - Generic.Prompt: "#745334", # class: 'gp' - Generic.Strong: "bold #000000", # class: 'gs' - Generic.Subheading: "bold #800080", # class: 'gu' - Generic.Traceback: "bold #a40000", # class: 'gt' - } diff --git a/docs/_themes/kr/layout.html b/docs/_themes/kr/layout.html deleted file mode 100644 index 975b793c..00000000 --- a/docs/_themes/kr/layout.html +++ /dev/null @@ -1,54 +0,0 @@ -{%- extends "basic/layout.html" %} -{%- block extrahead %} - {{ super() }} - {% if theme_touch_icon %} - - {% endif %} - -{% endblock %} -{%- block relbar2 %}{% endblock %} -{%- block footer %} - - - Fork me on GitHub - - - - - - - - - -{%- endblock %} diff --git a/docs/_themes/kr/relations.html b/docs/_themes/kr/relations.html deleted file mode 100644 index 3bbcde85..00000000 --- a/docs/_themes/kr/relations.html +++ /dev/null @@ -1,19 +0,0 @@ -

    Related Topics

    - diff --git a/docs/_themes/kr/static/flasky.css_t b/docs/_themes/kr/static/flasky.css_t deleted file mode 100644 index 1bc22de9..00000000 --- a/docs/_themes/kr/static/flasky.css_t +++ /dev/null @@ -1,470 +0,0 @@ -/* - * flasky.css_t - * ~~~~~~~~~~~~ - * - * :copyright: Copyright 2010 by Armin Ronacher. Modifications by Kenneth Reitz. - * :license: Flask Design License, see LICENSE for details. - */ - -{% set page_width = '940px' %} -{% set sidebar_width = '220px' %} - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro'; - font-size: 17px; - background-color: white; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - width: {{ page_width }}; - margin: 30px auto 0 auto; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 {{ sidebar_width }}; -} - -div.sphinxsidebar { - width: {{ sidebar_width }}; -} - -hr { - border: 1px solid #B1B4B6; -} - -div.body { - background-color: #ffffff; - color: #3E4349; - padding: 0 30px 0 30px; -} - -img.floatingflask { - padding: 0 0 10px 10px; - float: right; -} - -div.footer { - width: {{ page_width }}; - margin: 20px auto 30px auto; - font-size: 14px; - color: #888; - text-align: right; -} - -div.footer a { - color: #888; -} - -div.related { - display: none; -} - -div.sphinxsidebar a { - color: #444; - text-decoration: none; - border-bottom: 1px dotted #999; -} - -div.sphinxsidebar a:hover { - border-bottom: 1px solid #999; -} - -div.sphinxsidebar { - font-size: 14px; - line-height: 1.5; -} - -div.sphinxsidebarwrapper { - padding: 18px 10px; -} - -div.sphinxsidebarwrapper p.logo { - padding: 0 0 20px 0; - margin: 0; - text-align: center; -} - -div.sphinxsidebar h3, -div.sphinxsidebar h4 { - font-family: 'Garamond', 'Georgia', serif; - color: #444; - font-size: 24px; - font-weight: normal; - margin: 0 0 5px 0; - padding: 0; -} - -div.sphinxsidebar h4 { - font-size: 20px; -} - -div.sphinxsidebar h3 a { - color: #444; -} - -div.sphinxsidebar p.logo a, -div.sphinxsidebar h3 a, -div.sphinxsidebar p.logo a:hover, -div.sphinxsidebar h3 a:hover { - border: none; -} - -div.sphinxsidebar p { - color: #555; - margin: 10px 0; -} - -div.sphinxsidebar ul { - margin: 10px 0; - padding: 0; - color: #000; -} - -div.sphinxsidebar input { - border: 1px solid #ccc; - font-family: 'Georgia', serif; - font-size: 1em; -} - -/* -- body styles ----------------------------------------------------------- */ - -a { - color: #004B6B; - text-decoration: underline; -} - -a:hover { - color: #6D4100; - text-decoration: underline; -} - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Garamond', 'Georgia', serif; - font-weight: normal; - margin: 30px 0px 10px 0px; - padding: 0; -} - -div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } -div.body h2 { font-size: 180%; } -div.body h3 { font-size: 150%; } -div.body h4 { font-size: 130%; } -div.body h5 { font-size: 100%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #ddd; - padding: 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - color: #444; - background: #eaeaea; -} - -div.body p, div.body dd, div.body li { - line-height: 1.4em; -} - -div.admonition { - background: #fafafa; - margin: 20px -30px; - padding: 10px 30px; - border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; -} - -div.admonition tt.xref, div.admonition a tt { - border-bottom: 1px solid #fafafa; -} - -dd div.admonition { - margin-left: -60px; - padding-left: 60px; -} - -div.admonition p.admonition-title { - font-family: 'Garamond', 'Georgia', serif; - font-weight: normal; - font-size: 24px; - margin: 0 0 10px 0; - padding: 0; - line-height: 1; -} - -div.admonition p.last { - margin-bottom: 0; -} - -div.highlight { - background-color: white; -} - -dt:target, .highlight { - background: #FAF3E8; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre, tt { - font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; - font-size: 0.9em; -} - -img.screenshot { -} - -tt.descname, tt.descclassname { - font-size: 0.95em; -} - -tt.descname { - padding-right: 0.08em; -} - -img.screenshot { - -moz-box-shadow: 2px 2px 4px #eee; - -webkit-box-shadow: 2px 2px 4px #eee; - box-shadow: 2px 2px 4px #eee; -} - -table.docutils { - border: 1px solid #888; - -moz-box-shadow: 2px 2px 4px #eee; - -webkit-box-shadow: 2px 2px 4px #eee; - box-shadow: 2px 2px 4px #eee; -} - -table.docutils td, table.docutils th { - border: 1px solid #888; - padding: 0.25em 0.7em; -} - -table.field-list, table.footnote { - border: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -table.footnote { - margin: 15px 0; - width: 100%; - border: 1px solid #eee; - background: #fdfdfd; - font-size: 0.9em; -} - -table.footnote + table.footnote { - margin-top: -15px; - border-top: none; -} - -table.field-list th { - padding: 0 0.8em 0 0; -} - -table.field-list td { - padding: 0; -} - -table.footnote td.label { - width: 0px; - padding: 0.3em 0 0.3em 0.5em; -} - -table.footnote td { - padding: 0.3em 0.5em; -} - -dl { - margin: 0; - padding: 0; -} - -dl dd { - margin-left: 30px; -} - -blockquote { - margin: 0 0 0 30px; - padding: 0; -} - -ul, ol { - margin: 10px 0 10px 30px; - padding: 0; -} - -pre { - background: #eee; - padding: 7px 30px; - margin: 15px -30px; - line-height: 1.3em; -} - -dl pre, blockquote pre, li pre { - margin-left: -60px; - padding-left: 60px; -} - -dl dl pre { - margin-left: -90px; - padding-left: 90px; -} - -tt { - background-color: #ecf0f3; - color: #222; - /* padding: 1px 2px; */ -} - -tt.xref, a tt { - background-color: #FBFBFB; - border-bottom: 1px solid white; -} - -a.reference { - text-decoration: none; - border-bottom: 1px dotted #004B6B; -} - -a.reference:hover { - border-bottom: 1px solid #6D4100; -} - -a.footnote-reference { - text-decoration: none; - font-size: 0.7em; - vertical-align: top; - border-bottom: 1px dotted #004B6B; -} - -a.footnote-reference:hover { - border-bottom: 1px solid #6D4100; -} - -a:hover tt { - background: #EEE; -} - - -@media screen and (max-width: 600px) { - - div.sphinxsidebar { - display: none; - } - - div.documentwrapper { - margin-left: 0; - margin-top: 0; - margin-right: 0; - margin-bottom: 0; - } - - div.bodywrapper { - margin-top: 0; - margin-right: 0; - margin-bottom: 0; - margin-left: 0; - } - - ul { - margin-left: 0; - } - - .document { - width: auto; - } - - .bodywrapper { - margin: 0; - } - - .footer { - width: auto; - } - - - -} - - - -/* scrollbars */ - -::-webkit-scrollbar { - width: 6px; - height: 6px; -} - -::-webkit-scrollbar-button:start:decrement, -::-webkit-scrollbar-button:end:increment { - display: block; - height: 10px; -} - -::-webkit-scrollbar-button:vertical:increment { - background-color: #fff; -} - -::-webkit-scrollbar-track-piece { - background-color: #eee; - -webkit-border-radius: 3px; -} - -::-webkit-scrollbar-thumb:vertical { - height: 50px; - background-color: #ccc; - -webkit-border-radius: 3px; -} - -::-webkit-scrollbar-thumb:horizontal { - width: 50px; - background-color: #ccc; - -webkit-border-radius: 3px; -} - -/* misc. */ - -.revsys-inline { - display: none!important; -} \ No newline at end of file diff --git a/docs/_themes/kr/static/small_flask.css b/docs/_themes/kr/static/small_flask.css deleted file mode 100644 index 1c6df309..00000000 --- a/docs/_themes/kr/static/small_flask.css +++ /dev/null @@ -1,70 +0,0 @@ -/* - * small_flask.css_t - * ~~~~~~~~~~~~~~~~~ - * - * :copyright: Copyright 2010 by Armin Ronacher. - * :license: Flask Design License, see LICENSE for details. - */ - -body { - margin: 0; - padding: 20px 30px; -} - -div.documentwrapper { - float: none; - background: white; -} - -div.sphinxsidebar { - display: block; - float: none; - width: 102.5%; - margin: 50px -30px -20px -30px; - padding: 10px 20px; - background: #333; - color: white; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, -div.sphinxsidebar h3 a { - color: white; -} - -div.sphinxsidebar a { - color: #aaa; -} - -div.sphinxsidebar p.logo { - display: none; -} - -div.document { - width: 100%; - margin: 0; -} - -div.related { - display: block; - margin: 0; - padding: 10px 0 20px 0; -} - -div.related ul, -div.related ul li { - margin: 0; - padding: 0; -} - -div.footer { - display: none; -} - -div.bodywrapper { - margin: 0; -} - -div.body { - min-height: 0; - padding: 0; -} diff --git a/docs/_themes/kr/theme.conf b/docs/_themes/kr/theme.conf deleted file mode 100644 index 07698f6f..00000000 --- a/docs/_themes/kr/theme.conf +++ /dev/null @@ -1,7 +0,0 @@ -[theme] -inherit = basic -stylesheet = flasky.css -pygments_style = flask_theme_support.FlaskyStyle - -[options] -touch_icon = diff --git a/docs/_themes/kr_small/layout.html b/docs/_themes/kr_small/layout.html deleted file mode 100644 index cab20c78..00000000 --- a/docs/_themes/kr_small/layout.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "basic/layout.html" %} -{% block header %} - {{ super() }} - {% if pagename == 'index' %} -
    - {% endif %} -{% endblock %} -{% block footer %} - {% if pagename == 'index' %} -
    - {% endif %} -{% endblock %} -{# do not display relbars #} -{% block relbar1 %}{% endblock %} -{% block relbar2 %} - {% if theme_github_fork %} - Fork me on GitHub - {% endif %} -{% endblock %} -{% block sidebar1 %}{% endblock %} -{% block sidebar2 %}{% endblock %} diff --git a/docs/_themes/kr_small/static/flasky.css_t b/docs/_themes/kr_small/static/flasky.css_t deleted file mode 100644 index 71961a27..00000000 --- a/docs/_themes/kr_small/static/flasky.css_t +++ /dev/null @@ -1,287 +0,0 @@ -/* - * flasky.css_t - * ~~~~~~~~~~~~ - * - * Sphinx stylesheet -- flasky theme based on nature theme. - * - * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: 'Georgia', serif; - font-size: 17px; - color: #000; - background: white; - margin: 0; - padding: 0; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 40px auto 0 auto; - width: 700px; -} - -hr { - border: 1px solid #B1B4B6; -} - -div.body { - background-color: #ffffff; - color: #3E4349; - padding: 0 30px 30px 30px; -} - -img.floatingflask { - padding: 0 0 10px 10px; - float: right; -} - -div.footer { - text-align: right; - color: #888; - padding: 10px; - font-size: 14px; - width: 650px; - margin: 0 auto 40px auto; -} - -div.footer a { - color: #888; - text-decoration: underline; -} - -div.related { - line-height: 32px; - color: #888; -} - -div.related ul { - padding: 0 0 0 10px; -} - -div.related a { - color: #444; -} - -/* -- body styles ----------------------------------------------------------- */ - -a { - color: #004B6B; - text-decoration: underline; -} - -a:hover { - color: #6D4100; - text-decoration: underline; -} - -div.body { - padding-bottom: 40px; /* saved for footer */ -} - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Garamond', 'Georgia', serif; - font-weight: normal; - margin: 30px 0px 10px 0px; - padding: 0; -} - -{% if theme_index_logo %} -div.indexwrapper h1 { - text-indent: -999999px; - background: url({{ theme_index_logo }}) no-repeat center center; - height: {{ theme_index_logo_height }}; -} -{% endif %} - -div.body h2 { font-size: 180%; } -div.body h3 { font-size: 150%; } -div.body h4 { font-size: 130%; } -div.body h5 { font-size: 100%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: white; - padding: 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - color: #444; - background: #eaeaea; -} - -div.body p, div.body dd, div.body li { - line-height: 1.4em; -} - -div.admonition { - background: #fafafa; - margin: 20px -30px; - padding: 10px 30px; - border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; -} - -div.admonition p.admonition-title { - font-family: 'Garamond', 'Georgia', serif; - font-weight: normal; - font-size: 24px; - margin: 0 0 10px 0; - padding: 0; - line-height: 1; -} - -div.admonition p.last { - margin-bottom: 0; -} - -div.highlight{ - background-color: white; -} - -dt:target, .highlight { - background: #FAF3E8; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre, tt { - font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; - font-size: 0.85em; -} - -img.screenshot { -} - -tt.descname, tt.descclassname { - font-size: 0.95em; -} - -tt.descname { - padding-right: 0.08em; -} - -img.screenshot { - -moz-box-shadow: 2px 2px 4px #eee; - -webkit-box-shadow: 2px 2px 4px #eee; - box-shadow: 2px 2px 4px #eee; -} - -table.docutils { - border: 1px solid #888; - -moz-box-shadow: 2px 2px 4px #eee; - -webkit-box-shadow: 2px 2px 4px #eee; - box-shadow: 2px 2px 4px #eee; -} - -table.docutils td, table.docutils th { - border: 1px solid #888; - padding: 0.25em 0.7em; -} - -table.field-list, table.footnote { - border: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -table.footnote { - margin: 15px 0; - width: 100%; - border: 1px solid #eee; -} - -table.field-list th { - padding: 0 0.8em 0 0; -} - -table.field-list td { - padding: 0; -} - -table.footnote td { - padding: 0.5em; -} - -dl { - margin: 0; - padding: 0; -} - -dl dd { - margin-left: 30px; -} - -pre { - padding: 0; - margin: 15px -30px; - padding: 8px; - line-height: 1.3em; - padding: 7px 30px; - background: #eee; - border-radius: 2px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; -} - -dl pre { - margin-left: -60px; - padding-left: 60px; -} - -tt { - background-color: #ecf0f3; - color: #222; - /* padding: 1px 2px; */ -} - -tt.xref, a tt { - background-color: #FBFBFB; -} - -a:hover tt { - background: #EEE; -} diff --git a/docs/_themes/kr_small/theme.conf b/docs/_themes/kr_small/theme.conf deleted file mode 100644 index 542b4625..00000000 --- a/docs/_themes/kr_small/theme.conf +++ /dev/null @@ -1,10 +0,0 @@ -[theme] -inherit = basic -stylesheet = flasky.css -nosidebar = true -pygments_style = flask_theme_support.FlaskyStyle - -[options] -index_logo = '' -index_logo_height = 120px -github_fork = '' diff --git a/docs/conf.py b/docs/conf.py index 39d13795..96ab92b0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,19 +10,16 @@ # # All configuration values have a default; values that are commented out # serve to show the default. - -import sys, os from pkg_resources import get_distribution # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath('..')) -import tablib +# sys.path.insert(0, os.path.abspath('..')) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. @@ -42,7 +39,7 @@ # General information about the project. project = u'Tablib' -copyright = u'2016. A Kenneth Reitz Project' +copyright = u'2019 Jazzband' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -83,7 +80,7 @@ #show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'flask_theme_support.FlaskyStyle' +# pygments_style = '' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] @@ -93,7 +90,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'alabaster' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -122,7 +119,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['static'] +# html_static_path = ['static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. @@ -185,7 +182,7 @@ # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'Tablib.tex', u'Tablib Documentation', - u'Kenneth Reitz', 'manual'), + u'Jazzband', 'manual'), ] latex_use_modindex = False @@ -198,9 +195,6 @@ } latex_use_parts = True -latex_additional_files = ['krstyle.sty'] - - # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None @@ -231,9 +225,5 @@ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'tablib', u'Tablib Documentation', - [u'Kenneth Reitz'], 1) + [u'Jazzband'], 1) ] - -sys.path.append(os.path.abspath('_themes')) -html_theme_path = ['_themes'] -html_theme = 'kr' diff --git a/setup.py b/setup.py index 5a3ab4a9..0bd74792 100755 --- a/setup.py +++ b/setup.py @@ -29,6 +29,8 @@ long_description_content_type="text/markdown", author='Kenneth Reitz', author_email='me@kennethreitz.org', + maintainer='Jazzband', + maintainer_email='roadies@jazzband.co', url='https://tablib.readthedocs.io', packages=find_packages(where="src"), package_dir={"": "src"}, diff --git a/src/tablib/core.py b/src/tablib/core.py index 9d21d749..65dd901f 100644 --- a/src/tablib/core.py +++ b/src/tablib/core.py @@ -5,7 +5,7 @@ This module implements the central Tablib objects. - :copyright: (c) 2016 by Kenneth Reitz. + :copyright: (c) 2016 by Kenneth Reitz. 2019 Jazzband. :license: MIT, see LICENSE for more details. """ @@ -21,7 +21,7 @@ __title__ = 'tablib' __author__ = 'Kenneth Reitz' __license__ = 'MIT' -__copyright__ = 'Copyright 2017 Kenneth Reitz' +__copyright__ = 'Copyright 2017 Kenneth Reitz. 2019 Jazzband.' __docformat__ = 'restructuredtext' @@ -820,8 +820,8 @@ def add_formatter(self, col, handler): .. versionadded:: 0.9.5 :param col: column to. Accepts index int or header str. - :param handler: reference to callback function to execute - against each cell value. + :param handler: reference to callback function to execute against + each cell value. """ if isinstance(col, unicode):