Skip to content

Commit

Permalink
Initial documentation push.
Browse files Browse the repository at this point in the history
  • Loading branch information
blakev committed Oct 19, 2017
1 parent 6421f38 commit 404cb40
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 18 deletions.
6 changes: 5 additions & 1 deletion README.md
@@ -1,10 +1,14 @@
# gevent-tasks

[![pypi](https://img.shields.io/pypi/v/gevent-tasks.svg?style=flat)](https://pypi.python.org/pypi/gevent-tasks)
[![docs](https://readthedocs.org/projects/gevent-tasks/badge/?version=latest)](http://gevent-tasks.readthedocs.io/en/latest/)
[![MIT License](https://img.shields.io/github/license/blakev/gevent-tasks.svg?style=flat)](https://github.com/blakev/gevent-tasks/blob/master/LICENSE)


Task manager built around the gevent green threads library.
Background task manager using Gevent and Green threads.

- Check out [the documentation](http://gevent-tasks.readthedocs.io/en/latest/).
- Learn about [Gevent]().

This library is designed to allow a developer to run arbitrary "tasks" as background
threads on a fixed/normalized interval. Each task is a wrapped
Expand Down
26 changes: 23 additions & 3 deletions docs/conf.py
Expand Up @@ -28,10 +28,25 @@
#
# needs_sphinx = '1.0'

import os
import re
import sys

ATTRIBUTES = re.compile(r"^__(\w+)__\s+=\s+'(.*?)'$", re.S + re.M)

root_folder = os.path.join(os.path.dirname(__name__), '..')
sys.path.append(root_folder)

with open(os.path.join(root_folder, 'gevent_tasks', '__init__.py')) as ins_file:
text = ins_file.read()
attrs = ATTRIBUTES.findall(text)
A = dict(attrs)

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
'sphinx.ext.viewcode']
Expand All @@ -58,9 +73,9 @@
# built documents.
#
# The short X.Y version.
version = '0.1.5'
version = A['version']
# The full version, including alpha/beta/rc tags.
release = '0.1.5'
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -172,4 +187,9 @@
]

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {
'https://docs.python.org/': None,
'gevent': ('http://www.gevent.org/', None)
}

autoclass_content = 'both'
71 changes: 57 additions & 14 deletions docs/index.rst
@@ -1,20 +1,63 @@
.. gevent-tasks documentation master file, created by
sphinx-quickstart on Thu Oct 19 15:47:06 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
gevent-tasks
============

Welcome to gevent-tasks's documentation!
========================================
Background task manager using Gevent and Green threads.

.. toctree::
:maxdepth: 2
:caption: Contents:
Reference
---------

- `Task`_
- `Task Timing`_
- `TaskManager`_
- `TaskPool`_

Task
----

Indices and tables
==================
.. autoclass:: gevent_tasks.tasks.Task
:members:

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Task Timing
-----------

.. autoclass:: gevent_tasks.tasks.Timing
:members:


TaskManager
-----------

.. autoclass:: gevent_tasks.manager.TaskManager
:members:

TaskPool
--------

.. autoclass:: gevent_tasks.tasks.TaskPool
:members:


License
-------

MIT License

Copyright (c) 2017 Blake VandeMerwe

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.

0 comments on commit 404cb40

Please sign in to comment.