Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Commit

Permalink
Move documentation to readthedocs.org
Browse files Browse the repository at this point in the history
  • Loading branch information
Wouter de Bie committed Sep 24, 2015
1 parent 41fd330 commit 2bedb36
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 36 deletions.
11 changes: 5 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,13 @@ To install snakebite 2.x run:

pip install snakebite



To install snakebite 2.x with Kerberos/SASL support, make sure you can install python-krbV (https://fedorahosted.org/python-krbV/) and then run:

pip install "snakebite[kerberos]"



Documentation
*************
More information and documentation can be found at http://spotify.github.io/snakebite/
More information and documentation can be found at http://snakebite.readthedocs.org/en/latest/

Development
***********
Expand All @@ -50,6 +46,9 @@ Make sure to read about development `here <http://spotify.github.io/snakebite/de
Travis CI status
****************

.. image:: https://api.travis-ci.org/spotify/snakebite.png
|Travis|_

.. |Travis| image:: https://api.travis-ci.org/spotify/snakebite.png
.. _Travis: https://travis-ci.org/spotify/snakebite

Copyright 2013-2014 Spotify AB
13 changes: 7 additions & 6 deletions doc/source/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ Last two methods of providing config for snakebite is through hadoop config file
If ``HADOOP_HOME`` environment variable is set, snakebite will try to find ``core-site.xml``
and/or ``hdfs-site.xml`` files in ``$HADOOP_HOME`` directory. If ``HADOOP_HOME`` is not set,
snakebite will try to find those files in a couple of default hadoop config locations:
* /etc/hadoop/conf/core-site.xml
* /usr/local/etc/hadoop/conf/core-site.xml
* /usr/local/hadoop/conf/core-site.xml
* /etc/hadoop/conf/hdfs-site.xml
* /usr/local/etc/hadoop/conf/hdfs-site.xml
* /usr/local/hadoop/conf/hdfs-site.xml

* /etc/hadoop/conf/core-site.xml
* /usr/local/etc/hadoop/conf/core-site.xml
* /usr/local/hadoop/conf/core-site.xml
* /etc/hadoop/conf/hdfs-site.xml
* /usr/local/etc/hadoop/conf/hdfs-site.xml
* /usr/local/hadoop/conf/hdfs-site.xml

Bash completion
===============
Expand Down
2 changes: 1 addition & 1 deletion doc/source/client.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
**************
Client library
**************
.. automodule:: client
.. automodule:: snakebite.client

.. autoclass:: Client
:members:
Expand Down
7 changes: 5 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@
import sys
import os

import sphinx_rtd_theme
source_path = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + '../../../')
sys.path.append(source_path)

import sphinx_rtd_theme
import snakebite.version

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../../snakebite'))



# -- General configuration -----------------------------------------------------

Expand Down
11 changes: 5 additions & 6 deletions doc/source/development.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
***********
Development
***********

How to start
============

Expand All @@ -11,20 +10,20 @@ it's not required to but highly recommended. To install, and create development
environment for snakebite:

1. install virtualenvwrapper:
``$ pip install virtualenvwrapper``
``$ pip install virtualenvwrapper``
2. create development environment:
``$ mkvirtualenv snakebite_dev``
``$ mkvirtualenv snakebite_dev``

More about virtualenvwrapper and virtualenv `here <http://virtualenvwrapper.readthedocs.org/en/latest/>`_

Below is the list of recommended steps to start development:

1. clone repo:
``$ git clone git@github.com:spotify/snakebite.git``
``$ git clone git@github.com:spotify/snakebite.git``
2. fetch all developer requirements:
``$ pip install -r requirements-dev.txt``
``$ pip install -r requirements-dev.txt``
3. run tests:
``$ python setup.py test``
``$ python setup.py test``

If tests succeeded you are ready to hack! Remember to always test
your changes and please come back with a PR <3
Expand Down
2 changes: 1 addition & 1 deletion doc/source/minicluster.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
***********
Minicluster
***********
.. automodule:: minicluster
.. automodule:: snakebite.minicluster

.. autoclass:: MiniCluster
:members:
24 changes: 12 additions & 12 deletions doc/source/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ performance overhead - but it's not a problem (yet).
Snakebite by default uses `nose <https://nose.readthedocs.org/en/latest/>`_
and `tox <https://tox.readthedocs.org/en/latest/>`_ for testing. Tests
are integrated with `setup.py`, so to start tests one can simply:
``$ python setup.py test``
``$ python setup.py test``

Because we require minicluster to fully test snakebite,
java needs to be present on the system.
Expand All @@ -39,7 +39,7 @@ We bootstrap environment with ``pip install -r requirements-dev.txt`` (deps sect
And then we setup environment via ``/scripts/ci/setup_env.sh`` script.
``setup_env.sh`` script downloads hadoop distribution tar, and extracts it.
Help for ``setup_env.sh``::
Setup environment for snakebite tests
Setup environment for snakebite tests

options:
-h, --help show brief help
Expand Down Expand Up @@ -80,12 +80,12 @@ fresh and isolated test environments using Docker.
Currently we use base testing image ``ravwojdyla/snakebite_test:base``,
it was created using ``/scripts/build-base-test-docker.sh`` and
``/scripts/Dockerfile``. Base test image is a Ubuntu Trusty with:
* oracle java 7
* python 2.6
* python 2.7
* pip
* CDH distribution
* HDP distribution
* oracle java 7
* python 2.6
* python 2.7
* pip
* CDH distribution
* HDP distribution

Base docker image doesn't change, to create new test image with
current working tree, based on ``ravwojdyla/snakebite_test:base``:
Expand All @@ -95,10 +95,10 @@ current working tree, based on ``ravwojdyla/snakebite_test:base``:
Fig will create new image based on ``ravwojdyla/snakebite_test:base``,
with current working tree, that can be used for tests.
Fig currently specifies 4 tests:
* ``testPy26cdh``: python 2.6 + CDH
* ``testPy26hdp``: python 2.6 + HDP
* ``testPy27cdh``: python 2.7 + CDH
* ``testPy27hdp``: python 2.7 + HDP
* ``testPy26cdh``: python 2.6 + CDH
* ``testPy26hdp``: python 2.6 + HDP
* ``testPy27cdh``: python 2.7 + CDH
* ``testPy27hdp``: python 2.7 + HDP

To run specific test (eg. testPy26cdh):

Expand Down
4 changes: 2 additions & 2 deletions snakebite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,13 +1017,13 @@ def serverdefaults(self, force_reload=False):
:param force_reload: Should the server defaults be reloaded even if they already exist?
:type force_reload: bool
:returns: dictionary with the following keys: blockSize, bytesPerChecksum, writePacketSize, replication,
fileBufferSize, encryptDataTransfer, trashInterval, checksumType
:returns: dictionary with the following keys: blockSize, bytesPerChecksum, writePacketSize, replication, fileBufferSize, encryptDataTransfer, trashInterval, checksumType
**Example:**
>>> client.serverdefaults()
[{'writePacketSize': 65536, 'fileBufferSize': 4096, 'replication': 1, 'bytesPerChecksum': 512, 'trashInterval': 0L, 'blockSize': 134217728L, 'encryptDataTransfer': False, 'checksumType': 2}]
'''

if not self._server_defaults or force_reload:
Expand Down

0 comments on commit 2bedb36

Please sign in to comment.