Contributing

This project is open to any kind of contribution. You can help with improving the documentation, adding fixes to the code, providing test cases in code or as a description or just spreading the word. Please feel free to create an issue or pull request. In order to reduce the amount of work for everyone please try to adhere to good practice.

The pull requests and issues will be prefilled with templates. Please fill in your information where applicable.

This project uses semantic versioning and tries to adhere to the proposed rules as well as possible.

Author-list

This project keeps a list of authors. This can be auto-generated by calling ./doc/generate-authors.sh. When contributing the first time, please include a commit with the output of this script in place. Otherwise the integration-check will fail.

When you change your username or mail-address, please also update the .mailmap and the authors-list. You can find a good documentation on the mapping-feature in the documentation of git-shortlog.

Style-Guide

When writing code please try to stick to these rules.

PEP8

The entire codebase adheres to the rules of PEP8. These rules are enforced by running flake8 in the integration-checks. Please adhere to these rules as your contribution can only be merged if the check succeeds. You can use flake8 or similar tools locally in order to check your code. Apart from that the travis-log and the check by Landscape will provide you with hints.

GIT

The master-branch contains the main development of the project. A release to PyPi is marked with a tag corresponding to the version. Issues are closed when they have been resolved by merging into the master-branch. When you have a change to make, begin by creating a new branch from the HEAD of python-escpos/master.

Please try to group your commits into logical units. If you need to tidy up your branch, you can make use of a git feature called an ‘interactive rebase’ before making a pull request. A small, self-contained change-set is easier to review, and improves the chance of your code being merged. Please also make sure that before creating your PR, your branch is rebased on a recent commit or you merged a recent commit into your branch. This way you can ensure that your PR is without merge conflicts.

Docstrings

This project tries to have a good documentation. Please add a docstring to every method and class. Have a look at existing methods and classes for the style. We use basically standard rst-docstrings for Sphinx.

Test

Try to write tests whenever possible. Our goal for the future is 100% coverage. We are currently using nose but might change in the future. You can copy the structure from other testcases. Please remember to adapt the docstrings.

Further reading

For further best practices and hints on contributing please see the contribution-guide. Should there be any contradictions between this guide and the linked one, please stick to this text. Aside from that feel free to create an issue or write an email if anything is unclear.

Thank you for your contribution!