2014-04-24 18:20:23 +02:00
|
|
|
Contributing to HTTPie
|
|
|
|
######################
|
|
|
|
|
|
|
|
Bug reports and code and documentation patches are greatly appretiated. You can
|
|
|
|
also help by using the development version of HTTPie and reporting any bugs you
|
|
|
|
might encounter.
|
|
|
|
|
|
|
|
Bug Reports
|
|
|
|
===========
|
|
|
|
|
2014-05-09 13:48:34 +02:00
|
|
|
**It's important that you provide the full command argument list
|
|
|
|
as well as the output of the failing command.**
|
2014-05-09 13:46:33 +02:00
|
|
|
Use the ``--debug`` flag and copy&paste both the command and its output
|
|
|
|
to your bug report, e.g.:
|
2014-04-24 18:20:23 +02:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-05-09 13:46:33 +02:00
|
|
|
$ http --debug [arguments that trigger the error]
|
|
|
|
[complete output]
|
2014-04-24 18:20:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
Contributing Code and Documentation
|
|
|
|
===================================
|
|
|
|
|
|
|
|
Before working on a new feature or a bug, please browse `existing issues`_
|
|
|
|
to see whether it has been previously discussed. If the change in question
|
|
|
|
is a bigger one, it's always good to discuss before your starting working on
|
|
|
|
it.
|
|
|
|
|
|
|
|
|
|
|
|
Development Environment
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
git clone https://github.com/<YOU>/httpie
|
|
|
|
|
|
|
|
cd httpie
|
|
|
|
|
|
|
|
git checkout -b my_topical_branch
|
|
|
|
|
|
|
|
# (Recommended: create a new virtualenv)
|
|
|
|
|
2014-04-28 13:25:45 +02:00
|
|
|
# Install dev. requirements and also HTTPie (in editable mode
|
|
|
|
# so that the `http' command will point to your working copy):
|
|
|
|
make
|
2014-04-24 18:20:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
Making Changes
|
|
|
|
--------------
|
|
|
|
|
|
|
|
Please make sure your changes conform to `Style Guide for Python Code`_ (PEP8).
|
|
|
|
|
|
|
|
|
|
|
|
Tests
|
|
|
|
-----
|
|
|
|
|
|
|
|
Before opening a pull requests, please make sure the `test suite`_ passes
|
|
|
|
in all of the `supported Python environments`_. You should also **add tests
|
|
|
|
for any new features and bug fixes**.
|
|
|
|
|
|
|
|
HTTPie uses `pytest`_ and `Tox`_.
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-04-24 21:36:03 +02:00
|
|
|
### Running all tests:
|
|
|
|
|
|
|
|
# Current Python
|
2014-04-28 13:25:45 +02:00
|
|
|
make test
|
|
|
|
|
|
|
|
# Current Python with coverage
|
|
|
|
make test-cover
|
2014-04-24 18:20:23 +02:00
|
|
|
|
2014-04-28 13:25:45 +02:00
|
|
|
# All the supported and available Pythons via Tox
|
|
|
|
make test-tox
|
2014-04-24 18:20:23 +02:00
|
|
|
|
2014-04-24 21:36:03 +02:00
|
|
|
### Running specific tests:
|
|
|
|
|
|
|
|
# Current Python
|
2014-04-24 18:20:23 +02:00
|
|
|
pytest tests/test_uploads.py
|
|
|
|
|
2014-04-24 21:36:03 +02:00
|
|
|
# All Pythons
|
|
|
|
tox -- tests/test_uploads.py --verbose
|
|
|
|
|
2014-04-24 18:20:23 +02:00
|
|
|
|
|
|
|
Don't forget to add yourself to `AUTHORS.rst`_.
|
|
|
|
|
|
|
|
|
|
|
|
.. _Tox: http://tox.testrun.org
|
2015-07-03 18:55:45 +02:00
|
|
|
.. _supported Python environments: https://github.com/jkbrzt/httpie/blob/master/tox.ini
|
|
|
|
.. _existing issues: https://github.com/jkbrzt/httpie/issues?state=open
|
|
|
|
.. _AUTHORS.rst: https://github.com/jkbrzt/httpie/blob/master/AUTHORS.rst
|
2014-04-24 18:20:23 +02:00
|
|
|
.. _pytest: http://pytest.org/
|
|
|
|
.. _Style Guide for Python Code: http://python.org/dev/peps/pep-0008/
|
2015-07-03 18:55:45 +02:00
|
|
|
.. _test suite: https://github.com/jkbrzt/httpie/tree/master/tests
|