Skip to content

Commit 3039e3c

Browse files
committed
initial commit
0 parents  commit 3039e3c

25 files changed

+616
-0
lines changed

.gitignore

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# April 2016
2+
# reference: https://github.com/github/gitignore/blob/master/Python.gitignore
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
env/
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.coverage
43+
.coverage.*
44+
.cache
45+
nosetests.xml
46+
coverage.xml
47+
*,cover
48+
.hypothesis/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
58+
# Flask stuff:
59+
instance/
60+
.webassets-cache
61+
62+
# Scrapy stuff:
63+
.scrapy
64+
65+
# Sphinx documentation
66+
docs/_build/
67+
68+
# PyBuilder
69+
target/
70+
71+
# IPython Notebook
72+
.ipynb_checkpoints
73+
74+
# pyenv
75+
.python-version
76+
77+
# celery beat schedule file
78+
celerybeat-schedule
79+
80+
# dotenv
81+
.env
82+
83+
# virtualenv
84+
venv/
85+
ENV/
86+
87+
# Spyder project settings
88+
.spyderproject
89+
90+
# Rope project settings
91+
.ropeproject
92+
*~
93+
commons/
94+
commons
95+
.moban.hashes

.moban.d/README.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends "BASIC-README.rst.jj2" %}
2+
3+
{%block constraint%}
4+
{%endblock%}
5+
6+
{%block features %}
7+
**{{name}}** does xyz.
8+
{%endblock%}

.moban.d/docs/source/conf.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% extends 'docs/source/conf.py.jj2'%}
2+
3+
{%block SPHINX_EXTENSIONS%}
4+
'sphinx.ext.autosummary',
5+
'sphinxcontrib.spelling'
6+
{%endblock%}
7+
8+
{%block custom_doc_theme%}
9+
html_theme = 'default'
10+
11+
12+
def setup(app):
13+
app.add_stylesheet('theme_overrides.css')
14+
15+
16+
{%endblock%}
17+

.moban.d/requirements.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% for dependency in dependencies: %}
2+
{{dependency}}
3+
{% endfor %}

.moban.d/setup.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{%extends "setup.py.jj2"%}
2+
3+
{%block platform_block%}
4+
{%endblock%}

.moban.d/test.bat

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends "test.sh.jj2" %}
2+
3+
{%block pretest %}
4+
cd tests\test_plugin
5+
python setup.py install
6+
cd ..\..\
7+
{%endblock %}
8+
9+
{%block flake8_options%}
10+
--builtins=unicode,xrange,long
11+
{%endblock%}
12+
13+
14+

.moban.d/test.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% extends "test.sh.jj2" %}
2+
3+
{%block pretest %}
4+
#/bin/bash
5+
6+
cd tests/test_plugin
7+
python setup.py install
8+
cd ../../
9+
{%endblock %}
10+
11+
{%block flake8_options%}
12+
--builtins=unicode,xrange,long
13+
{%endblock%}

.moban.d/tests/requirements.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% extends 'tests/requirements.txt.jj2' %}
2+
{%block extras %}
3+
pyexcel
4+
pyexcel-xls
5+
{%endblock%}

.moban.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
configuration:
2+
configuration_dir: "commons/config"
3+
template_dir:
4+
- "commons/templates"
5+
- ".moban.d"
6+
configuration: pyexcel-pygal.yml
7+
targets:
8+
- README.rst: README.rst
9+
- setup.py: setup.py
10+
- requirements.txt: requirements.txt
11+
- LICENSE: LICENSE.jj2
12+
- MANIFEST.in: MANIFEST.in.jj2
13+
- "tests/requirements.txt": "tests/requirements.txt"
14+
- test.sh: test.sh.jj2
15+
- test.bat: test.sh.jj2
16+
- .travis.yml: travis.yml.jj2
17+
- .gitignore: .gitignore.jj2

.travis.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
sudo: false
2+
language: python
3+
notifications:
4+
email: false
5+
python:
6+
- pypy
7+
- 3.6
8+
- 3.5
9+
- 3.4
10+
- 3.3
11+
- 2.7
12+
- 2.6
13+
before_install:
14+
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install flake8==2.6.2; fi
15+
- if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then
16+
mv min_requirements.txt requirements.txt ;
17+
fi
18+
- test ! -f rnd_requirements.txt || pip install --no-deps -r rnd_requirements.txt
19+
- test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt ;
20+
- pip install -r tests/requirements.txt
21+
script:
22+
- make test
23+
after_success:
24+
codecov

CHANGELOG.rst

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Change log
2+
===========

