1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
==========================
Contributing to jsonpickle
==========================
We welcome contributions from everyone. Please fork jsonpickle on
`github <http://github.com/jsonpickle/jsonpickle>`_.
Get the Code
============
.. _jsonpickle-contrib-checkout:
::
git clone https://github.com/jsonpickle/jsonpickle.git
Run the Test Suite
==================
All tests should pass before before code is merged into the main repository.
If you are contributing an addition or a change in behavior, we ask that you
document the change in the form of test cases.
.. _tox: https://tox.readthedocs.io/
The test suite is most readily run with the `tox`_ testing tool.
Once installed, run the test suite against the default Python::
tox
It is recommended that you install at least one Python2 and one Python3
interpreter for use by tox_. To test against Python 2.7 and 3.7::
tox -e py27,py37
The jsonpickle test suite uses several JSON encoding libraries as well as
several libraries for sample objects. To create an environment to test
against these libs::
tox -e libs
To test against these libs on Python 3.7::
tox -e py37-libs
To create the environment without running tests::
tox -e libs --notest
Now you may experiment and interact with jsonpickle under development
from the virtualenv at ``.tox/libs/{bin/Scripts}/python``.
Generate Documentation
======================
Generating the documentation_ is not necessary when contributing.
To build the docs::
tox -e docs
Now docs are available in ``build/html``.
If you wish to browse the documentation, use Python's :mod:`http.server`
to host them at http://localhost:8000::
python -m http.server -d build/html
.. _documentation: http://jsonpickle.github.com
.. _Sphinx: http://sphinx.pocoo.org
|