Add requirements file

Change-Id: I84b35a2b18f69afc4c052e620bf9ce1975088274
Move requirements.txt to the root

Change-Id: I1075e3fb2a33dcd2f3e6e258597fb5d588db9e0d
Explicitly depend on paramiko v1.7.6

There are newer versions, but this is the one that we have been
using and testing with.

Also add explicit dependency on pycrypto which is needed by
paramiko.

Change-Id: Ifb1bf0744f764013132002ecaa63345972e959ce
Add missing docstrings to conform to PEP-257

Change-Id: If06f1ea17740a796142db63e7086f80445f4c6e1
Fix UnboundLocalError when stream-event connection fails

When the stream-event command fails, for example due to bad
host name, the result is not initialised.  However the code
was accessing the result variable which caused an exception.

Change-Id: I6c649dba447e33733dfaea6e742152277fa7374f
Don't open ssh connection until needed

Instead of opening the ssh connection in the constructor, only
connect when actually needed.

This improves performance of the unit tests.  Running the test
suite now takes less than 1 second rather than 22 seconds.

Change-Id: I03a49d74db8c045740a85201c02c492d175e0d6c
Include command in GerritCommandResult

Include the name of the command that was run in the result
object.

Change-Id: I93c27ed937d27942428f561dc50d84b5ea25591a
Don't hard code version in setup.py

We're currently only using the version number in the setup
script, but in future we might need it in other places too.

Define the version number in the module itself and import
it in setup.

Change-Id: Idbf246d3a9777f6de710cb01fa05f8fbf031d192
Only allow strings as query terms and commands

Change-Id: I850978039ca10162a5ae2ab0a4f79374183107ba
Add a Makefile to install dependencies and run unit tests

The Makefile installs all necessary dependencies in a virtual
environment, and then runs the unit tests.

Change-Id: I16c6b68f4c47fab936eb44438c61b7d0bf24b328
Add pyflakes check in the Makefile

Change-Id: Ic1ce3f97439b58174c3897e1eff3b67dc105b81a
Add PEP-8 conformance check in the Makefile

Change-Id: I3b4689d7d459d739ff3c9d9c8d801effa2b7a48f
Add a `clean` target in the Makefile

The `clean` target removes unnecessary *.pyc files, the build
and distribution folders, and the virtual environment.

Make the `test` target depend on `clean`, to ensure that we
always test in a newly created environment.

Change-Id: Iab8fb4a83cd14671c5a6bd0ac029c12349c1aa3b
Fix one more PEP-257 violation

Change-Id: Ie595ac7125323677ad478655c33b21a00302007c
Fix relative imports

Change-Id: I6bc8d92ed1055959f1c24128b8beace814eaf998
Bump paramiko dependency to version 1.11.0

And the corresponding pycrypto to 2.3.

Change-Id: I45892c84c68c5faee7ab115e46df9e59a4818d8d
Separate package dependencies from verification/test dependencies

Now the `requirements.txt` file only lists the packages that are needed
to install and run the pygerrit module.

The packages that are only needed for testing are moved to a separate
file `test_requirements.txt`

Change-Id: I169ec2501cacd86644430a57225eead4d705b76f
Add a unit test to ensure dependency package version consistency

Add a test to make sure that if depencency package versions are updated
that they are updated to consistent versions in both requirements.txt
and setup.py

Change-Id: I855af3246bfb1013f8a462c99fb2d15ef6454998
Add PEP-257 conformance check in the Makefile

Note: the latest version of PEP-257 is 0.2.2 but the latest available
on PyPI is 0.2.0 which does not exit with error if the check fails.

The dependency should be updated after the latest version has been
published.

Change-Id: Iae3bfeab685d9f92af528156cbc8c957a98f5adb
Fix pylint warnings

- Add missing docstrings that the PEP-257 checker did not report.

- Add explicit parameters on `GerritSSHClient.exec_command` method
  overridden from `paramiko.SSHClient.exec_command`.

- Disable warning that the `GerritEvent` class does not have a member
  named `name`.  This member is initialised by the event factory when
  a derived class is instantiated.

- Capitalise constant `REQUIRES`.

Change-Id: I8880e061b51e12145ee55e0cd86dab930970cde5