[Python-modules-commits] [toolz] 01/09: Import toolz_0.8.0.orig.tar.gz

Diane Trout diane at moszumanska.debian.org
Sat Dec 3 06:07:13 UTC 2016


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

diane pushed a commit to branch master
in repository toolz.

commit 417abdcd153ffa6beb5d009c3aa5471c37c3fba0
Author: Diane Trout <diane at ghic.org>
Date:   Fri Dec 2 20:49:50 2016 -0800

    Import toolz_0.8.0.orig.tar.gz
---
 .binstar.yml                         |   17 +
 .coveragerc                          |   10 +
 .gitignore                           |    4 +
 .travis.yml                          |   33 ++
 AUTHORS.md                           |   31 +
 LICENSE.txt                          |   28 +
 MANIFEST.in                          |    1 +
 README.rst                           |  140 +++++
 bench/test_curry.py                  |   10 +
 bench/test_curry_baseline.py         |   11 +
 bench/test_first.py                  |   13 +
 bench/test_first_iter.py             |   14 +
 bench/test_frequencies.py            |   14 +
 bench/test_get.py                    |    8 +
 bench/test_get_list.py               |    8 +
 bench/test_groupby.py                |    8 +
 bench/test_join.py                   |   35 ++
 bench/test_memoize.py                |   10 +
 bench/test_memoize_kwargs.py         |   10 +
 bench/test_pluck.py                  |   12 +
 bench/test_sliding_window.py         |    7 +
 bench/test_wordcount.py              |   18 +
 conda.recipe/bld.bat                 |    2 +
 conda.recipe/build.sh                |    2 +
 conda.recipe/meta.yaml               |   26 +
 doc/Makefile                         |  153 +++++
 doc/make.bat                         |  190 +++++++
 doc/source/api.rst                   |  124 ++++
 doc/source/composition.rst           |   79 +++
 doc/source/conf.py                   |  287 ++++++++++
 doc/source/control.rst               |  205 +++++++
 doc/source/curry.rst                 |  120 ++++
 doc/source/heritage.rst              |   51 ++
 doc/source/index.rst                 |   50 ++
 doc/source/install.rst               |   14 +
 doc/source/laziness.rst              |  103 ++++
 doc/source/parallelism.rst           |   95 ++++
 doc/source/purity.rst                |   96 ++++
 doc/source/references.rst            |   26 +
 doc/source/streaming-analytics.rst   |  315 ++++++++++
 doc/source/tips-and-tricks.rst       |  126 ++++
 examples/fib.py                      |   38 ++
 examples/graph.py                    |   31 +
 examples/wordcount.py                |   12 +
 release-notes                        |   56 ++
 setup.py                             |   22 +
 toolz/__init__.py                    |   22 +
 toolz/_signatures.py                 |  832 +++++++++++++++++++++++++++
 toolz/compatibility.py               |   33 ++
 toolz/curried/__init__.py            |   55 ++
 toolz/curried/exceptions.py          |   17 +
 toolz/curried/operator.py            |   23 +
 toolz/dicttoolz.py                   |  315 ++++++++++
 toolz/functoolz.py                   | 1041 ++++++++++++++++++++++++++++++++++
 toolz/itertoolz.py                   |  941 ++++++++++++++++++++++++++++++
 toolz/recipes.py                     |   47 ++
 toolz/sandbox/__init__.py            |    2 +
 toolz/sandbox/core.py                |  132 +++++
 toolz/sandbox/parallel.py            |   62 ++
 toolz/sandbox/tests/test_core.py     |  103 ++++
 toolz/sandbox/tests/test_parallel.py |   24 +
 toolz/tests/test_compatibility.py    |   18 +
 toolz/tests/test_curried.py          |   64 +++
 toolz/tests/test_dicttoolz.py        |  252 ++++++++
 toolz/tests/test_functoolz.py        |  638 +++++++++++++++++++++
 toolz/tests/test_inspect_args.py     |  498 ++++++++++++++++
 toolz/tests/test_itertoolz.py        |  520 +++++++++++++++++
 toolz/tests/test_recipes.py          |   27 +
 toolz/tests/test_serialization.py    |   42 ++
 toolz/tests/test_signatures.py       |   87 +++
 toolz/tests/test_utils.py            |    6 +
 toolz/utils.py                       |    9 +
 72 files changed, 8475 insertions(+)

