Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 0.5.12 #62

Merged
merged 9 commits into from
Feb 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .moban.d/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ def setup(app):


{%endblock%}

1 change: 0 additions & 1 deletion .moban.d/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
{%block pyexcel_extra_classifiers%}
'Programming Language :: Python :: Implementation :: PyPy'
{%endblock%}}

3 changes: 3 additions & 0 deletions .moban.d/tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
SQLAlchemy
pyexcel>=0.2.0
pyexcel-xls>=0.1.0
moban
black;python_version>="3.6"
isort;python_version>="3.6"
{%endblock%}
14 changes: 9 additions & 5 deletions .moban.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
requires:
- type: git
url: https://github.com/moremoban/pypi-mobans
submodule: true
- https://github.com/pyexcel/pyexcel-mobans
configuration:
configuration_dir: "commons/config"
configuration_dir: "pyexcel-mobans:config"
template_dir:
- "commons/templates"
- "setupmobans/templates"
- "pyexcel-mobans:templates"
- "pypi-mobans:templates"
- ".moban.d"
configuration: pyexcel-io.yml
targets:
- "docs/source/conf.py": "docs/source/conf.py"
- "docs/source/conf.py": "docs/conf.py_t"
- setup.py: setup.py
- .travis.yml: travis.yml.jj2
- requirements.txt: requirements.txt.jj2
- "tests/requirements.txt": "tests/requirements.txt"
- LICENSE: NEW_BSD_LICENSE.jj2
- MANIFEST.in: MANIFEST.in.jj2
- test.sh: test.script.jj2
- test.bat: test.script.jj2
- README.rst: README.rst
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
Change log
================================================================================

0.5.10 - 3.12.2018
0.5.12 - 9.02.2019
--------------------------------------------------------------------------------

updated
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#. `#60 <https://github.com/pyexcel/pyexcel-io/issues/60>`_: include tests in
tar ball
#. `#61 <https://github.com/pyexcel/pyexcel-io/issues/61>`_: enable python
setup.py test

0.5.11 - 3.12.2018
--------------------------------------------------------------------------------

updated
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2018 by Onni Software Ltd. and its contributors
Copyright (c) by Onni Software Ltd. and its contributors
All rights reserved.

Redistribution and use in source and binary forms of the software as well
Expand Down
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
include README.rst
include LICENSE
include CHANGELOG.rst
recursive-include tests *
include docs/source/*
include Makefile
include test.sh
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ test:
document:
sphinx-autogen -o docs/source/generated/ docs/source/*.rst
sphinx-build -b html docs/source/ docs/build/

format:
isort -y $(find pyexcel_io -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
black -l 79 pyexcel_io
black -l 79 tests
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ Acceptance criteria
#. Has all code lines tested
#. Passes all Travis CI builds
#. Has fair amount of documentation if your change is complex
#. run 'make format' so as to confirm the pyexcel organisation's coding style
#. Please update CHANGELOG.rst
#. Please add yourself to CONTRIBUTORS.rst
#. Agree on NEW BSD License for your contribution
Expand Down
9 changes: 8 additions & 1 deletion changelog.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: pyexcel-io
organisation: pyexcel
releases:
- changes:
- action: updated
details:
- '`#60`: include tests in tar ball'
- '`#61`: enable python setup.py test'
version: 0.5.12
date: 9.02.2019
- changes:
- action: updated
details:
- '`#59`: Please use scan_plugins_regex, which lml 0.7 complains about'
version: 0.5.10
version: 0.5.11
date: 3.12.2018
- changes:
- action: added
Expand Down
112 changes: 10 additions & 102 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# -*- coding: utf-8 -*-
DESCRIPTION = (
'A python library to read and write structured data in csv, zipped csv ' +
'format and to/from databases' +
''
)
# -*- 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:
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------
Expand All @@ -24,35 +16,31 @@

# -- Project information -----------------------------------------------------

project = u'pyexcel-io'
copyright = u'2015-2018 Onni Software Ltd.'
author = u'C.W.'
project = 'pyexcel-io'
copyright = 'copyright 2015-2019 Onni Software Ltd.'
author = 'C.W.'

# The short X.Y version
version = u'0.5.11'
version = '0.5.12'
# The full version, including alpha/beta/rc tags
release = u'0.5.11'
release = '0.5.12'


# -- 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.
extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode',]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
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'
source_suffix = ''

# The master toctree document.
master_doc = 'index'
Expand All @@ -69,9 +57,6 @@
# 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 -------------------------------------------------

Expand All @@ -89,7 +74,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']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand All @@ -102,63 +87,6 @@
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'pyexcel-iodoc'


# -- 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-io.tex', u'pyexcel-io 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-io', u'pyexcel-io 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-io', u'pyexcel-io Documentation',
author, 'pyexcel-io', 'One line description of project.',
'Miscellaneous'),
]


# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
Expand All @@ -181,23 +109,3 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
# TODO: html_theme not configurable upstream
html_theme = 'default'


def setup(app):
app.add_stylesheet('theme_overrides.css')



# TODO: DESCRIPTION not configurable upstream
texinfo_documents = [
('index', 'pyexcel-io',
'pyexcel-io Documentation',
'Onni Software Ltd.', 'pyexcel-io',
DESCRIPTION,
'Miscellaneous'),
]
intersphinx_mapping.update({
'pyexcel': ('http://pyexcel.readthedocs.io/en/latest/', None),
})
3 changes: 1 addition & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ get_data(.., library='pyexcel-ods')
============= ======= ======== ======= ======== ======== ========
`pyexcel-io`_ `xls`_ `xlsx`_ `ods`_ `ods3`_ `odsr`_ `xlsxw`_
============= ======= ======== ======= ======== ======== ========
0.5.10+ 0.5.0+ 0.5.0+ 0.5.4 0.5.3 0.5.0+ 0.5.0+
0.5.1+ 0.5.0+ 0.5.0+ 0.5.0+ 0.5.0+ 0.5.0+ 0.5.0+
0.5.1 0.5.0 0.5.0 0.5.0 0.5.0 0.5.0 0.5.0
0.4.x 0.4.x 0.4.x 0.4.x 0.4.x 0.4.x 0.4.x
0.3.0+ 0.3.0+ 0.3.0 0.3.0+ 0.3.0+ 0.3.0 0.3.0
0.2.2+ 0.2.2+ 0.2.2+ 0.2.1+ 0.2.1+ 0.0.1
Expand Down
9 changes: 5 additions & 4 deletions pyexcel-io.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
overrides: "pyexcel.yaml"
name: "pyexcel-io"
project: "pyexcel-io"
name: pyexcel-io
nick_name: io
version: 0.5.11
current_version: 0.5.11
release: 0.5.11
version: 0.5.12
current_version: 0.5.12
release: 0.5.12
dependencies:
- ordereddict;python_version<"2.7"
- lml>=0.0.4
Expand Down
2 changes: 1 addition & 1 deletion pyexcel_io/book.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:license: New BSD License, see LICENSE for more details
"""
import pyexcel_io.manager as manager
from pyexcel_io._compact import OrderedDict, isstream, PY2
from pyexcel_io._compact import PY2, OrderedDict, isstream
from .constants import MESSAGE_ERROR_03, MESSAGE_WRONG_IO_INSTANCE


Expand Down
2 changes: 1 addition & 1 deletion pyexcel_io/database/importers/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"""
import logging

import pyexcel_io.constants as constants
from pyexcel_io.book import BookWriter
from pyexcel_io.sheet import SheetWriter
from pyexcel_io.utils import is_empty_array, swap_empty_string_for_none
import pyexcel_io.constants as constants

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion pyexcel_io/database/importers/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
:copyright: (c) 2014-2017 by Onni Software Ltd.
:license: New BSD License, see LICENSE for more details
"""
import pyexcel_io.constants as constants
from pyexcel_io.book import BookWriter
from pyexcel_io.sheet import SheetWriter
from pyexcel_io.utils import is_empty_array, swap_empty_string_for_none
import pyexcel_io.constants as constants


class PyexcelSQLSkipRowException(Exception):
Expand Down
26 changes: 5 additions & 21 deletions pyexcel_io/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
:copyright: (c) 2014-2017 by Onni Software Ltd.
:license: New BSD License, see LICENSE for more details
"""
from types import GeneratorType
import warnings
from types import GeneratorType

from pyexcel_io._compact import isstream, PY2
from pyexcel_io.plugins import READERS, WRITERS
import pyexcel_io.constants as constants
from pyexcel_io.plugins import READERS, WRITERS
from pyexcel_io._compact import PY2, isstream


def iget_data(afile, file_type=None, **keywords):
Expand Down Expand Up @@ -119,29 +119,13 @@ def save_data(afile, data, file_type=None, **keywords):
if no_file_type:
file_type = constants.FILE_FORMAT_CSV

store_data(
afile,
to_store,
file_type=file_type,
single_sheet_in_book=single_sheet_in_book,
**keywords
)


def store_data(afile, data, file_type=None, **keywords):
"""Non public function to store data to afile

:param filename: actual file name, a file stream or actual content
:param data: the data to be written
:param file_type: used only when filename is not a physial file name
:param keywords: any other parameters
"""
if isstream(afile):
keywords.update(dict(file_stream=afile, file_type=file_type))
else:
keywords.update(dict(file_name=afile, file_type=file_type))
keywords['single_sheet_in_book'] = single_sheet_in_book
with get_writer(**keywords) as writer:
writer.write(data)
writer.write(to_store)


def load_data(
Expand Down
Loading