Skip to content

Commit

Permalink
Update documentation.
Browse files Browse the repository at this point in the history
Add more information about getting the source code and running tests.
Also add more details about Pyzor dependecies and installation
procedure.
  • Loading branch information
alexkiro committed Jul 12, 2014
1 parent 0a0267c commit e5f29d7
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 12 deletions.
48 changes: 40 additions & 8 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Installation
Getting Pyzor
==============

Easiest way to install Pyzor is with pip::
Installing
-----------
The recommended and easiest way to install Pyzor is with ``pip``::

pip install pyzor

You can also download the latest or older version from
`PyPI <https://pypi.python.org/pypi/pyzor/>`_, and extract and
install manually::

python setup.py install
In order to upgrade your Pyzor version run::
pip install --upgrade pyzor

.. note::

Expand All @@ -18,3 +18,35 @@ install manually::
The Pyzor code will also work on Python3, but requires refactoring done with
the 2to3 tool. This has been integrated in the setup, so installation in
Python3 now works seamlessly with any method described above.

Downloading
------------

If you don't want to or cannot use ``pip`` to download and install Pyzor. You
can do so directly from the source::

python setup.py install
You can find the latest and older versions of Pyzor on
`PyPI <https://pypi.python.org/pypi/pyzor>`_.

Dependencies
-------------

Pyzor Client
^^^^^^^^^^^^^

If you plan on only using Pyzor to check message against our public server,
then there are no required dependencies.

Pyzor Server
^^^^^^^^^^^^^

If you want to host your own Pyzor Server then you will need an appropriate
back-end engine. Depending on what engine you want to use you will also need
to install the required python dependecies. Please see :ref:`server-engines`
for more details.

The Pyzor also support the `gevent library <http://www.gevent.org/>`_. If you
want to use this feature then you will need to first install it.

41 changes: 41 additions & 0 deletions docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,47 @@ Contribute
- `Issue Tracker <http://github.com/SpamExperts/pyzor/issues>`_
- `Source Code <http://github.com/SpamExperts/pyzor>`_

Getting the source
------------------

To clone the repository using git simply run::

git clone https://github.com/SpamExperts/pyzor

Please feel free to `fork us <https://github.com/SpamExperts/pyzor/fork>`_
and submit your pull requests.

Running tests
-------------

The pyzor tests are split into *unittest* and *functional* tests.

*Unitests* perform checks against the current source code and **not**
the installed version of pyzor. To run all the unittests suite::

env PYTHONPATH=. python tests/unit/__init__.py

*Functional* tests perform checks against the installed version of
pyzor and **not** the current source code. These are more extensive
and generally take longer to run. They also might need special setup.
To run the full suite of functional tests::

env PYTHONPATH=. python tests/functional/__init__.py

There is also a `helper script <https://github.com/SpamExperts/
pyzor/blob/master/scripts/run_tests>`_ available that sets-up
the testing enviroment, also taking into consideration the python
version you are currently using::

./scripts/run_tests

.. note::

The authentication details for the MySQL functional tests are taken from
the `test.conf <https://github.com/SpamExperts/pyzor/blob/master/
test.conf>`_ file.


License
-------

Expand Down
3 changes: 0 additions & 3 deletions pyzor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,3 @@ class AuthorizationError(CommError):
"""The signature was valid, but the user is not permitted to do the
requested action."""
pass



1 change: 0 additions & 1 deletion pyzor/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ def __init__(self, accounts=None, timeout=None, spec=None, batch_size=10):
self.batch_size = batch_size
self.flush()


def report(self, digest, address=("public.pyzor.org", 24441)):
self._add_digest(digest, address, self.r_requests)

Expand Down

0 comments on commit e5f29d7

Please sign in to comment.