Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Feb 20, 2017
0 parents commit f771683
Show file tree
Hide file tree
Showing 25 changed files with 764 additions and 0 deletions.
93 changes: 93 additions & 0 deletions .gitignore
@@ -0,0 +1,93 @@
# 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
.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
*~
commons/
13 changes: 13 additions & 0 deletions .moban.d/README.rst
@@ -0,0 +1,13 @@
{% extends "BASIC-README.rst.jj2" %}

{%block constraint%}
{%endblock%}

{%block features %}
The sphinx library uses pyexcel to read an excel files and renders into an excel-alike sheet in your sphinx documentation. The excel file formats are:

#. csv, tsv, csvz, tsvz
#. xls, xlsx, xlsm
#. ods

{%endblock%}
16 changes: 16 additions & 0 deletions .moban.d/docs/source/conf.py
@@ -0,0 +1,16 @@
{% extends 'docs/source/conf.py.jj2'%}

{%block SPHINX_EXTENSIONS%}
'sphinx.ext.autosummary'
{%endblock%}

{%block custom_doc_theme%}
html_theme = 'default'


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


{%endblock%}

3 changes: 3 additions & 0 deletions .moban.d/requirements.txt
@@ -0,0 +1,3 @@
{% for dependency in dependencies: %}
{{dependency}}
{% endfor %}
4 changes: 4 additions & 0 deletions .moban.d/setup.py
@@ -0,0 +1,4 @@
{%extends "setup.py.jj2"%}

{%block platform_block%}
{%endblock%}
14 changes: 14 additions & 0 deletions .moban.d/test.bat
@@ -0,0 +1,14 @@
{% extends "test.sh.jj2" %}

{%block pretest %}
cd tests\test_plugin
python setup.py install
cd ..\..\
{%endblock %}

{%block flake8_options%}
--builtins=unicode,xrange,long
{%endblock%}



13 changes: 13 additions & 0 deletions .moban.d/test.sh
@@ -0,0 +1,13 @@
{% extends "test.sh.jj2" %}

{%block pretest %}
#/bin/bash

cd tests/test_plugin
python setup.py install
cd ../../
{%endblock %}

{%block flake8_options%}
--builtins=unicode,xrange,long
{%endblock%}
6 changes: 6 additions & 0 deletions .moban.d/tests/requirements.txt
@@ -0,0 +1,6 @@
{% extends 'tests/requirements.txt.jj2' %}
{%block extras %}
mock
pyexcel
pyexcel-xls
{%endblock%}
16 changes: 16 additions & 0 deletions .moban.yml
@@ -0,0 +1,16 @@
configuration:
configuration_dir: "commons/config"
template_dir:
- "commons/templates"
- ".moban.d"
configuration: pyexcel-handsontable.yml
targets:
- README.rst: README.rst
- setup.py: setup.py
- requirements.txt: requirements.txt
- LICENSE: LICENSE.jj2
- MANIFEST.in: MANIFEST.in.jj2
- "tests/requirements.txt": "tests/requirements.txt"
- test.sh: test.sh.jj2
- test.bat: test.sh.jj2
- .gitignore: .gitignore.jj2
2 changes: 2 additions & 0 deletions CHANGELOG.rst
@@ -0,0 +1,2 @@
Change log
===========
30 changes: 30 additions & 0 deletions LICENSE
@@ -0,0 +1,30 @@
Copyright (c) 2015-2017 by Onni Software Ltd. and its contributors
All rights reserved.

Redistribution and use in source and binary forms of the software as well
as documentation, 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.

* Neither the name of 'pyexcel-handsontable' nor the names of the contributors
may not be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE AND DOCUMENTATION 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
SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
2 changes: 2 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,2 @@
include README.rst
include CHANGELOG.rst
7 changes: 7 additions & 0 deletions Makefile
@@ -0,0 +1,7 @@
all: test

test:
bash test.sh

document:
bash document.sh
100 changes: 100 additions & 0 deletions README.rst
@@ -0,0 +1,100 @@
================================================================================
pyexcel-handsontable - Let you focus on data, instead of file formats
================================================================================

.. image:: https://api.travis-ci.org/pyexcel/pyexcel-handsontable.svg?branch=master
:target: http://travis-ci.org/pyexcel/pyexcel-handsontable

.. image:: https://codecov.io/github/pyexcel/pyexcel-handsontable/coverage.png
:target: https://codecov.io/github/pyexcel/pyexcel-handsontable

.. image:: https://readthedocs.org/projects/pyexcel-handsontable/badge/?version=latest
:target: http://pyexcel-handsontable.readthedocs.org/en/latest/


The sphinx library uses pyexcel to read an excel files and renders into an excel-alike sheet in your sphinx documentation. The excel file formats are:

#. csv, tsv, csvz, tsvz
#. xls, xlsx, xlsm
#. ods




Installation
================================================================================
You can install it via pip:

.. code-block:: bash
$ pip install pyexcel-handsontable
or clone it and install it:

.. code-block:: bash
$ git clone http://github.com/pyexcel/pyexcel-handsontable.git
$ cd pyexcel-handsontable
$ python setup.py install
Development guide
================================================================================

Development steps for code changes

#. git clone https://github.com/pyexcel/pyexcel-handsontable.git
#. cd pyexcel-handsontable

Upgrade your setup tools and pip. They are needed for development and testing only:

#. pip install --upgrade setuptools "pip==7.1"

Then install relevant development requirements:

#. pip install -r rnd_requirements.txt # if such a file exists
#. pip install -r requirements.txt
#. pip install -r tests/requirements.txt


In order to update test environment, and documentation, additional setps are
required:

#. pip install moban
#. git clone https://github.com/pyexcel/pyexcel-commons.git commons
#. make your changes in `.moban.d` directory, then issue command `moban`

What is 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.

What is pyexcel-commons
---------------------------------

Many information that are shared across pyexcel projects, such as: this developer guide, license info, etc. are stored in `pyexcel-commons` project.

What is .moban.d
---------------------------------

`.moban.d` stores the specific meta data for the library.

How to test your contribution
------------------------------

Although `nose` and `doctest` are both used in code testing, it is adviable that unit tests are put in tests. `doctest` is incorporated only to make sure the code examples in documentation remain valid across different development releases.

On Linux/Unix systems, please launch your tests like this::

$ make test

On Windows systems, please issue this command::

> test.bat

License
================================================================================

New BSD License
8 changes: 8 additions & 0 deletions pyexcel-handsontable.yml
@@ -0,0 +1,8 @@
overrides: "pyexcel.yaml"
name: "pyexcel-handsontable"
nick_name: handsontable
version: 0.0.1
release: 0.0.1
dependencies:
- pyexcel>=0.4.4
description: A plugin to present data in handsontable in html pages
1 change: 1 addition & 0 deletions pyexcel_handsontable/__init__.py
@@ -0,0 +1 @@
__pyexcel_renderer_plugins__ = ['handsontable']

0 comments on commit f771683

Please sign in to comment.