You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/contributing.rst
+46-18Lines changed: 46 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,39 +4,67 @@ Contributing
4
4
Want to contribute back to Sentry? This page describes the general development flow,
5
5
our philosophy, the test suite, and issue tracking.
6
6
7
-
(Though it actually doesn't describe all of that, yet)
7
+
There are many ways to you can help, either by submitting bug reports, improving the
8
+
documentation, or submitting a patch. This document describes how to get the
9
+
test suite running for the Python SDK.
8
10
9
11
Setting up an Environment
10
12
-------------------------
11
13
12
-
Sentry is designed to run off of setuptools with minimal work. Because of this
13
-
setting up a development environment requires only a few steps.
14
+
There are several ways of setting up a development environment. If you want to ensure
15
+
your changes work across all environments and integrations that Raven supports,
16
+
the easiest way to run one or more jobs from test suite matrix is using a virtualenv
17
+
management and test command line tool called `Tox`_,
14
18
15
-
The first thing you're going to want to do, is build a virtualenv and install
16
-
any base dependancies.
19
+
It is also recommended to have the Python versions you are targeting installed on your
20
+
system. There are several tools that help you manage several Python installations,
21
+
like `Pyenv`_ or `Pythonz`_, but you can also install them manually by downloading them
22
+
from the Python.org website or installing them from repositories depending on your
23
+
operating system.
17
24
18
-
::
25
+
Once you have the Python versions you are going to work with, you have to install `Tox`.
26
+
The easiest way of installing `Tox` is by running `pip install tox` into your
27
+
default Python installation.
19
28
20
-
virtualenv ~/.virtualenvs/raven
21
-
source ~/.virtualenvs/raven/bin/activate
22
-
make
29
+
Running the tests
30
+
-----------------
23
31
24
-
That's it :)
32
+
Running the tests is easy: just run `tox` from the command line and it will take care of
33
+
creating all the necessary virtualenvs and running all the environments defined in the `tox.ini`
34
+
file.
25
35
26
-
Running the Test Suite
27
-
----------------------
36
+
During development you might want to run only a certain environment, which can be done by
37
+
passing the `-e ENV` to tox, for example:
28
38
29
-
The test suite is also powered off of py.test, and can be run in a number of ways. Usually though,
30
-
you'll just want to use our helper method to make things easy:
39
+
.. code-block:: bash
31
40
32
-
::
41
+
$ tox -e py35-django19
33
42
34
-
make test
43
+
which would run the Python3.5 environment and the Django integration tests with Django 1.9.
44
+
You can list all the defined environments with `tox --listenvs`, or fall into the Python debugger
45
+
on any raised exception by using `tox --pdb`. Please refer to the Tox Documentation for additional
46
+
information.
35
47
36
48
37
49
Contributing Back Code
38
50
----------------------
39
51
40
-
Ideally all patches should be sent as a pull request on GitHub, and include tests. If you're fixing a bug or making a large change the patch **must** include test coverage.
52
+
Ideally all patches should be sent as a pull request on GitHub, and include tests.
53
+
If you're fixing a bug or making a large change the patch **must** include test coverage.
54
+
55
+
You can see a list of open pull requests (pending changes) by visiting our `Github Pull Request` page.
56
+
Every pull requests triggers a test build on our Travis CI where you can verify that
57
+
all tests pass.
58
+
59
+
Notes
60
+
-----
61
+
62
+
In order to use Pyenv with Tox, create a `.python-version` file similar to the
63
+
`.python-version-example` in the project root.
64
+
41
65
42
-
You can see a list of open pull requests (pending changes) by visiting https://github.com/getsentry/raven-python/pulls
0 commit comments