🤝 synchronize with latest pyexcel-mobans and pypi-mobans
This commit is contained in:
parent
6af34ace26
commit
942c53ddc5
|
@ -25,6 +25,8 @@ parts/
|
|||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
@ -43,6 +45,7 @@ pip-delete-this-directory.txt
|
|||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
|
@ -77,9 +80,20 @@ target/
|
|||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don’t work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
|
@ -107,6 +121,11 @@ venv.bak/
|
|||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# VirtualEnv rules
|
||||
# Virtualenv
|
||||
|
@ -238,6 +257,10 @@ flycheck_*.el
|
|||
# directory configuration
|
||||
.dir-locals.el
|
||||
|
||||
# network security
|
||||
/network-security.data
|
||||
|
||||
|
||||
# Vim rules
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
|
@ -268,6 +291,9 @@ tags
|
|||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
|
@ -281,6 +307,14 @@ tags
|
|||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
|
@ -311,6 +345,9 @@ fabric.properties
|
|||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
# SublimeText rules
|
||||
# Cache files for Sublime Text
|
||||
*.tmlanguage.cache
|
||||
|
@ -390,7 +427,6 @@ DerivedData/
|
|||
!default.perspectivev3
|
||||
|
||||
# Eclipse rules
|
||||
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
|
|
26
.moban.yml
26
.moban.yml
|
@ -1,31 +1,29 @@
|
|||
requires:
|
||||
- type: git
|
||||
url: https://github.com/moremoban/pypi-mobans
|
||||
submodule: true
|
||||
- https://github.com/pyexcel/pyexcel-mobans
|
||||
configuration:
|
||||
configuration_dir: "pyexcel-mobans:config"
|
||||
configuration_dir: "git://github.com/pyexcel/pyexcel-mobans!/config"
|
||||
template_dir:
|
||||
- "pyexcel-mobans:templates"
|
||||
- "pypi-mobans:templates"
|
||||
- "git://github.com/moremoban/pypi-mobans.git?branch=dev&submodule=true!/templates"
|
||||
- "git://github.com/pyexcel/pyexcel-mobans.git!/templates"
|
||||
- "git://github.com/pyexcel/pyexcel-mobans.git!/statics"
|
||||
- ".moban.d"
|
||||
configuration: pyexcel-xls.yml
|
||||
targets:
|
||||
- README.rst: README.rst
|
||||
- setup.py: setup.py
|
||||
- README.rst: custom_README.rst.jj2
|
||||
- setup.py: custom_setup.py.jj2
|
||||
- "docs/source/conf.py": "docs/source/conf.py.jj2"
|
||||
- .travis.yml: travis.yml
|
||||
- requirements.txt: requirements.txt
|
||||
- .travis.yml: xls_travis.yml.jj2
|
||||
- requirements.txt: requirements.txt.jj2
|
||||
- .gitignore: gitignore.jj2
|
||||
- MANIFEST.in: MANIFEST.in.jj2
|
||||
- "tests/requirements.txt": "tests/requirements.txt"
|
||||
- "tests/requirements.txt": "tests/custom_requirements.txt.jj2"
|
||||
- test.sh: test.script.jj2
|
||||
- test.bat: test.script.jj2
|
||||
- "tests/test_filter.py": "tests/test_filter.py.jj2"
|
||||
- "tests/test_formatters.py": "tests/test_formatters.py.jj2"
|
||||
- "tests/test_stringio.py": "tests/test_stringio.py.jj2"
|
||||
- "tests/test_writer.py": "tests/test_writer.py.jj2"
|
||||
- "tests/base.py": "tests/base.py"
|
||||
- "tests/base.py": "tests/custom_base.py.jj2"
|
||||
- output: CHANGELOG.rst
|
||||
configuration: changelog.yml
|
||||
template: CHANGELOG.rst.jj2
|
||||
- ".github/FUNDING.yml": "FUNDING.yml"
|
||||
- ".github/PULL_REQUEST_TEMPLATE.md": PULL_REQUEST_TEMPLATE.md
|
||||
|
|
56
.travis.yml
56
.travis.yml
|
@ -1,13 +1,15 @@
|
|||
sudo: false
|
||||
dist: xenial
|
||||
language: python
|
||||
notifications:
|
||||
email: false
|
||||
python:
|
||||
- pypy-5.3.1
|
||||
- 3.7-dev
|
||||
- &pypy2 pypy2.7-6.0
|
||||
- &pypy3 pypy3.5-6.0
|
||||
- 3.8-dev
|
||||
- 3.7
|
||||
- 3.6
|
||||
- 3.5
|
||||
- 3.4
|
||||
- 2.7
|
||||
matrix:
|
||||
include:
|
||||
|
@ -24,13 +26,57 @@ matrix:
|
|||
- python-coverage
|
||||
- python-nose
|
||||
- python-mock
|
||||
|
||||
stages:
|
||||
- lint
|
||||
- moban
|
||||
- test
|
||||
|
||||
.disable_global: &disable_global
|
||||
addons: false
|
||||
cache: false
|
||||
env: {}
|
||||
python: false
|
||||
before_install: false
|
||||
install: false
|
||||
before_script: false
|
||||
script: false
|
||||
after_success: false
|
||||
after_failure: false
|
||||
before_deploy: false
|
||||
deploy: false
|
||||
|
||||
.lint: &lint
|
||||
<<: *disable_global
|
||||
git:
|
||||
submodules: false
|
||||
python: 3.6
|
||||
stage: lint
|
||||
script: make lint
|
||||
|
||||
.moban: &moban
|
||||
<<: *disable_global
|
||||
python: 3.6
|
||||
stage: moban
|
||||
install: pip install moban>=0.0.4
|
||||
script:
|
||||
- moban
|
||||
- git diff --exit-code
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- *moban
|
||||
- *lint
|
||||
|
||||
stage: test
|
||||
|
||||
before_install:
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install ordereddict; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install flake8==2.6.2; fi
|
||||
- if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then
|
||||
mv min_requirements.txt requirements.txt ;
|
||||
fi
|
||||
- test ! -f rnd_requirements.txt || pip install --no-deps -r rnd_requirements.txt
|
||||
- test ! -f rnd_requirements.txt ||
|
||||
pip install --no-deps -r rnd_requirements.txt
|
||||
- test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt ;
|
||||
- pip install -r tests/requirements.txt
|
||||
script:
|
||||
|
|
|
@ -4,8 +4,7 @@ Change log
|
|||
0.5.8 - 22.08.2018
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Added**
|
||||
|
||||
#. `pyexcel#151 <https://github.com/pyexcel/pyexcel/issues/151>`_, read cell
|
||||
error as #N/A.
|
||||
|
@ -13,8 +12,7 @@ Added
|
|||
0.5.7 - 15.03.2018
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Added**
|
||||
|
||||
#. `pyexcel#54 <https://github.com/pyexcel/pyexcel/issues/54>`_, Book.datemode
|
||||
attribute of that workbook should be passed always.
|
||||
|
@ -22,8 +20,7 @@ Added
|
|||
0.5.6 - 15.03.2018
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Added**
|
||||
|
||||
#. `pyexcel#120 <https://github.com/pyexcel/pyexcel/issues/120>`_, xlwt cannot
|
||||
save a book without any sheet. So, let's raise an exception in this case in
|
||||
|
@ -32,8 +29,7 @@ Added
|
|||
0.5.5 - 8.11.2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Added**
|
||||
|
||||
#. `#25 <https://github.com/pyexcel/pyexcel-xls/issues/25>`_, detect merged cell
|
||||
in .xls
|
||||
|
@ -41,8 +37,7 @@ Added
|
|||
0.5.4 - 2.11.2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Added**
|
||||
|
||||
#. `#24 <https://github.com/pyexcel/pyexcel-xls/issues/24>`_, xlsx format cannot
|
||||
use skip_hidden_row_and_column. please use pyexcel-xlsx instead.
|
||||
|
@ -50,8 +45,7 @@ Added
|
|||
0.5.3 - 2.11.2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Added**
|
||||
|
||||
#. `#21 <https://github.com/pyexcel/pyexcel-xls/issues/21>`_, skip hidden rows
|
||||
and columns under 'skip_hidden_row_and_column' flag.
|
||||
|
@ -59,8 +53,7 @@ Added
|
|||
0.5.2 - 23.10.2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
updated
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**updated**
|
||||
|
||||
#. pyexcel `pyexcel#105 <https://github.com/pyexcel/pyexcel/issues/105>`_,
|
||||
remove gease from setup_requires, introduced by 0.5.1.
|
||||
|
@ -70,8 +63,7 @@ updated
|
|||
0.5.1 - 20.10.2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**added**
|
||||
|
||||
#. `pyexcel#103 <https://github.com/pyexcel/pyexcel/issues/103>`_, include
|
||||
LICENSE file in MANIFEST.in, meaning LICENSE file will appear in the released
|
||||
|
@ -80,8 +72,7 @@ added
|
|||
0.5.0 - 30.08.2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Updated
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Updated**
|
||||
|
||||
#. `#20 <https://github.com/pyexcel/pyexcel-xls/issues/20>`_, is handled in
|
||||
pyexcel-io
|
||||
|
@ -91,8 +82,7 @@ Updated
|
|||
0.4.1 - 25.08.2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Updated
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Updated**
|
||||
|
||||
#. `#20 <https://github.com/pyexcel/pyexcel-xls/issues/20>`_, handle unseekable
|
||||
stream given by http response.
|
||||
|
@ -100,8 +90,7 @@ Updated
|
|||
0.4.0 - 19.06.2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Updated
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Updated**
|
||||
|
||||
#. `pyexcel-xlsx#15 <https://github.com/pyexcel/pyexcel-xlsx/issues/15>`_, close
|
||||
file handle
|
||||
|
@ -111,8 +100,7 @@ Updated
|
|||
0.3.3 - 30/05/2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Updated
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Updated**
|
||||
|
||||
#. `#18 <https://github.com/pyexcel/pyexcel-xls/issues/18>`_, pass on
|
||||
encoding_override and others to xlrd.
|
||||
|
@ -120,8 +108,7 @@ Updated
|
|||
0.3.2 - 18.05.2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Updated
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Updated**
|
||||
|
||||
#. `#16 <https://github.com/pyexcel/pyexcel-xls/issues/16>`_, allow mmap to be
|
||||
passed as file content
|
||||
|
@ -129,8 +116,7 @@ Updated
|
|||
0.3.1 - 16.01.2017
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Updated
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Updated**
|
||||
|
||||
#. `#14 <https://github.com/pyexcel/pyexcel-xls/issues/14>`_, Python 3.6 -
|
||||
cannot use LOCALE flag with a str pattern
|
||||
|
@ -139,8 +125,7 @@ Updated
|
|||
0.3.0 - 22.12.2016
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Updated
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Updated**
|
||||
|
||||
#. `#13 <https://github.com/pyexcel/pyexcel-xls/issues/13>`_, alert on empyty
|
||||
file content
|
||||
|
@ -149,8 +134,7 @@ Updated
|
|||
0.2.3 - 20.09.2016
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Updated
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Updated**
|
||||
|
||||
#. `#10 <https://github.com/pyexcel/pyexcel-xls/issues/10>`_, To support
|
||||
generator as member of the incoming two dimensional data
|
||||
|
@ -158,8 +142,7 @@ Updated
|
|||
0.2.2 - 31.08.2016
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Added**
|
||||
|
||||
#. support pagination. two pairs: start_row, row_limit and start_column,
|
||||
column_limit help you deal with large files.
|
||||
|
@ -167,8 +150,7 @@ Added
|
|||
0.2.1 - 13.07.2016
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Added**
|
||||
|
||||
#. `#9 <https://github.com/pyexcel/pyexcel-xls/issues/9>`_, `skip_hidden_sheets`
|
||||
is added. By default, hidden sheets are skipped when reading all sheets.
|
||||
|
@ -177,8 +159,7 @@ Added
|
|||
0.2.0 - 01.06.2016
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Added**
|
||||
|
||||
#. By default, `float` will be converted to `int` where fits. `auto_detect_int`,
|
||||
a flag to switch off the autoatic conversion from `float` to `int`.
|
||||
|
@ -186,8 +167,7 @@ Added
|
|||
other libraries, in the situation where there are more than one plugin for a
|
||||
file type, e.g. xlsm
|
||||
|
||||
Updated
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Updated**
|
||||
|
||||
#. support the auto-import feature of pyexcel-io 0.2.0
|
||||
#. xlwt is now used for python 2 implementation while xlwt-future is used for
|
||||
|
@ -196,8 +176,7 @@ Updated
|
|||
0.1.0 - 17.01.2016
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Added
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
**Added**
|
||||
|
||||
#. Passing "streaming=True" to get_data, you will get the two dimensional array
|
||||
as a generator
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
include README.rst
|
||||
include LICENSE
|
||||
include CHANGELOG.rst
|
||||
recursive-include tests *
|
||||
recursive-include docs *
|
||||
|
|
29
README.rst
29
README.rst
|
@ -2,20 +2,12 @@
|
|||
pyexcel-xls - Let you focus on data, instead of xls format
|
||||
================================================================================
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png
|
||||
:target: https://www.patreon.com/pyexcel
|
||||
|
||||
.. image:: https://api.bountysource.com/badge/team?team_id=288537
|
||||
:target: https://salt.bountysource.com/teams/chfw-pyexcel
|
||||
|
||||
.. image:: https://travis-ci.org/pyexcel/pyexcel-xls.svg?branch=master
|
||||
.. image:: https://api.travis-ci.org/pyexcel/pyexcel-xls.svg
|
||||
:target: http://travis-ci.org/pyexcel/pyexcel-xls
|
||||
|
||||
.. image:: https://codecov.io/gh/pyexcel/pyexcel-xls/branch/master/graph/badge.svg
|
||||
:target: https://codecov.io/gh/pyexcel/pyexcel-xls
|
||||
.. image:: https://codecov.io/github/pyexcel/pyexcel-xls/coverage.png
|
||||
:target: https://codecov.io/github/pyexcel/pyexcel-xls
|
||||
|
||||
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
|
||||
:target: https://gitter.im/pyexcel/Lobby
|
||||
|
||||
|
||||
**pyexcel-xls** is a tiny wrapper library to read, manipulate and write data in xls format and it can read xlsx and xlsm fromat. You are likely to use it with `pyexcel <https://github.com/pyexcel/pyexcel>`_.
|
||||
|
@ -53,7 +45,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 <https://github.com/sponsors/chfw>`_, `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.
|
||||
|
||||
|
@ -348,8 +340,6 @@ How to update test environment and update documentation
|
|||
Additional steps are required:
|
||||
|
||||
#. pip install moban
|
||||
#. git clone https://github.com/moremoban/setupmobans.git # generic setup
|
||||
#. git clone https://github.com/pyexcel/pyexcel-commons.git commons
|
||||
#. make your changes in `.moban.d` directory, then issue command `moban`
|
||||
|
||||
What is pyexcel-commons
|
||||
|
@ -362,17 +352,6 @@ What is .moban.d
|
|||
|
||||
`.moban.d` stores the specific meta data for the library.
|
||||
|
||||
Acceptance criteria
|
||||
-------------------
|
||||
|
||||
#. Has Test cases written
|
||||
#. Has all code lines tested
|
||||
#. Passes all Travis CI builds
|
||||
#. Has fair amount of documentation if your change is complex
|
||||
#. Please update CHANGELOG.rst
|
||||
#. Please add yourself to CONTRIBUTORS.rst
|
||||
#. Agree on NEW BSD License for your contribution
|
||||
|
||||
Known Issues
|
||||
=============
|
||||
|
||||
|
|
|
@ -4,13 +4,11 @@ DESCRIPTION = (
|
|||
' reads xlsx and xlsm format' +
|
||||
''
|
||||
)
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# This file does only contain a selection of the most common options. For a
|
||||
# full list see the documentation:
|
||||
# http://www.sphinx-doc.org/en/master/config
|
||||
# This file only contains a selection of the most common options. For a full
|
||||
# list see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
|
@ -24,22 +22,16 @@ DESCRIPTION = (
|
|||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = u'pyexcel-xls'
|
||||
copyright = u'2015-2018 Onni Software Ltd.'
|
||||
author = u'C.W.'
|
||||
|
||||
project = 'pyexcel-xls'
|
||||
copyright = ' Onni Software Ltd.'
|
||||
author = 'C.W.'
|
||||
# The short X.Y version
|
||||
version = u'0.5.8'
|
||||
version = '0.6.0'
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = u'0.6.0'
|
||||
|
||||
release = '0.5.8'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#
|
||||
# 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.
|
||||
|
@ -48,15 +40,6 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.
|
|||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
#
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#
|
||||
|
@ -69,9 +52,6 @@ language = 'en'
|
|||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = []
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = None
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
|
@ -80,107 +60,16 @@ pygments_style = None
|
|||
#
|
||||
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
|
||||
# documentation.
|
||||
#
|
||||
# html_theme_options = {}
|
||||
|
||||
# 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']
|
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names
|
||||
# to template names.
|
||||
#
|
||||
# The default sidebars (for documents that don't match any pattern) are
|
||||
# defined by theme itself. Builtin themes are using these templates by
|
||||
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
|
||||
# 'searchbox.html']``.
|
||||
#
|
||||
# html_sidebars = {}
|
||||
|
||||
|
||||
# -- Options for HTMLHelp output ---------------------------------------------
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'pyexcel-xlsdoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output ------------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#
|
||||
# 'preamble': '',
|
||||
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, 'pyexcel-xls.tex', u'pyexcel-xls Documentation',
|
||||
u'Onni Software Ltd.', 'manual'),
|
||||
]
|
||||
|
||||
|
||||
# -- Options for manual page output ------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
(master_doc, 'pyexcel-xls', u'pyexcel-xls Documentation',
|
||||
[author], 1)
|
||||
]
|
||||
|
||||
|
||||
# -- Options for Texinfo output ----------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'pyexcel-xls', u'pyexcel-xls Documentation',
|
||||
author, 'pyexcel-xls', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
|
||||
# -- Options for Epub output -------------------------------------------------
|
||||
|
||||
# Bibliographic Dublin Core info.
|
||||
epub_title = project
|
||||
|
||||
# The unique identifier of the text. This can be a ISBN number
|
||||
# or the project homepage.
|
||||
#
|
||||
# epub_identifier = ''
|
||||
|
||||
# A unique identification for the text.
|
||||
#
|
||||
# epub_uid = ''
|
||||
|
||||
# A list of files that should not be packed into the epub file.
|
||||
epub_exclude_files = ['search.html']
|
||||
|
||||
# -- Extension configuration -------------------------------------------------
|
||||
# -- Options for intersphinx extension ---------------------------------------
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
intersphinx_mapping = {'https://docs.python.org/': None}
|
||||
intersphinx_mapping = {'https://docs.python.org/3/': None}
|
||||
# TODO: html_theme not configurable upstream
|
||||
html_theme = 'default'
|
||||
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
:copyright: (c) 2016-2017 by Onni Software Ltd
|
||||
:license: New BSD License
|
||||
"""
|
||||
|
||||
# flake8: noqa
|
||||
from pyexcel_io.io import get_data as read_data
|
||||
from pyexcel_io.io import isstream
|
||||
from pyexcel_io.io import save_data as write_data
|
||||
|
||||
# this line has to be place above all else
|
||||
# because of dynamic import
|
||||
from pyexcel_io.plugins import IOPluginInfoChain
|
||||
from pyexcel_io.io import (
|
||||
get_data as read_data,
|
||||
isstream,
|
||||
save_data as write_data,
|
||||
)
|
||||
|
||||
__FILE_TYPE__ = "xls"
|
||||
IOPluginInfoChain(__name__).add_a_reader(
|
||||
|
|
111
setup.py
111
setup.py
|
@ -1,66 +1,86 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# Template by pypi-mobans
|
||||
import os
|
||||
import sys
|
||||
# Template by pypi-mobans
|
||||
import codecs
|
||||
import locale
|
||||
import platform
|
||||
from shutil import rmtree
|
||||
|
||||
from setuptools import Command, setup, find_packages
|
||||
|
||||
PY2 = sys.version_info[0] == 2
|
||||
PY26 = PY2 and sys.version_info[1] < 7
|
||||
PY33 = sys.version_info < (3, 4)
|
||||
|
||||
NAME = 'pyexcel-xls'
|
||||
AUTHOR = 'C.W.'
|
||||
VERSION = '0.6.0'
|
||||
EMAIL = 'wangc_2011@hotmail.com'
|
||||
LICENSE = 'New BSD'
|
||||
# Work around mbcs bug in distutils.
|
||||
# http://bugs.python.org/issue10945
|
||||
# This work around is only if a project supports Python < 3.4
|
||||
|
||||
# Work around for locale not being set
|
||||
try:
|
||||
lc = locale.getlocale()
|
||||
pf = platform.system()
|
||||
if pf != "Windows" and lc == (None, None):
|
||||
locale.setlocale(locale.LC_ALL, "C.UTF-8")
|
||||
except (ValueError, UnicodeError, locale.Error):
|
||||
locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
|
||||
|
||||
NAME = "pyexcel-xls"
|
||||
AUTHOR = "C.W."
|
||||
VERSION = "0.6.0"
|
||||
EMAIL = "info@pyexcel.org"
|
||||
LICENSE = "New BSD"
|
||||
DESCRIPTION = (
|
||||
'A wrapper library to read, manipulate and write data in xls format. It' +
|
||||
'reads xlsx and xlsm format'
|
||||
"A wrapper library to read, manipulate and write data in xls format. It" +
|
||||
"reads xlsx and xlsm format"
|
||||
)
|
||||
URL = 'https://github.com/pyexcel/pyexcel-xls'
|
||||
DOWNLOAD_URL = '%s/archive/0.5.8.tar.gz' % URL
|
||||
FILES = ['README.rst', 'CHANGELOG.rst']
|
||||
URL = "https://github.com/pyexcel/pyexcel-xls"
|
||||
DOWNLOAD_URL = "%s/archive/0.5.8.tar.gz" % URL
|
||||
FILES = ["README.rst", "CHANGELOG.rst"]
|
||||
KEYWORDS = [
|
||||
'python',
|
||||
"python",
|
||||
'xls',
|
||||
'xlsx',
|
||||
'xlsm'
|
||||
]
|
||||
|
||||
CLASSIFIERS = [
|
||||
'Topic :: Software Development :: Libraries',
|
||||
'Programming Language :: Python',
|
||||
'Intended Audience :: Developers',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
"Topic :: Software Development :: Libraries",
|
||||
"Programming Language :: Python",
|
||||
"Intended Audience :: Developers",
|
||||
"Programming Language :: Python :: 2.6",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3.3",
|
||||
"Programming Language :: Python :: 3.4",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
|
||||
"Programming Language :: Python :: 3.7",
|
||||
|
||||
"Programming Language :: Python :: 3.8",
|
||||
|
||||
'Programming Language :: Python :: Implementation :: PyPy'
|
||||
]
|
||||
|
||||
INSTALL_REQUIRES = [
|
||||
'pyexcel-io>=0.5.3',
|
||||
'xlrd',
|
||||
'xlwt',
|
||||
"pyexcel-io>=0.5.3",
|
||||
"xlrd",
|
||||
"xlwt",
|
||||
]
|
||||
SETUP_COMMANDS = {}
|
||||
|
||||
|
||||
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
|
||||
PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests"])
|
||||
EXTRAS_REQUIRE = {
|
||||
}
|
||||
# You do not need to read beyond this line
|
||||
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
|
||||
sys.executable)
|
||||
GS_COMMAND = ('gs pyexcel-xls v0.5.8 ' +
|
||||
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
|
||||
GS_COMMAND = ("gs pyexcel-xls v0.5.8 " +
|
||||
"Find 0.5.8 in changelog for more details")
|
||||
NO_GS_MESSAGE = ('Automatic github release is disabled. ' +
|
||||
'Please install gease to enable it.')
|
||||
NO_GS_MESSAGE = ("Automatic github release is disabled. " +
|
||||
"Please install gease to enable it.")
|
||||
UPLOAD_FAILED_MSG = (
|
||||
'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND)
|
||||
HERE = os.path.abspath(os.path.dirname(__file__))
|
||||
|
@ -69,13 +89,13 @@ HERE = os.path.abspath(os.path.dirname(__file__))
|
|||
class PublishCommand(Command):
|
||||
"""Support setup.py upload."""
|
||||
|
||||
description = 'Build and publish the package on github and pypi'
|
||||
description = "Build and publish the package on github and pypi"
|
||||
user_options = []
|
||||
|
||||
@staticmethod
|
||||
def status(s):
|
||||
"""Prints things in bold."""
|
||||
print('\033[1m{0}\033[0m'.format(s))
|
||||
print("\033[1m{0}\033[0m".format(s))
|
||||
|
||||
def initialize_options(self):
|
||||
pass
|
||||
|
@ -85,14 +105,14 @@ class PublishCommand(Command):
|
|||
|
||||
def run(self):
|
||||
try:
|
||||
self.status('Removing previous builds...')
|
||||
rmtree(os.path.join(HERE, 'dist'))
|
||||
rmtree(os.path.join(HERE, 'build'))
|
||||
rmtree(os.path.join(HERE, 'pyexcel_xls.egg-info'))
|
||||
self.status("Removing previous builds...")
|
||||
rmtree(os.path.join(HERE, "dist"))
|
||||
rmtree(os.path.join(HERE, "build"))
|
||||
rmtree(os.path.join(HERE, "pyexcel_xls.egg-info"))
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
self.status('Building Source and Wheel (universal) distribution...')
|
||||
self.status("Building Source and Wheel (universal) distribution...")
|
||||
run_status = True
|
||||
if has_gease():
|
||||
run_status = os.system(GS_COMMAND) == 0
|
||||
|
@ -100,13 +120,13 @@ class PublishCommand(Command):
|
|||
self.status(NO_GS_MESSAGE)
|
||||
if run_status:
|
||||
if os.system(PUBLISH_COMMAND) != 0:
|
||||
self.status(UPLOAD_FAILED_MSG % PUBLISH_COMMAND)
|
||||
self.status(UPLOAD_FAILED_MSG)
|
||||
|
||||
sys.exit()
|
||||
|
||||
|
||||
SETUP_COMMANDS.update({
|
||||
'publish': PublishCommand
|
||||
"publish": PublishCommand
|
||||
})
|
||||
|
||||
|
||||
|
@ -135,7 +155,7 @@ def read_files(*files):
|
|||
def read(afile):
|
||||
"""Read a file into setup"""
|
||||
the_relative_file = os.path.join(HERE, afile)
|
||||
with codecs.open(the_relative_file, 'r', 'utf-8') as opened_file:
|
||||
with codecs.open(the_relative_file, "r", "utf-8") as opened_file:
|
||||
content = filter_out_test_code(opened_file)
|
||||
content = "".join(list(content))
|
||||
return content
|
||||
|
@ -144,11 +164,11 @@ def read(afile):
|
|||
def filter_out_test_code(file_handle):
|
||||
found_test_code = False
|
||||
for line in file_handle.readlines():
|
||||
if line.startswith('.. testcode:'):
|
||||
if line.startswith(".. testcode:"):
|
||||
found_test_code = True
|
||||
continue
|
||||
if found_test_code is True:
|
||||
if line.startswith(' '):
|
||||
if line.startswith(" "):
|
||||
continue
|
||||
else:
|
||||
empty_line = line.strip()
|
||||
|
@ -158,15 +178,16 @@ def filter_out_test_code(file_handle):
|
|||
found_test_code = False
|
||||
yield line
|
||||
else:
|
||||
for keyword in ['|version|', '|today|']:
|
||||
for keyword in ["|version|", "|today|"]:
|
||||
if keyword in line:
|
||||
break
|
||||
else:
|
||||
yield line
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
setup(
|
||||
test_suite="tests",
|
||||
name=NAME,
|
||||
author=AUTHOR,
|
||||
version=VERSION,
|
||||
|
@ -178,7 +199,7 @@ if __name__ == '__main__':
|
|||
license=LICENSE,
|
||||
keywords=KEYWORDS,
|
||||
extras_require=EXTRAS_REQUIRE,
|
||||
tests_require=['nose'],
|
||||
tests_require=["nose"],
|
||||
install_requires=INSTALL_REQUIRES,
|
||||
packages=PACKAGES,
|
||||
include_package_data=True,
|
||||
|
|
2
test.bat
2
test.bat
|
@ -1,2 +1,2 @@
|
|||
pip freeze
|
||||
nosetests --with-coverage --cover-package pyexcel_xls --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_xls && flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long
|
||||
nosetests --with-coverage --cover-package pyexcel_xls --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_xls
|
||||
|
|
2
test.sh
2
test.sh
|
@ -1,2 +1,2 @@
|
|||
pip freeze
|
||||
nosetests --with-coverage --cover-package pyexcel_xls --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_xls && flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long
|
||||
nosetests --with-coverage --cover-package pyexcel_xls --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_xls
|
||||
|
|
|
@ -9,13 +9,13 @@ import datetime
|
|||
|
||||
import pyexcel as pe
|
||||
from _compact import OrderedDict
|
||||
from pyexcel_xls import save_data
|
||||
from pyexcel_xls.xlsr import xldate_to_python_date
|
||||
from pyexcel_xls.xlsw import XLSWriter as Writer
|
||||
|
||||
from mock import patch
|
||||
from nose import SkipTest
|
||||
from nose.tools import eq_, raises
|
||||
from pyexcel_xls import save_data
|
||||
from pyexcel_xls.xlsr import xldate_to_python_date
|
||||
from pyexcel_xls.xlsw import XLSWriter as Writer
|
||||
|
||||
IN_TRAVIS = "TRAVIS" in os.environ
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import os
|
||||
|
||||
from nose.tools import eq_
|
||||
from pyexcel_xls import get_data
|
||||
|
||||
from nose.tools import eq_
|
||||
|
||||
|
||||
def test_simple_hidden_sheets():
|
||||
data = get_data(
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import os
|
||||
|
||||
from nose.tools import eq_
|
||||
from pyexcel_xls import get_data
|
||||
from pyexcel_xls.xlsr import MergedCell
|
||||
|
||||
from nose.tools import eq_
|
||||
|
||||
|
||||
def test_merged_cells():
|
||||
data = get_data(
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import os
|
||||
|
||||
from base import PyexcelWriterBase, PyexcelHatWriterBase
|
||||
|
||||
from pyexcel_xls.xlsr import XLSBook as Reader
|
||||
from pyexcel_xls.xlsw import XLSWriter as Writer
|
||||
|
||||
|
|
Loading…
Reference in New Issue