[Python-modules-commits] [python-leather] 01/03: New upstream version 0.3.3

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Mar 16 16:12:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository python-leather.

commit afdd42d43d815ebc5ee6394e06d7b51f9bbe4d46
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Thu Mar 16 15:59:05 2017 +0000

    New upstream version 0.3.3
---
 .gitignore                          |  13 ++
 .travis.yml                         |  12 ++
 AUTHORS.rst                         |   3 +
 CHANGELOG.rst                       |  52 +++++
 COPYING                             |  21 ++
 README.rst                          |  31 +++
 docs/Makefile                       | 130 ++++++++++++
 docs/about.rst                      |  16 ++
 docs/api.rst                        |  15 ++
 docs/api/axis.rst                   |   8 +
 docs/api/chart.rst                  |  49 +++++
 docs/api/grid.rst                   |   8 +
 docs/api/lattice.rst                |   8 +
 docs/api/scales.rst                 |  14 ++
 docs/api/series.rst                 |  10 +
 docs/api/shapes.rst                 |  18 ++
 docs/api/theme.rst                  |   7 +
 docs/changelog.rst                  |   5 +
 docs/conf.py                        |  47 +++++
 docs/examples.rst                   | 216 ++++++++++++++++++++
 docs/index.rst                      |  52 +++++
 docs/install.rst                    |  49 +++++
 docs/license.rst                    |   5 +
 docs/release_process.rst            |  20 ++
 examples.sh                         |   8 +
 examples/bars.py                    |  12 ++
 examples/charts/.placeholder        |   0
 examples/charts/bars.svg            |   4 +
 examples/charts/colorized_dots.svg  |   4 +
 examples/charts/columns.svg         |   4 +
 examples/charts/csv_dict_reader.svg |   4 +
 examples/charts/csv_reader.svg      |   4 +
 examples/charts/custom_data.svg     |   4 +
 examples/charts/dots.svg            |   4 +
 examples/charts/grid.svg            |   4 +
 examples/charts/lattice.svg         |   4 +
 examples/charts/linear.svg          |   4 +
 examples/charts/lines.svg           |   4 +
 examples/charts/mixed_shapes.svg    |   4 +
 examples/charts/multiple_series.svg |   4 +
 examples/charts/ordinal.svg         |   4 +
 examples/charts/series_color.svg    |   4 +
 examples/charts/simple_pairs.svg    |   4 +
 examples/charts/temporal.svg        |   4 +
 examples/charts/theme.svg           |   4 +
 examples/charts/tick_format.svg     |   4 +
 examples/charts/ticks.svg           |   4 +
 examples/colorized_dots.py          |  13 ++
 examples/columns.py                 |  12 ++
 examples/csv_dict_reader.py         |  15 ++
 examples/csv_reader.py              |  15 ++
 examples/custom_data.py             |  18 ++
 examples/dots.py                    |  12 ++
 examples/grid.py                    |  26 +++
 examples/lattice.py                 |  28 +++
 examples/linear.py                  |  14 ++
 examples/lines.py                   |  12 ++
 examples/mixed_shapes.py            |  20 ++
 examples/multiple_series.py         |  20 ++
 examples/ordinal.py                 |  12 ++
 examples/realdata/gii.csv           | 196 ++++++++++++++++++
 examples/realdata/index.md          |   3 +
 examples/series_color.py            |  12 ++
 examples/simple_pairs.py            |  12 ++
 examples/temporal.py                |  15 ++
 examples/theme.py                   |  25 +++
 examples/tick_format.py             |  16 ++
 examples/ticks.py                   |  14 ++
 leather/__init__.py                 |  12 ++
 leather/axis.py                     | 193 ++++++++++++++++++
 leather/chart.py                    | 396 ++++++++++++++++++++++++++++++++++++
 leather/data_types.py               |  47 +++++
 leather/grid.py                     | 120 +++++++++++
 leather/lattice.py                  | 172 ++++++++++++++++
 leather/scales/__init__.py          |   6 +
 leather/scales/base.py              | 140 +++++++++++++
 leather/scales/linear.py            |  61 ++++++
 leather/scales/ordinal.py           |  63 ++++++
 leather/scales/temporal.py          |  76 +++++++
 leather/series/__init__.py          |   4 +
 leather/series/base.py              | 138 +++++++++++++
 leather/series/category.py          |  88 ++++++++
 leather/shapes/__init__.py          |   7 +
 leather/shapes/bars.py              |  79 +++++++
 leather/shapes/base.py              | 101 +++++++++
 leather/shapes/columns.py           |  78 +++++++
 leather/shapes/dots.py              |  90 ++++++++
 leather/shapes/line.py              |  94 +++++++++
 leather/svg.py                      |  43 ++++
 leather/testcase.py                 |  39 ++++
 leather/theme.py                    | 128 ++++++++++++
 leather/ticks/__init__.py           |   5 +
 leather/ticks/base.py               |  18 ++
 leather/ticks/score.py              | 174 ++++++++++++++++
 leather/ticks/score_time.py         | 168 +++++++++++++++
 leather/utils.py                    | 188 +++++++++++++++++
 requirements-py2.txt                |  10 +
 requirements-py3.txt                |   9 +
 setup.py                            |  48 +++++
 test.py                             |  30 +++
 tests/__init__.py                   |   0
 tests/test_axis.py                  |  38 ++++
 tests/test_chart.py                 | 137 +++++++++++++
 tests/test_grid.py                  |  94 +++++++++
 tests/test_lattice.py               |  86 ++++++++
 tests/test_scales.py                | 138 +++++++++++++
 tests/test_series.py                |  98 +++++++++
 tests/test_shapes.py                | 241 ++++++++++++++++++++++
 tests/test_ticks.py                 | 162 +++++++++++++++
 tox.ini                             |  37 ++++
 110 files changed, 5275 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0031460
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+.DS_Store
+*.pyc
+*.swp
+*.swo
+.tox
+*.egg-info
+docs/_build
+dist
+.coverage
+build
+.proof
+.ipynb_checkpoints
+.idea
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..b8823ad
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,12 @@
+language: python
+python:
+  - "2.7"
+  - "3.3"
+  - "3.4"
+  - "3.5"
+# command to install dependencies
+install:
+    - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then pip install -r requirements-py3.txt; else pip install -r requirements-py2.txt; fi
+# command to run tests
+script: nosetests tests
+sudo: false
diff --git a/AUTHORS.rst b/AUTHORS.rst
new file mode 100644
index 0000000..6894d26
--- /dev/null
+++ b/AUTHORS.rst
@@ -0,0 +1,3 @@
+The following individuals have contributed code, documentation, or expertise to leather:
+
+* `Christopher Groskopf <https://github.com/onyxfish/>`_
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 0000000..b8b09d8
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,52 @@
+0.3.3 - November 30, 2016
+-------------------------
+
+* Fix examples that used invalid column data. (#81)
+* lxml is no longer imported by default. (#83)
+* Ordinal scales can now display data from multiple series with different values. (#76)
+* Better error handling for data types supported by different shapes.
+
+0.3.2 - November 11, 2016
+-------------------------
+
+* Fix trove classifiers.
+
+0.3.1 - November 11, 2016
+-------------------------
+
+* Fix unicode rendering issue in Python2.7 and PyPy. (#74)
+
+0.3.0 - November 11, 2016
+-------------------------
+
+* Add examples for many more use-cases. (#11)
+* Fixed bars so that data are displayed top-down when using :meth:`.Chart.add_bars`. (#72)
+* Changed default colors. (#51)
+* Fixed a rare file handling bug when saving SVG files.
+* Leather will now issue a warning if you attempt to render a chart with data exceeding the scale domain. (#42)
+* Linear scales will now default to the domain :code:`[0, 1]` if no values are provided. (#66)
+* Axis no longer takes a number of ticks as an argument. Instead pass a list of custom tick values.
+* Scales :code:`tick` methods no longer take a number of ticks as an argument. (They should self-optimize.)
+* Scales that cross :code:`0` will now always have a tick at :code:`0`. (#54)
+* Implemented auto-ticking. (#23)
+* :func:`.style_function` now takes a :class:`.Datum` instances, rather than a list of arguments.
+* Renamed the :code:`Lines` class to :class:`.Line` to be more accurate.
+* Implemented :class:`.CategorySeries`.
+* Implemented a more elegant pattern for colorizing series.
+* Refactored :class:`.Series` so :class:`.Shape` is no longer a parameter.
+* Tick values can now be overridden with the :code:`tick_values` argument. (#56)
+* Added methods to customize scales and axes for :class:`.Lattice` charts. (#17)
+* Expanded unit tests for :class:`.Scale` subclasses.
+* Zero lines now render above other tick marks. (#31)
+* Fixed rendering of :class:`.Bar` and :class:`.Column` shapes for negative values. (#52)
+* Refactored the :class:`.Lattice` API.
+
+0.2.0
+-----
+
+* Initial prototype
+
+0.1.0
+-----
+
+* Never released
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..7d61d32
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2016 Christopher Groskopf and contributors 
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..de947cf
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,31 @@
+.. image:: https://travis-ci.org/wireservice/leather.png
+    :target: https://travis-ci.org/wireservice/leather
+    :alt: Build status
+
+.. image:: https://img.shields.io/pypi/dw/leather.svg
+    :target: https://pypi.python.org/pypi/leather
+    :alt: PyPI downloads
+
+.. image:: https://img.shields.io/pypi/v/leather.svg
+    :target: https://pypi.python.org/pypi/leather
+    :alt: Version
+
+.. image:: https://img.shields.io/pypi/l/leather.svg
+    :target: https://pypi.python.org/pypi/leather
+    :alt: License
+
+.. image:: https://img.shields.io/pypi/pyversions/leather.svg
+    :target: https://pypi.python.org/pypi/leather
+    :alt: Support Python versions
+
+Leather is the Python charting library for those who need charts *now* and don't care if they're perfect.
+
+Leather isn't picky. It's rough. It gets dirty. It looks sexy just hanging on the back of a chair. Leather doesn't need your accessories. Leather is how Snake Plissken would make charts.
+
+Get it?
+
+Important links:
+
+* Documentation:    http://leather.rtfd.io
+* Repository:       https://github.com/wireservice/leather
+* Issues:           https://github.com/wireservice/leather/issues
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..464badd
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,130 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/leather.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/leather.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/leather"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/leather"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	make -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/docs/about.rst b/docs/about.rst
new file mode 100644
index 0000000..451010a
--- /dev/null
+++ b/docs/about.rst
@@ -0,0 +1,16 @@
+=============
+About leather
+=============
+
+Why leather?
+============
+
+* A readable and user-friendly API.
+* Optimized for exploratory charting.
+* Produces scale-independent SVG charts.
+* Completely type-agnostic. Chart your data, whatever it is.
+* Designed with `iPython <http://ipython.org/>`_, `Jupyter <https://jupyter.org/>`_ and `atom/hydrogen <https://atom.io/packages/hydrogen>`_ in mind.
+* Pure Python. No C dependencies to compile.
+* MIT licensed and free for all purposes.
+* Zealously `zen <https://www.python.org/dev/peps/pep-0020/>`_.
+* Made with love.
diff --git a/docs/api.rst b/docs/api.rst
new file mode 100644
index 0000000..e28bd34
--- /dev/null
+++ b/docs/api.rst
@@ -0,0 +1,15 @@
+===
+API
+===
+
+.. toctree::
+    :maxdepth: 1
+
+    api/chart
+    api/grid
+    api/lattice
+    api/scales
+    api/axis
+    api/series
+    api/shapes
+    api/theme
diff --git a/docs/api/axis.rst b/docs/api/axis.rst
new file mode 100644
index 0000000..03fa9bc
--- /dev/null
+++ b/docs/api/axis.rst
@@ -0,0 +1,8 @@
+====
+Axis
+====
+
+.. automodule:: leather.axis
+    :no-members:
+
+.. autoclass:: leather.Axis
diff --git a/docs/api/chart.rst b/docs/api/chart.rst
new file mode 100644
index 0000000..6f8ba94
--- /dev/null
+++ b/docs/api/chart.rst
@@ -0,0 +1,49 @@
+=====
+Chart
+=====
+
+.. automodule:: leather.chart
+    :no-members:
+
+.. autosummary::
+    :nosignatures:
+
+    leather.Chart
+
+Adding data
+-----------
+
+.. autosummary::
+    :nosignatures:
+
+    leather.Chart.add_series
+    leather.Chart.add_bars
+    leather.Chart.add_columns
+    leather.Chart.add_dots
+    leather.Chart.add_line
+
+Customizing
+-----------
+
+.. autosummary::
+    :nosignatures:
+
+    leather.Chart.set_x_scale
+    leather.Chart.set_y_scale
+    leather.Chart.set_x_axis
+    leather.Chart.set_y_axis
+
+Rendering
+---------
+
+.. autosummary::
+    :nosignatures:
+
+    leather.Chart.to_svg
+    leather.Chart.to_svg_group
+
+Detailed list
+-------------
+
+.. autoclass:: leather.Chart
+    :members:
diff --git a/docs/api/grid.rst b/docs/api/grid.rst
new file mode 100644
index 0000000..20a0f7e
--- /dev/null
+++ b/docs/api/grid.rst
@@ -0,0 +1,8 @@
+====
+Grid
+====
+
+.. automodule:: leather.grid
+    :no-members:
+
+.. autoclass:: leather.Grid
diff --git a/docs/api/lattice.rst b/docs/api/lattice.rst
new file mode 100644
index 0000000..1baff3e
--- /dev/null
+++ b/docs/api/lattice.rst
@@ -0,0 +1,8 @@
+=======
+Lattice
+=======
+
+.. automodule:: leather.lattice
+    :no-members:
+
+.. autoclass:: leather.Lattice
diff --git a/docs/api/scales.rst b/docs/api/scales.rst
new file mode 100644
index 0000000..899bafd
--- /dev/null
+++ b/docs/api/scales.rst
@@ -0,0 +1,14 @@
+======
+Scales
+======
+
+.. automodule:: leather.scales
+    :no-members:
+
+.. autoclass:: leather.Scale
+
+.. autoclass:: leather.Linear
+
+.. autoclass:: leather.Ordinal
+
+.. autoclass:: leather.Temporal
diff --git a/docs/api/series.rst b/docs/api/series.rst
new file mode 100644
index 0000000..2a6c0e6
--- /dev/null
+++ b/docs/api/series.rst
@@ -0,0 +1,10 @@
+======
+Series
+======
+
+.. automodule:: leather.series
+    :no-members:
+
+.. autoclass:: leather.Series
+
+.. autofunction:: leather.key_function
diff --git a/docs/api/shapes.rst b/docs/api/shapes.rst
new file mode 100644
index 0000000..317c452
--- /dev/null
+++ b/docs/api/shapes.rst
@@ -0,0 +1,18 @@
+======
+Shapes
+======
+
+.. automodule:: leather.shapes
+    :no-members:
+
+.. autoclass:: leather.Shape
+
+.. autoclass:: leather.Bars
+
+.. autoclass:: leather.Columns
+
+.. autoclass:: leather.Dots
+
+.. autoclass:: leather.Line
+
+.. autofunction:: leather.style_function
diff --git a/docs/api/theme.rst b/docs/api/theme.rst
new file mode 100644
index 0000000..db7904b
--- /dev/null
+++ b/docs/api/theme.rst
@@ -0,0 +1,7 @@
+=====
+Theme
+=====
+
+.. automodule:: leather.theme
+    :members:
+    :undoc-members:
diff --git a/docs/changelog.rst b/docs/changelog.rst
new file mode 100644
index 0000000..4c32ed8
--- /dev/null
+++ b/docs/changelog.rst
@@ -0,0 +1,5 @@
+=========
+Changelog
+=========
+
+.. include:: ../CHANGELOG.rst
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000..c653d77
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import os
+import sys
+
+# Path munging
+sys.path.insert(0, os.path.abspath('..'))
+
+# Extensions
+extensions = [
+    'sphinx.ext.autosummary',
+    'sphinx.ext.autodoc',
+    'sphinx.ext.intersphinx'
+]
+# autodoc_member_order = 'bysource'
+autodoc_default_flags = ['members', 'show-inheritance']
+
+intersphinx_mapping = {
+    'python': ('http://docs.python.org/3.5', None)
+}
+
+# Templates
+templates_path = ['_templates']
+master_doc = 'index'
+
+# Metadata
+project = u'leather'
+copyright = u'2016, Christopher Groskopf'
+version = '0.3.3'
+release = '0.3.3'
+
+exclude_patterns = ['_build']
+pygments_style = 'sphinx'
+
+# HTMl theming
+html_theme = 'default'
+
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+if not on_rtd:  # only import and set the theme if we're building docs locally
+    import sphinx_rtd_theme
+    html_theme = 'sphinx_rtd_theme'
+    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+
+html_static_path = ['_static']
+htmlhelp_basename = 'leatherdoc'
diff --git a/docs/examples.rst b/docs/examples.rst
new file mode 100644
index 0000000..62064b7
--- /dev/null
+++ b/docs/examples.rst
@@ -0,0 +1,216 @@
+========
+Examples
+========
+
+Data series
+===========
+
+Simple pairs
+------------
+
+.. literalinclude:: ../examples/simple_pairs.py
+    :language: python
+
+.. figure:: ../examples/charts/simple_pairs.svg
+
+Table from csv.reader
+---------------------
+
+Sequence row data, such as is returned by :func:`csv.reader` can be accessed by specifying the indices of the columns containing the :code:`x` and :code:`y` values.
+
+Note that leather does not automatically convert numerical strings, such as those stored in a CSV. If you want that you'll need to use a smarter table reader, such as `agate <http://agate.rtfd.io/>`_
+
+.. literalinclude:: ../examples/csv_reader.py
+    :language: python
+
+.. figure:: ../examples/charts/csv_reader.svg
+
+Table from csv.DictReader
+-------------------------
+
+Dict row data, such as is returned by :class:`csv.DictReader` can be accessed by specifying the indices of the columns containing the :code:`x` and :code:`y` values.
+
+See previous example for note on strings from CSVs.
+
+.. literalinclude:: ../examples/csv_dict_reader.py
+    :language: python
+
+.. figure:: ../examples/charts/csv_dict_reader.svg
+
+Custom data
+-----------
+
+Completely custom data formats are also supported via accessor functions.
+
+.. literalinclude:: ../examples/custom_data.py
+    :language: python
+
+.. figure:: ../examples/charts/custom_data.svg
+
+Multiple series
+---------------
+
+Multiple data series can be displayed on a single chart so long as they all use the same type of :class:`.Scale`.
+
+.. literalinclude:: ../examples/multiple_series.py
+    :language: python
+
+.. figure:: ../examples/charts/multiple_series.svg
+
+Shapes
+======
+
+Bars
+----
+
+.. literalinclude:: ../examples/bars.py
+    :language: python
+
+.. figure:: ../examples/charts/bars.svg
+
+Columns
+-------
+
+.. literalinclude:: ../examples/columns.py
+    :language: python
+
+.. figure:: ../examples/charts/columns.svg
+
+Dots
+----
+
+.. literalinclude:: ../examples/dots.py
+    :language: python
+
+.. figure:: ../examples/charts/dots.svg
+
+Lines
+-----
+
+.. literalinclude:: ../examples/lines.py
+    :language: python
+
+.. figure:: ../examples/charts/lines.svg
+
+Mixing shapes
+-------------
+
+You can mix different shapes for different series on the same chart.
+
+.. literalinclude:: ../examples/mixed_shapes.py
+    :language: python
+
+.. figure:: ../examples/charts/mixed_shapes.svg
+
+Scales
+======
+
+Linear
+------
+
+When using numerical data :class:`.Linear` scales are created automatically and by default. You may override the domain by adding a scale manually.
+
+.. literalinclude:: ../examples/linear.py
+    :language: python
+
+.. figure:: ../examples/charts/linear.svg
+
+Ordinal
+-------
+
+When using text data :class:`.Ordinal` scales are created automatically and by default. It is generally not useful to override these defaults.
+
+.. literalinclude:: ../examples/ordinal.py
+    :language: python
+
+.. figure:: ../examples/charts/ordinal.svg
+
+Temporal
+--------
+
+When using date/time data :class:`.Temporal` scales are created automatically and by default. You may override the domain by adding a scale manually.
+
+.. literalinclude:: ../examples/temporal.py
+    :language: python
+
+.. figure:: ../examples/charts/temporal.svg
+
+Axes
+====
+
+Changing tick values
+--------------------
+
+You can change the list of ticks that are displayed using :meth:`.Chart.add_x_axis` and :meth:`.Chart.add_y_axis` methods. This will not adjust automatically adjust the scale, so it is possible to pick tick values that are not displayed.
+
+.. literalinclude:: ../examples/ticks.py
+    :language: python
+
+.. figure:: ../examples/charts/ticks.svg
+
+Customizing tick format
+-----------------------
+
+You can provide a tick formatter method to change how ticks are displayed using the :meth:`.Chart.add_x_axis` and :meth:`.Chart.add_y_axis` methods.
+
+.. literalinclude:: ../examples/tick_format.py
+    :language: python
+
+.. figure:: ../examples/charts/tick_format.svg
+
+Styling
+=======
+
+Changing theme values
+---------------------
+
+Chart styles are set using a dead simple :mod:`.theme` system. Leather is meant for making quick and dirty charts. It is neither expected nor recommended for user's to customize these styles.
+
+.. literalinclude:: ../examples/theme.py
+    :language: python
+
+.. figure:: ../examples/charts/theme.svg
+
+Changing series colors
+----------------------
+
+More practically, individual default :class:`.Series` colors can be overriden when they are created.
+
+.. literalinclude:: ../examples/series_color.py
+    :language: python
+
+.. figure:: ../examples/charts/series_color.svg
+
+
+Styling data based on value
+---------------------------
+
+Style attributes of individual data points can be set by value using a :func:`.style_function`.
+
+.. literalinclude:: ../examples/colorized_dots.py
+    :language: python
+
+.. figure:: ../examples/charts/colorized_dots.svg
+
+Chart grids
+===========
+
+With mixed scales
+-----------------
+
+You can add charts of completely different types to a single graphic by using :class:`.Grid`.
+
+.. literalinclude:: ../examples/grid.py
+    :language: python
+
+.. figure:: ../examples/charts/grid.svg
+
+With consistent scales
+----------------------
+
+A grid of charts can automatically be synchronized to a consistent view using :class:`.Lattice`.
+
+.. literalinclude:: ../examples/lattice.py
+    :language: python
+
+.. figure:: ../examples/charts/lattice.svg
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644
index 0000000..557b8b3
--- /dev/null
+++ b/docs/index.rst
@@ -0,0 +1,52 @@
+=================
+leather |release|
+=================
+
+.. include:: ../README.rst
+
+.. toctree::
+    :hidden:
+    :maxdepth: 2
+
+    about
+    install
+    examples
+    api
+    changelog
+    release_process
+    license
+
+Show me docs
+============
+
+* `About <about.html>`_ - why you should use leather
+* `Install <install.html>`_ - how to install for users and developers
+* `Examples <examples.html>`_ - code + output examples of every feature of leather
+* `API <api.html>`_ - technical documentation for the leather API
+* `Changelog <changelog.html>`_ - a record of every change made for each release
+
+Show me code
+============
+
+.. literalinclude:: ../examples/colorized_dots.py
+    :language: python
+
+.. figure:: ../examples/charts/colorized_dots.svg
+
+Join us
+=======
+
+* `Release process <release_process.html>`_ - the process for maintainers to publish new releases
+* `License <license.html>`_ - a copy of the MIT open source license covering leather
+
+Who we are
+==========
+
+.. include:: ../AUTHORS.rst
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/docs/install.rst b/docs/install.rst
new file mode 100644
index 0000000..9f6a4fc
--- /dev/null
+++ b/docs/install.rst
@@ -0,0 +1,49 @@
+============
+Installation
+============
+
+Users
+-----
+
+To use leather install it with pip::
+
+    pip install leather
+
+Developers
+----------
+
+If you are a developer that also wants to hack on leather, install it from git::
... 5067 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-leather.git



More information about the Python-modules-commits mailing list