Skip to content

Commit

Permalink
Reorganize docs. Move almost everything out of the readme.
Browse files Browse the repository at this point in the history
Rewrite intro. Add Conditions for Contributors.
  • Loading branch information
erikrose committed Jun 26, 2012
1 parent aae7359 commit 1e5c4e4
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 31 deletions.
31 changes: 8 additions & 23 deletions README.rst
Expand Up @@ -3,35 +3,20 @@ More Itertools
==============

I love itertools; it's one of the most beautiful, composable standard libs.
"Aha! I have an iteration problem here; I'm sure there is an itertools routine
that fits it perfectly" oft passes my lips. My confidence is typically
well-placed, but sometimes, neither itertools nor the recipes included in its
docs do quite what I need.
Whenever I have an iteration problem, there's almost always an itertools
routine that fits it perfectly. Sometimes, however, neither itertools nor the
recipes included in its docs do quite what I need.

Here I've collected several routines I've reached for but not found. Since
these are deceptively tricky to get right, I thought I'd wrap them up into a
they are deceptively tricky to get right, I thought I'd wrap them up into a
library. Enjoy! Any additions are welcome; just file a pull request.


License
=======
Full Documentation
==================

More Itertools is under the MIT License. See the LICENSE file.


Run the tests
=============

This uses nose for tests. First, install nose::

pip install nose

Then, run the tests like this::

nosetests

It should also be possible to say ``python setup.py test``. However, some part
of the test runner throws an error after the tests pass.
Please see http://packages.python.org/more-itertools/api.html for the list of
routines.


Version History
Expand Down
10 changes: 10 additions & 0 deletions docs/api.rst
@@ -0,0 +1,10 @@
=============
API Reference
=============

.. automodule:: more_itertools

.. autofunction:: first(iterable[, default])
.. autofunction:: chunked
.. autofunction:: collate(*iterables, key=lambda a: a, reverse=False)
.. autoclass:: peekable
30 changes: 22 additions & 8 deletions docs/index.rst
@@ -1,10 +1,24 @@
========================
more-itertools functions
========================
==============
More Itertools
==============

.. automodule:: more_itertools
I love itertools; it's one of the most beautiful, composable standard libs.
Whenever I have an iteration problem, there's almost always an itertools
routine that fits it perfectly. Sometimes, however, neither itertools nor the
recipes included in its docs do quite what I need.

.. autofunction:: first(iterable[, default])
.. autofunction:: chunked
.. autofunction:: collate(*iterables, key=lambda a: a, reverse=False)
.. autoclass:: peekable
Here I've collected several routines I've reached for but not found. Since
they are deceptively tricky to get right, I thought I'd wrap them up into a
library. Enjoy! Any additions are welcome; just file a pull request.


Contents
========

.. toctree::
:maxdepth: 2

api
license
testing
versions
16 changes: 16 additions & 0 deletions docs/license.rst
@@ -0,0 +1,16 @@
=======
License
=======

more-itertools is under the MIT License. See the LICENSE file.

Conditions for Contributors
===========================

By contributing to this software project, you are agreeing to the following
terms and conditions for your contributions: First, you agree your
contributions are submitted under the BSD license. Second, you represent you
are authorized to make the contributions and grant the license. If your
employer has rights to intellectual property that includes your contributions,
you represent that you have received permission to make contributions and grant
the required license on behalf of that employer.
14 changes: 14 additions & 0 deletions docs/testing.rst
@@ -0,0 +1,14 @@
=======
Testing
=======

more-itertools uses nose for its tests. First, install nose::

pip install nose

Then, run the tests like this::

nosetests

It should also be possible to say ``python setup.py test``. However, some part
of the test runner throws an error after the tests pass.
12 changes: 12 additions & 0 deletions docs/versions.rst
@@ -0,0 +1,12 @@
===============
Version History
===============

1.1
* Added ``first`` function.
* Added Python 3 support.
* Rewrote documentation.

1.0
* Initial release, with ``collate``, ``peekable``, and ``chunked``. Could
really use better docs.

0 comments on commit 1e5c4e4

Please sign in to comment.