-
Notifications
You must be signed in to change notification settings - Fork 24
Contribute
If you want to contribute to Hammr, you can review code for opened pull requests, fix logged issues or propose new features in a dedicated pull request. If you encounter issues or bugs using Hammr, you can log them.
You can also open issues if you have an idea for improvement, or help improving the code coverage, by writing unit tests or integration tests.
On a RedHat-based distribution (Fedora, CentOS, etc.), you will need to install these packages:
- python2.7
- gcc
- python-devel
- libxml2-devel
- libxslt-devel
On a Windows system, you will need to install:
- Python 2.7
- Microsoft Visual C++ Compiler for Python 2.7
And, in both cases, you will need pip==8.1.1 to compile and install the required python packages.
In hammr home directory, run the following command:
python -m unittest discover
The coding style is based on PEP8. The following exceptions or clarifications apply :
- Maximum line length is increased to 120 characters
- wildcards imports are OK for the pyxb-generated classes imported from uforge-python-sdk
- preferred string quote style is "double quotes"
- it's acceptable not to have docstrings for functions or methods
When you update code that changes the user interface, you need to update the documentation to describe the changes. Hammr documentation is inside Hammr project. To build the documentation, use the following commands:
pip install sphinx rst2pdf sphinx_rtd_theme
cd documentation/en
make clean && make html
open documentation/en/build/html/index.html
Run PyLint locally on staged files by doing the following :
pip install git-lint
pip install pylint
git lint
If you want to make changes in Hammr code, you need to fork the project. Then you can propose your changes in a pull request. In order to be treated, please use an explicit title and description for your pull request.
Before being ready for merge, your pull request needs to be reviewed by at least two reviewers. Official contributors will also give a milestone to the pull request (please see Releases section for more information about this process).
Hammr project uses Travis CI to run unit tests automatically for each commit. Your pull request needs to be validated by Travis CI build before being ready to merge. A linter is triggered for every pull request without blocking it but please pay attention before submitting.