diff --git a/.moban.d/travis.yml b/.moban.d/travis.yml index a40a09c..b3700f5 100644 --- a/.moban.d/travis.yml +++ b/.moban.d/travis.yml @@ -2,12 +2,12 @@ {%block custom_python_versions%} python: - - 3.7-dev + - &pypy2 pypy2.7-6.0 + - &pypy3 pypy3.5-6.0 + - 3.8-dev + - 3.7 - 3.6 - 3.5 - - 3.4 - - 3.3 - 2.7 - - 2.6 {%endblock%} diff --git a/.travis.yml b/.travis.yml index d0f4dc3..c2c6b83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,30 @@ sudo: false +dist: xenial language: python notifications: email: false python: - - 3.7-dev + - &pypy2 pypy2.7-6.0 + - &pypy3 pypy3.5-6.0 + - 3.8-dev + - 3.7 - 3.6 - 3.5 - - 3.4 - - 3.3 - 2.7 - - 2.6 + +stages: + - test + - lint +jobs: + include: + - stage: lint + python: 3.6 + script: make lint + +stage: test + +script: make test + before_install: - if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install flake8==2.6.2; fi - if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then diff --git a/LICENSE b/LICENSE index 6eef51e..d6d953b 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/MANIFEST.in b/MANIFEST.in index c2e4b1b..b1bf562 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,5 @@ include README.rst include LICENSE include CHANGELOG.rst +recursive-include tests * +recursive-include docs * diff --git a/README.rst b/README.rst index 099fb92..5c9bfc8 100644 --- a/README.rst +++ b/README.rst @@ -375,6 +375,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 diff --git a/docs/source/conf.py b/docs/source/conf.py index 93776c7..a1bd0dc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,12 +3,10 @@ DESCRIPTION = ( 'A wrapper library to read, manipulate and write data in ods 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: +# 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 -------------------------------------------------------------- @@ -23,44 +21,24 @@ DESCRIPTION = ( # -- Project information ----------------------------------------------------- -project = u'pyexcel-ods' -copyright = u'2015-2018 Onni Software Ltd.' -author = u'C.W.' - +project = 'pyexcel' +copyright = 'copyright 2015-2019 Onni Software Ltd.' +author = 'Onni Software Ltd.' # The short X.Y version -version = u'0.4.1' +version = '0.4.1' # The full version, including alpha/beta/rc tags -release = u'0.4.1' - +release = '0.4.1' # -- 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', -] +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'] -# 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. # @@ -73,9 +51,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 = 'sphinx' - # -- Options for HTML output ------------------------------------------------- @@ -84,84 +59,11 @@ pygments_style = 'sphinx' # 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-odsdoc' - - -# -- 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-ods.tex', u'pyexcel-ods 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-ods', u'pyexcel-ods 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-ods', u'pyexcel-ods Documentation', - author, 'pyexcel-ods', 'One line description of project.', - 'Miscellaneous'), -] - # -- Extension configuration ------------------------------------------------- # -- Options for intersphinx extension --------------------------------------- diff --git a/setup.py b/setup.py index 48b5f7f..10ecc81 100644 --- a/setup.py +++ b/setup.py @@ -4,8 +4,25 @@ import os import sys import codecs +import locale +import platform from shutil import rmtree -from setuptools import setup, find_packages, Command + +from setuptools import Command, setup, find_packages + + +# 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-ods' AUTHOR = 'C.W.' @@ -19,7 +36,7 @@ URL = 'https://github.com/pyexcel/pyexcel-ods' DOWNLOAD_URL = '%s/archive/0.4.1.tar.gz' % URL FILES = ['README.rst', 'CHANGELOG.rst'] KEYWORDS = [ - 'python' + 'python', ] CLASSIFIERS = [ @@ -157,6 +174,7 @@ def filter_out_test_code(file_handle): if __name__ == '__main__': setup( + test_suite="tests", name=NAME, author=AUTHOR, version=VERSION, diff --git a/test.bat b/test.bat index ae229d9..ecba1ba 100644 --- a/test.bat +++ b/test.bat @@ -1,2 +1,2 @@ pip freeze -nosetests --with-coverage --cover-package pyexcel_ods --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_ods && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long +nosetests --with-coverage --cover-package pyexcel_ods --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_ods diff --git a/test.sh b/test.sh index ae229d9..ecba1ba 100644 --- a/test.sh +++ b/test.sh @@ -1,2 +1,2 @@ pip freeze -nosetests --with-coverage --cover-package pyexcel_ods --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_ods && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long +nosetests --with-coverage --cover-package pyexcel_ods --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_ods