Navigation Menu

Skip to content

Commit

Permalink
added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed Mar 12, 2012
1 parent acd7f62 commit 890e55b
Show file tree
Hide file tree
Showing 35 changed files with 3,057 additions and 7 deletions.
2 changes: 1 addition & 1 deletion django_statsd/celery.py
Expand Up @@ -19,5 +19,5 @@ def clear(**kwargs):
task_failure.connect(clear)

except ImportError:
raise
pass

29 changes: 29 additions & 0 deletions django_statsd/json.py
@@ -0,0 +1,29 @@
from __future__ import absolute_import
import django_statsd

try:
import json

# NOTE issubclass is true if both are the same class
if not hasattr(json, 'statsd_patched'):
json.statsd_patched = True
json.load = django_statsd.wrapper('json', json.load)
json.loads = django_statsd.wrapper('json', json.loads)
json.dump = django_statsd.wrapper('json', json.dump)
json.dumps = django_statsd.wrapper('json', json.dumps)
except ImportError:
print 'no json'
pass

try:
import cjson

# NOTE issubclass is true if both are the same class
if not hasattr(json, 'statsd_patched'):
cjson.statsd_patched = True
cjson.encode = django_statsd.wrapper('cjson', cjson.encode)
cjson.decode = django_statsd.wrapper('cjson', cjson.decode)
except ImportError:
print 'no cjson'
pass

89 changes: 89 additions & 0 deletions docs/Makefile
@@ -0,0 +1,89 @@
# 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 pickle json htmlhelp qthelp latex 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 " 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 " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@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."

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/PythonStatsd.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PythonStatsd.qhc"

latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."

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."
Binary file added docs/build/doctrees/django_statsd.doctree
Binary file not shown.
Binary file added docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/build/doctrees/usage.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/build/html/.buildinfo
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 7fa3ca04e5862e46bcdba142f928f512
tags: fbb0d17656682115ca4d033fb2f83ba1
23 changes: 23 additions & 0 deletions docs/build/html/_sources/django_statsd.txt
@@ -0,0 +1,23 @@
django_statsd
==============

.. automodule:: django_statsd
:members:
:undoc-members:

.. automodule:: django_statsd.middleware
:members:
:undoc-members:

.. automodule:: django_statsd.json
:members:
:undoc-members:

.. automodule:: django_statsd.redis
:members:
:undoc-members:

.. automodule:: django_statsd.celery
:members:
:undoc-members:

18 changes: 18 additions & 0 deletions docs/build/html/_sources/index.txt
@@ -0,0 +1,18 @@
Python Statsd Client
=========================================

Contents:

.. toctree::
:maxdepth: 2

usage

django_statsd

Indices and tables
==================

* :ref:`genindex`
* :ref:`search`

3 changes: 3 additions & 0 deletions docs/build/html/_sources/usage.txt
@@ -0,0 +1,3 @@

.. include :: ../README.rst

0 comments on commit 890e55b

Please sign in to comment.