LICENSE

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Copyright (c) 2015-2017 by Onni Software Ltd. and its contributors
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms of the software as well
5+
as documentation, with or without modification, are permitted provided
6+
that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
* Neither the name of 'pyexcel-pygal' nor the names of the contributors
16+
may not be used to endorse or promote products derived from this software
17+
without specific prior written permission.
18+
19+
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
20+
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
21+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
23+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
30+
DAMAGE.

MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README.rst
2+
include CHANGELOG.rst

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
all: test
2+
3+
test:
4+
bash test.sh
5+
6+
document:
7+
bash document.sh
8+
9+
spelling:
10+
sphinx-build -b spelling docs/source/ docs/build/spelling

README.rst

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
================================================================================
2+
pyexcel-pygal - Let you focus on data, instead of file formats
3+
================================================================================
4+
5+
.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png
6+
:target: https://www.patreon.com/pyexcel
7+
8+
.. image:: https://api.travis-ci.org/pyexcel/pyexcel-pygal.svg?branch=master
9+
:target: http://travis-ci.org/pyexcel/pyexcel-pygal
10+
11+
.. image:: https://codecov.io/github/pyexcel/pyexcel-pygal/coverage.png
12+
:target: https://codecov.io/github/pyexcel/pyexcel-pygal
13+
14+
.. image:: https://readthedocs.org/projects/pyexcel-pygal/badge/?version=latest
15+
:target: http://pyexcel-pygal.readthedocs.org/en/latest/
16+
17+
18+
**pyexcel-pygal** does xyz.
19+
20+
21+
22+
Installation
23+
================================================================================
24+
You can install it via pip:
25+
26+
.. code-block:: bash
27+
28+
$ pip install pyexcel-pygal
29+
30+
31+
or clone it and install it:
32+
33+
.. code-block:: bash
34+
35+
$ git clone https://github.com/pyexcel/pyexcel-pygal.git
36+
$ cd pyexcel-pygal
37+
$ python setup.py install
38+
39+
40+
41+
Development guide
42+
================================================================================
43+
44+
Development steps for code changes
45+
46+
#. git clone https://github.com/pyexcel/pyexcel-pygal.git
47+
#. cd pyexcel-pygal
48+
49+
Upgrade your setup tools and pip. They are needed for development and testing only:
50+
51+
#. pip install --upgrade setuptools pip
52+
53+
Then install relevant development requirements:
54+
55+
#. pip install -r rnd_requirements.txt # if such a file exists
56+
#. pip install -r requirements.txt
57+
#. pip install -r tests/requirements.txt
58+
59+
60+
In order to update test environment, and documentation, additional steps are
61+
required:
62+
63+
#. pip install moban
64+
#. git clone https://github.com/pyexcel/pyexcel-commons.git commons
65+
#. make your changes in `.moban.d` directory, then issue command `moban`
66+
67+
What is rnd_requirements.txt
68+
-------------------------------
69+
70+
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.
71+
72+
What is pyexcel-commons
73+
---------------------------------
74+
75+
Many information that are shared across pyexcel projects, such as: this developer guide, license info, etc. are stored in `pyexcel-commons` project.
76+
77+
What is .moban.d
78+
---------------------------------
79+
80+
`.moban.d` stores the specific meta data for the library.
81+
82+
How to test your contribution
83+
------------------------------
84+
85+
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.
86+
87+
On Linux/Unix systems, please launch your tests like this::
88+
89+
$ make
90+
91+
On Windows systems, please issue this command::
92+
93+
> test.bat
94+
95+
96+
License
97+
================================================================================
98+
99+
New BSD License
100+
101+
Support the project
102+
================================================================================
103+
104+
If your company has embedded pyexcel and its components into a revenue generating
105+
product, please `support me on patreon <https://www.patreon.com/bePatron?u=5537627>`_ to
106+
maintain the project and develop it further.

pyexcel-pygal.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
overrides: "pyexcel.yaml"
2+
name: "pyexcel-pygal"
3+
nick_name: "pygal"
4+
version: "0.0.1"
5+
release: "0.0.1"
6+
dependencies:
7+
- pygal
8+
description: "draw simple svg chart via pygal"

pyexcel_pygal/__init__.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from pyexcel_chart.plugin import ChartPluginChain
2+
3+
4+
ChartPluginChain(__name__).add_a_plugin(
5+
submodule='chart.SimpleLayout',
6+
tags=['pie', 'box']
7+
).add_a_plugin(
8+
submodule='chart.ComplexLayout',
9+
tags=['line', 'bar', 'stacked_bar', 'radar', 'dot', 'funnel']
10+
).add_a_plugin(
11+
submodule='chart.Histogram',
12+
tags=['histogram']
13+
).add_a_plugin(
14+
submodule='chart.XY',
15+
tags=['xy']
16+
)

0 commit comments

Comments
 (0)