diff --git a/.binstar.yml b/.binstar.yml
new file mode 100644
index 0000000..4360652
--- /dev/null
+++ b/.binstar.yml
@@ -0,0 +1,17 @@
+package: toolz
+platform:
+  - linux-64
+  - linux-32
+  - osx-64
+  - win-64
+  - win-32
+engine:
+  - python=2.6
+  - python=2.7
+  - python=3.3
+  - python=3.4
+script:
+  - conda build conda.recipe
+build_targets:
+  files: conda
+  channels: main
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..f9b82ac
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,10 @@
+[run]
+omit =
+    toolz/tests/test*
+    toolz/*/tests/test*
+    toolz/compatibility.py
+
+[report]
+exclude_lines =
+    pragma: no cover
+    pragma: py$MAJOR_PYTHON_VERSION no cover
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3d4bfdf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.pyc
+build/
+dist/
+*.egg-info/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..2a24ac3
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,33 @@
+sudo: false
+language: python
+python:
+    - "2.6"
+    - "2.7"
+    - "3.3"
+    - "3.4"
+    - "3.5"
+    - "pypy"
+
+env:
+    - PEP8_IGNORE="E731,W503,E402"
+
+# command to install dependencies
+install:
+    - pip install coverage pep8
+
+# command to run tests
+# require 100% coverage (not including test files) to pass Travis CI test
+# To skip pypy: - if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then DOSTUFF ; fi
+script:
+    - export MAJOR_PYTHON_VERSION=`echo $TRAVIS_PYTHON_VERSION | cut -c 1`
+    - coverage run --source=toolz $(which nosetests)
+                   --with-doctest
+    - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage report --show-missing --fail-under=100 ; fi
+    - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pep8 --ignore=$PEP8_IGNORE --exclude=conf.py,tests,examples,bench -r --show-source . ; fi
+
+# load coverage status to https://coveralls.io
+after_success:
+    - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls --use-mirrors ; coveralls ; fi
+
+notifications:
+  email: false
diff --git a/AUTHORS.md b/AUTHORS.md
new file mode 100644
index 0000000..469670d
--- /dev/null
+++ b/AUTHORS.md
@@ -0,0 +1,31 @@
+[Matthew Rocklin](http://matthewrocklin.com)    [@mrocklin](http://github.com/mrocklin/)
+
+[John Jacobsen](http://eigenhombre.com)         [@eigenhombre](http://github.com/eigenhombre/)
+
+Erik Welch                                      [@eriknw](https://github.com/eriknw/)
+
+John Crichton                                   [@jcrichton](https://github.com/jcrichton/)
+
+Han Semaj                                       [@microamp](https://github.com/microamp/)
+
+[Graeme Coupar](https://twitter.com/obmarg)     [@obmarg](https://github.com/obmarg/)
+
+[Leonid Shvechikov](http://brainstorage.me/shvechikov)  [@shvechikov](https://github.com/shvechikov)
+
+Lars Buitinck                                   [@larsmans](http://github.com/larsmans)
+
+José Ricardo                                    [@josericardo](https://github.com/josericardo)
+
+Tom Prince                                      [@tomprince](https://github.com/tomprince)
+
+Bart van Merriënboer                            [@bartvm](https://github.com/bartvm)
+
+Nikolaos-Digenis Karagiannis                    [@digenis](https://github.com/digenis/)
+
+[Antonio Lima](https://twitter.com/themiurgo)   [@themiurgo](https://github.com/themiurgo/)
+
+Joe Jevnik                                      [@llllllllll](https://github.com/llllllllll)
+
+Rory Kirchner                                      [@roryk](https://github.com/roryk)
+
+[Steven Cutting](http://steven-cutting.github.io) [@steven_cutting](https://github.com/steven-cutting)
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..eeb91b2
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,28 @@
+Copyright (c) 2013 Matthew Rocklin
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+  a. Redistributions of source code must retain the above copyright notice,
+     this list of conditions and the following disclaimer.
+  b. 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.
+  c. Neither the name of toolz nor the names of its contributors
+     may be used to endorse or promote products derived from this software
+     without specific prior written permission.
+
+
+THIS SOFTWARE 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 REGENTS 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, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..19e672b
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1 @@
+include toolz/tests/*.py
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..1f06c04
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,140 @@
+Toolz
+=====
+
+|Build Status| |Coverage Status| |Version Status| |Downloads|
+
+A set of utility functions for iterators, functions, and dictionaries.
+
+See the PyToolz documentation at http://toolz.readthedocs.org
+
+LICENSE
+-------
+
+New BSD. See `License File <https://github.com/pytoolz/toolz/blob/master/LICENSE.txt>`__.
+
+Install
+-------
+
+``toolz`` is on the Python Package Index (PyPI):
+
+::
+
+    pip install toolz
+
+or
+
+::
+
+    easy_install toolz
+
+Structure and Heritage
+----------------------
+
+``toolz`` is implemented in three parts:
+
+|literal itertoolz|_, for operations on iterables. Examples: ``groupby``,
+``unique``, ``interpose``,
+
+|literal functoolz|_, for higher-order functions. Examples: ``memoize``,
+``curry``, ``compose``
+
+|literal dicttoolz|_, for operations on dictionaries. Examples: ``assoc``,
+``update-in``, ``merge``.
+
+.. |literal itertoolz| replace:: ``itertoolz``
+.. _literal itertoolz: https://github.com/pytoolz/toolz/blob/master/toolz/itertoolz.py
+
+.. |literal functoolz| replace:: ``functoolz``
+.. _literal functoolz: https://github.com/pytoolz/toolz/blob/master/toolz/functoolz.py
+
+.. |literal dicttoolz| replace:: ``dicttoolz``
+.. _literal dicttoolz: https://github.com/pytoolz/toolz/blob/master/toolz/dicttoolz.py
+
+These functions come from the legacy of functional languages for list
+processing. They interoperate well to accomplish common complex tasks.
+
+Read our `API
+Documentation <http://toolz.readthedocs.org/en/latest/api.html>`__ for
+more details.
+
+Example
+-------
+
+This builds a standard wordcount function from pieces within ``toolz``:
+
+.. code:: python
+
+    >>> def stem(word):
+    ...     """ Stem word to primitive form """
+    ...     return word.lower().rstrip(",.!:;'-\"").lstrip("'\"")
+
+    >>> from toolz import compose, frequencies, partial
+    >>> from toolz.curried import map
+    >>> wordcount = compose(frequencies, map(stem), str.split)
+
+    >>> sentence = "This cat jumped over this other cat!"
+    >>> wordcount(sentence)
+    {'this': 2, 'cat': 2, 'jumped': 1, 'over': 1, 'other': 1}
+
+Dependencies
+------------
+
+``toolz`` supports Python 2.6+ and Python 3.3+ with a common codebase.
+It is pure Python and requires no dependencies beyond the standard
+library.
+
+It is, in short, a light weight dependency.
+
+
+CyToolz
+-------
+
+The ``toolz`` project has been reimplemented in `Cython <http://cython.org>`__.
+The ``cytoolz`` project is a drop-in replacement for the Pure Python
+implementation.
+See `CyToolz Github Page <https://github.com/pytoolz/cytoolz/>`__ for more
+details.
+
+See Also
+--------
+
+-  `Underscore.js <http://underscorejs.org>`__: A similar library for
+   JavaScript
+-  `Enumerable <http://ruby-doc.org/core-2.0.0/Enumerable.html>`__: A
+   similar library for Ruby
+-  `Clojure <http://clojure.org>`__: A functional language whose
+   standard library has several counterparts in ``toolz``
+-  `itertools <http://docs.python.org/2/library/itertools.html>`__: The
+   Python standard library for iterator tools
+-  `functools <http://docs.python.org/2/library/functools.html>`__: The
+   Python standard library for function tools
+
+Contributions Welcome
+---------------------
+
+``toolz`` aims to be a repository for utility functions, particularly
+those that come from the functional programming and list processing
+traditions. We welcome contributions that fall within this scope.
+
+We also try to keep the API small to keep ``toolz`` manageable.  The ideal
+contribution is significantly different from existing functions and has
+precedent in a few other functional systems.
+
+Please take a look at our
+`issue page <https://github.com/pytoolz/toolz/issues>`__
+for contribution ideas.
+
+Community
+---------
+
+See our `mailing list <https://groups.google.com/forum/#!forum/pytoolz>`__.
+We're friendly.
+
+.. |Build Status| image:: https://travis-ci.org/pytoolz/toolz.svg?branch=master
+   :target: https://travis-ci.org/pytoolz/toolz
+.. |Coverage Status| image:: https://coveralls.io/repos/pytoolz/toolz/badge.svg?branch=master
+   :target: https://coveralls.io/r/pytoolz/toolz
+.. |Version Status| image:: https://badge.fury.io/py/toolz.svg
+   :target: http://badge.fury.io/py/toolz
+.. |Downloads| image:: https://img.shields.io/pypi/dm/toolz.svg
+   :target: https://pypi.python.org/pypi/toolz/
diff --git a/bench/test_curry.py b/bench/test_curry.py
new file mode 100644
index 0000000..62b72cb
--- /dev/null
+++ b/bench/test_curry.py
@@ -0,0 +1,10 @@
+from toolz.curried import get
+
+
+pairs = [(1, 2) for i in range(100000)]
+
+
+def test_get_curried():
+    first = get(0)
+    for p in pairs:
+        first(p)
diff --git a/bench/test_curry_baseline.py b/bench/test_curry_baseline.py
new file mode 100644
index 0000000..1ca0d11
--- /dev/null
+++ b/bench/test_curry_baseline.py
@@ -0,0 +1,11 @@
+from toolz import get
+from functools import partial
+
+
+pairs = [(1, 2) for i in range(100000)]
+
+
+def test_get():
+    first = partial(get, 0)
+    for p in pairs:
+        first(p)
diff --git a/bench/test_first.py b/bench/test_first.py
new file mode 100644
index 0000000..52dcc5c
--- /dev/null
+++ b/bench/test_first.py
@@ -0,0 +1,13 @@
+from toolz import first, second
+
+pairs = [(1, 2) for i in range(1000000)]
+
+
+def test_first():
+    for p in pairs:
+        first(p)
+
+
+def test_second():
+    for p in pairs:
+        second(p)
diff --git a/bench/test_first_iter.py b/bench/test_first_iter.py
new file mode 100644
index 0000000..ec21448
--- /dev/null
+++ b/bench/test_first_iter.py
@@ -0,0 +1,14 @@
+import itertools
+from toolz import first, second
+
+
+def test_first_iter():
+    iters = map(iter, [(1, 2) for i in range(1000000)])
+    for p in iters:
+        first(p)
+
+
+def test_second_iter():
+    iters = map(iter, [(1, 2) for i in range(1000000)])
+    for p in iters:
+        second(p)
diff --git a/bench/test_frequencies.py b/bench/test_frequencies.py
new file mode 100644
index 0000000..d6eda2d
--- /dev/null
+++ b/bench/test_frequencies.py
@@ -0,0 +1,14 @@
+from toolz import frequencies, identity
+
+
+big_data = list(range(1000)) * 1000
+small_data = list(range(100))
+
+
+def test_frequencies():
+    frequencies(big_data)
+
+
+def test_frequencies_small():
+    for i in range(1000):
+        frequencies(small_data)
diff --git a/bench/test_get.py b/bench/test_get.py
new file mode 100644
index 0000000..a0825dd
--- /dev/null
+++ b/bench/test_get.py
@@ -0,0 +1,8 @@
+from toolz import get
+
+tuples = [(1, 2, 3) for i in range(100000)]
+
+
+def test_get():
+    for tup in tuples:
+        get(1, tup)
diff --git a/bench/test_get_list.py b/bench/test_get_list.py
new file mode 100644
index 0000000..83d0bff
--- /dev/null
+++ b/bench/test_get_list.py
@@ -0,0 +1,8 @@
+from toolz import get
+
+tuples = [(1, 2, 3) for i in range(100000)]
+
+
+def test_get():
+    for tup in tuples:
+        get([1, 2], tup)
diff --git a/bench/test_groupby.py b/bench/test_groupby.py
new file mode 100644
index 0000000..5345b64
--- /dev/null
+++ b/bench/test_groupby.py
@@ -0,0 +1,8 @@
+from toolz import groupby, identity
+
+
+data = list(range(1000)) * 1000
+
+
+def test_groupby():
+    groupby(identity, data)
diff --git a/bench/test_join.py b/bench/test_join.py
new file mode 100644
index 0000000..e1ab03e
--- /dev/null
+++ b/bench/test_join.py
@@ -0,0 +1,35 @@
+from toolz.curried import *
+import random
+
+try:
+    xrange
+except NameError:
+    xrange = range
+
+def burn(seq):
+    for item in seq:
+        pass
+
+
+small = [(i, str(i)) for i in range(100)] * 10
+big = pipe([110]*10000, map(range), concat, list)
+
+
+def test_many_to_many_large():
+    burn(join(get(0), small, identity, big))
+
+
+def test_one_to_one_tiny():
+    A = list(range(20))
+    B = A[::2] + A[1::2][::-1]
+
+    for i in xrange(50000):
+        burn(join(identity, A, identity, B))
+
+
+def test_one_to_many():
+    A = list(range(20))
+    B = pipe([20]*1000, map(range), concat, list)
+
+    for i in xrange(100):
+        burn(join(identity, A, identity, B))
diff --git a/bench/test_memoize.py b/bench/test_memoize.py
new file mode 100644
index 0000000..e71c62b
--- /dev/null
+++ b/bench/test_memoize.py
@@ -0,0 +1,10 @@
+from toolz import memoize
+
+
+def test_memoize_no_kwargs():
+    @memoize
+    def f(x):
+        return x
+
+    for i in range(100000):
+        f(3)
diff --git a/bench/test_memoize_kwargs.py b/bench/test_memoize_kwargs.py
new file mode 100644
index 0000000..72728f6
--- /dev/null
+++ b/bench/test_memoize_kwargs.py
@@ -0,0 +1,10 @@
+from toolz import memoize
+
+
+def test_memoize_kwargs():
+    @memoize
+    def f(x, y=3):
+        return x
+
+    for i in range(100000):
+        f(3)
diff --git a/bench/test_pluck.py b/bench/test_pluck.py
new file mode 100644
index 0000000..8b82fb4
--- /dev/null
+++ b/bench/test_pluck.py
@@ -0,0 +1,12 @@
+from toolz import pluck
+
+tuples = [(1, 2, 3) for i in range(100000)]
+less_tuples = [(1, 2, 3) for i in range(100)]
+
+
+def test_pluck():
+    for i in pluck(2, tuples):
+        pass
+
+    for i in range(1000):
+        tuple(pluck(2, less_tuples))
diff --git a/bench/test_sliding_window.py b/bench/test_sliding_window.py
new file mode 100644
index 0000000..92c7234
--- /dev/null
+++ b/bench/test_sliding_window.py
@@ -0,0 +1,7 @@
+from toolz import sliding_window
+
+seq = range(1000000)
+
+
+def test_sliding_window():
+    list(sliding_window(3, seq))
diff --git a/bench/test_wordcount.py b/bench/test_wordcount.py
new file mode 100644
index 0000000..cb49fc6
--- /dev/null
+++ b/bench/test_wordcount.py
@@ -0,0 +1,18 @@
+from toolz.curried import *
+import os
+
+if not os.path.exists('bench/shakespeare.txt'):
+    os.system('wget http://www.gutenberg.org/ebooks/100.txt.utf-8'
+              ' -O bench/shakespeare.txt')
+
+
+def stem(word):
+    """ Stem word to primitive form """
+    return word.lower().rstrip(",.!:;'-\"").lstrip("'\"")
+
+wordcount = comp(frequencies, map(stem), concat, map(str.split))
+
+
+def test_shakespeare():
+    with open('bench/shakespeare.txt') as f:
+        counts = wordcount(f)
diff --git a/conda.recipe/bld.bat b/conda.recipe/bld.bat
new file mode 100644
index 0000000..a8cb1eb
--- /dev/null
+++ b/conda.recipe/bld.bat
@@ -0,0 +1,2 @@
+cd %RECIPE_DIR%\..
+%PYTHON% setup.py install
diff --git a/conda.recipe/build.sh b/conda.recipe/build.sh
new file mode 100644
index 0000000..abebc13
--- /dev/null
+++ b/conda.recipe/build.sh
@@ -0,0 +1,2 @@
+cd $RECIPE_DIR/..
+$PYTHON setup.py install
diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml
new file mode 100644
index 0000000..51bbf1f
--- /dev/null
+++ b/conda.recipe/meta.yaml
@@ -0,0 +1,26 @@
+package:
+    name: toolz
+    version: "0.8.0"
+
+build:
+    number: {{environ.get('BINSTAR_BUILD', 1)}}
+
+requirements:
+    build:
+      - setuptools
+      - python
+
+    run:
+      - python
+
+test:
+    requires:
+      - pytest
+    imports:
+      - toolz
+    commands:
+      - py.test -x --doctest-modules --pyargs toolz
+
+about:
+    home: http://toolz.readthedocs.org/
+    license: BSD
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..aad2215
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,153 @@
+# 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) source
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+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 "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@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/Toolz.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Toolz.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/Toolz"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Toolz"
+	@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."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+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/doc/make.bat b/doc/make.bat
new file mode 100644
index 0000000..7016e3b
--- /dev/null
+++ b/doc/make.bat
@@ -0,0 +1,190 @@
+ at ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+	set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
+set I18NSPHINXOPTS=%SPHINXOPTS% source
+if NOT "%PAPER%" == "" (
+	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+	: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.  text       to make text files
+	echo.  man        to make manual pages
+	echo.  texinfo    to make Texinfo files
+	echo.  gettext    to make PO message catalogs
+	echo.  changes    to make an overview over 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
+	goto end
+)
+
+if "%1" == "clean" (
+	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+	del /q /s %BUILDDIR%\*
+	goto end
+)
+
+if "%1" == "html" (
+	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+	goto end
+)
+
+if "%1" == "dirhtml" (
+	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+	goto end
+)
+
+if "%1" == "singlehtml" (
+	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+	goto end
+)
+
+if "%1" == "pickle" (
+	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the pickle files.
+	goto end
+)
+
+if "%1" == "json" (
+	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the JSON files.
+	goto end
+)
+
+if "%1" == "htmlhelp" (
+	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+	goto end
+)
+
+if "%1" == "qthelp" (
+	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Toolz.qhcp
+	echo.To view the help file:
+	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Toolz.ghc
+	goto end
+)
+
+if "%1" == "devhelp" (
+	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished.
+	goto end
+)
+
+if "%1" == "epub" (
+	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The epub file is in %BUILDDIR%/epub.
+	goto end
+)
+
+if "%1" == "latex" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "text" (
+	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
... 7987 lines suppressed ...

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



More information about the Python-modules-commits mailing list