forked from beeware/voc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request beeware#82 from freakboy3742/master
Updated contribution docs.
- Loading branch information
Showing
2 changed files
with
51 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |