From a9a1154bcdbd67ebb9787775da1eb00e3084face Mon Sep 17 00:00:00 2001 From: chfw Date: Sun, 20 Aug 2017 01:12:28 +0100 Subject: [PATCH] :books: update documentations --- .gitignore | 103 +++++++++++++++++++++++++++++++++++++++++--- .moban.yml | 8 ++-- .travis.yml | 3 -- README.rst | 17 +++++--- docs/source/conf.py | 2 +- setup.cfg | 4 ++ setup.py | 18 +++++--- 7 files changed, 131 insertions(+), 24 deletions(-) create mode 100644 setup.cfg diff --git a/.gitignore b/.gitignore index d98e374..f32c742 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,99 @@ -*.pyc -*~ +# April 2016 +# reference: https://github.com/github/gitignore/blob/master/Python.gitignore +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ .coverage -pyexcel*-info -build -dist \ No newline at end of file +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# dotenv +.env + +# virtualenv +venv/ +ENV/ + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject + +# emacs +*~ + +# moban hashes +.moban.hashes +.DS_store + diff --git a/.moban.yml b/.moban.yml index 68457b2..eed4989 100644 --- a/.moban.yml +++ b/.moban.yml @@ -2,6 +2,7 @@ configuration: configuration_dir: "commons/config" template_dir: - "commons/templates" + - "setupmobans/templates" - ".moban.d" configuration: pyexcel_ods.yaml targets: @@ -9,12 +10,13 @@ targets: - setup.py: setup.py - "docs/source/conf.py": "docs/source/conf.py.jj2" - .travis.yml: travis.yml + - .gitignore: gitignore.jj2 - requirements.txt: requirements.txt - - LICENSE: LICENSE.jj2 + - LICENSE: NEW_BSD_LICENSE.jj2 - MANIFEST.in: MANIFEST.in.jj2 - "tests/requirements.txt": "tests/requirements.txt" - - test.sh: test.sh.jj2 - - test.bat: test.sh.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" - "tests/test_stringio.py": "tests/test_stringio.py.jj2" diff --git a/.travis.yml b/.travis.yml index 3f300e8..8f123a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,9 +10,6 @@ python: - 2.7 - 2.6 before_install: - - cd $HOME - - "if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then deactivate && wget https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.7.1-linux_x86_64-portable.tar.bz2 -O - | tar -jxf - && echo 'Setting up aliases...' && ln -s pypy-5.7.1-linux_x86_64-portable pypy2-latest && export PATH=$HOME/pypy2-latest/bin/:$PATH && virtualenv --no-site-packages --python ~/pypy2-latest/bin/pypy pypy2-env && echo 'Creating custom env...' && source pypy2-env/bin/activate && python -V; fi" - - cd - - 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 ; diff --git a/README.rst b/README.rst index 8fc5134..9beea66 100644 --- a/README.rst +++ b/README.rst @@ -8,8 +8,11 @@ pyexcel-ods - Let you focus on data, instead of ods format .. image:: https://api.travis-ci.org/pyexcel/pyexcel-ods.svg?branch=master :target: http://travis-ci.org/pyexcel/pyexcel-ods -.. image:: https://codecov.io/github/pyexcel/pyexcel-ods/coverage.png - :target: https://codecov.io/github/pyexcel/pyexcel-ods +.. image:: https://codecov.io/gh/pyexcel/pyexcel-ods/branch/master/graph/badge.svg + :target: https://codecov.io/gh/pyexcel/pyexcel-ods + +.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg + :target: https://gitter.im/pyexcel/Lobby **pyexcel-ods** is a tiny wrapper library to read, manipulate and write data in @@ -320,9 +323,9 @@ and update CHANGELOG.rst. .. note:: As to rnd_requirements.txt, usually, it is created when a dependent - library is not released. Once the dependecy is installed - (will be released), the future - version of the dependency in the requirements.txt will be valid. + library is not released. Once the dependecy is installed + (will be released), the future + version of the dependency in the requirements.txt will be valid. How to test your contribution @@ -344,6 +347,7 @@ 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` @@ -364,9 +368,10 @@ Acceptance criteria #. 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 - Credits ================================================================================ diff --git a/docs/source/conf.py b/docs/source/conf.py index 328a588..d775af3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,7 +11,7 @@ extensions = [ ] intersphinx_mapping = { - 'pyexcel': ('http://pyexcel.readthedocs.org/en/latest/', None), + 'pyexcel': ('http://pyexcel.readthedocs.io/en/latest/', None), } spelling_word_list_filename = 'spelling_wordlist.txt' templates_path = ['_templates'] diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..8c8abfd --- /dev/null +++ b/setup.cfg @@ -0,0 +1,4 @@ +[metadata] +description-file = README.rst +[bdist_wheel] +universal = 1 diff --git a/setup.py b/setup.py index 83aa3cc..e25b836 100644 --- a/setup.py +++ b/setup.py @@ -14,10 +14,11 @@ DESCRIPTION = ( 'A wrapper library to read, manipulate and write data in ods format' + '' ) +URL = 'https://github.com/pyexcel/pyexcel-ods' +DOWNLOAD_URL = '%s/archive/0.4.0.tar.gz' % URL +FILES = ['README.rst', 'CHANGELOG.rst'] KEYWORDS = [ - 'excel', - 'python', - 'pyexcel', + 'python' ] CLASSIFIERS = [ @@ -25,7 +26,6 @@ CLASSIFIERS = [ 'Topic :: Utilities', 'Topic :: Software Development :: Libraries', 'Programming Language :: Python', - 'License :: OSI Approved :: BSD License', 'Intended Audience :: Developers', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', @@ -80,7 +80,11 @@ def filter_out_test_code(file_handle): found_test_code = False yield line else: - yield line + for keyword in ['|version|', '|today|']: + if keyword in line: + break + else: + yield line if __name__ == '__main__': @@ -90,7 +94,9 @@ if __name__ == '__main__': version=VERSION, author_email=EMAIL, description=DESCRIPTION, - long_description=read_files('README.rst', 'CHANGELOG.rst'), + url=URL, + download_url=DOWNLOAD_URL, + long_description=read_files(*FILES), license=LICENSE, keywords=KEYWORDS, extras_require=EXTRAS_REQUIRE,