|
1 | | -If submitting any patch, please verify that no new pylint or pep8 violations |
2 | | -are introduced: |
| 1 | +Hackers Guide |
| 2 | +============= |
3 | 3 |
|
4 | | - python setup.py pylint |
| 4 | +1. Setting up the environment |
| 5 | +----------------------------- |
| 6 | +To start development, you can set-up/activate a virtual environment by using the |
| 7 | +following command: |
| 8 | + source contrib/activate-dev-env [python2|python3] |
5 | 9 |
|
6 | | -And ensure that the basic unit test suite does not regress |
| 10 | +Note: Providing no arguments will attempt to use python2. |
7 | 11 |
|
8 | | - python setup.py test |
| 12 | +# Manually activating an environment |
| 13 | + source dev-env-${NAME}/bin/activate |
9 | 14 |
|
| 15 | +2. Running tests |
| 16 | +---------------- |
| 17 | +Once you have already activated an environment, you can use the following. |
| 18 | + |
| 19 | +# Basic unit test suite |
| 20 | + python setup.py test |
| 21 | + |
| 22 | +# Functional tests |
10 | 23 | There are more comprehensive tests that are disabled by default. Readonly |
11 | 24 | functional tests that run against several public bugzilla instances. No |
12 | 25 | login account is required: |
13 | 26 |
|
14 | | - python setup.py test --ro-functional |
| 27 | + python setup.py test --ro-functional |
15 | 28 |
|
16 | 29 | And read/write functional tests. These currently run against the test |
17 | 30 | bugzilla instance at partner-bugzilla.redhat.com, and requires a valid |
18 | 31 | login there: |
19 | 32 |
|
20 | | - python setup.py test --rw-functional |
| 33 | + python setup.py test --rw-functional |
| 34 | + |
| 35 | +Note: Before running rw-functional tests, make sure you have logged using: |
| 36 | + python bugzilla-cli \ |
| 37 | + --bugzilla="https://partner-bugzilla.redhat.com/xmlrpc.cgi" \ |
| 38 | + --user=$USER login |
| 39 | + |
| 40 | +3. pylint and pep8 |
| 41 | +------------------ |
| 42 | +To test for pylint or pep8 violations, you can run: |
| 43 | + python setup.py pylint |
| 44 | + |
| 45 | +Note: This expects that you already have pylint and pep8 (installed when setting |
| 46 | +up virtualenv) isntalled. |
| 47 | + |
| 48 | +4. Patch Submission |
| 49 | +------------------- |
| 50 | +If you are submitting a patch, ensure the following: |
| 51 | + [REQ] verify that no new pylint or pep8 violations |
| 52 | + [REQ] run basic unit test suite across all python versions: |
| 53 | + bash contrib/run-tests |
21 | 54 |
|
22 | 55 | Running any of the functional tests is not a requirement for patch submission, |
23 | 56 | but please give them a go if you are interested. |
0 commit comments