Skip to content

Commit

Permalink
Updated contribution docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Feb 3, 2016
1 parent 6b19688 commit 36f3b15
Showing 1 changed file with 47 additions and 23 deletions.
70 changes: 47 additions & 23 deletions docs/internals/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,62 @@ If you experience problems with VOC, `log them on GitHub`_. If you want to contr
Setting up your development environment
---------------------------------------

The recommended way of setting up your development envrionment for VOC
is to install a virtual environment, install the required dependencies and
start coding. Assuming that you are using ``virtualenvwrapper``, you only have
to run::
The process of setting up a development environment is very similar to
the :doc:`/intro/getting-started` process. The biggest difference is that
instead of using the official PyBee repository, you'll be using your own
Github fork .

$ git clone [email protected]:pybee/voc.git
$ cd voc
$ mkvirtualenv voc
# or if you use python2 by default
# mkvirtualenv -p /usr/bin/python3 voc
As with the getting started guide, these instructions will assume that you
have Python3, a Java 7 or Java 8 JDK, and Apache ANT installed, and have virtualenv available for use.

Start by forking VOC into your own Github repository; then
check out your fork to your own computer into a development directory:

.. code-block:: bash
$ mkdir voc-dev
$ cd voc-dev
$ git clone [email protected]:<your github username>/voc.git
VOC uses ``unittest`` for its own test
suite as well as additional helper modules for testing. To install all the
requirements for VOC, you have to run the following commands within your
virutal envrionment::
Then create a virtual environment and install VOC into it:

.. code-block:: bash
$ virtualenv -p $(which python3) env
$ . env/bin/activate
$ pip install -e .
Now you are ready to start hacking! Have fun!
You're now ready to run the test suite!

Running the test suite
----------------------

To run the entire test suite, type:

.. code-block:: bash
$ cd voc
$ python setup.py test
This will take quite a while - it takes 40 minutes on the CI server. If you just want to run a single test, or a single group of tests, you can provide command-line arguments.

To run a single test, provide the full dotted-path to the test:

.. code-block:: bash
$ python setup.py test -s tests.datatypes.test_str.BinaryStrOperationTests.test_add_bool
To run a full test case, do the same, but stop at the test case name:

Java
----
.. code-block:: bash
Java 7 is needed to run the tests because Java 8 removed the option
$ python setup.py test -s tests.datatypes.test_str.BinaryStrOperationTests
-XX:-UseSplitVerifier
Or, to run all the Str datatype tests:

You *can* use Java 8 if you have to. In that case go into the
tests/utils.py and edit replace::
$ python setup.py test -s tests.datatypes.test_str

-XX:-UseSplitVerifier
Or, to run all the datatypes tests:

with::
$ python setup.py test -s tests.datatypes

-noverify

0 comments on commit 36f3b15

Please sign in to comment.