Skip to content

Latest commit

 

History

History
108 lines (61 loc) · 2.55 KB

CONTRIBUTING.md

File metadata and controls

108 lines (61 loc) · 2.55 KB

Contributing Guidelines

Coding conventions

Style and coding conventions are enforced by automatic tools, just use make lint and make check-formatting to follow them.

For commit messages, follow the rules outlined in this article: How to Write a Git Commit Message.

Limit yourself to Python features supported by Python 3.5 (project will switch to a newer Python version when the oldest Ubuntu 16.04 LTS will reach end of standard support in April 2021).

Development prerequisites

You can use Python development packages provided by your distribution or install them using pipenv or pip. It's up to you.

Some additional packages cannot be installed through pip alone, though (e.g. ShellCheck).

Fedora

$ sudo dnf install python3-coverage python3-enchant python3-pycodestyle \
                   python3-pylint python3-yapf make ShellCheck

Arch, Manjaro

$ sudo pacman -S python-coverage python-pycodestyle python-pyenchant \
                 python-pylint make shellcheck yapf

pipenv

$ pipenv install
$ pipenv shell

Pipfile is deliberately included in .gitignore, as it's not appropriate to commit it for non-library project.

pip

$ pip3 install --user -r requirements.txt

Makefile Targets

To run linters:

$ make lint

To run all unit tests:

$ make test

To run all unit tests and generate test coverage report:

$ make coverage

To pass additional flags to pycoverage you can run script, e.g. -m flag lists statements not covered by tests:

$ ./tests/coverage-report.sh -m

To remove any files generated by running make:

$ make clean

To check if code is properly formatted:

$ make check-formatting

To fix code formatting using yapf:

$ make pretty-code

Installation and packaging

Steam will detect new tool being installed after you restart the client. As long as you don't touch .vdf files, there's no need to keep restarting it, though.

To install/remove development version of Boxtron:

$ make dev-install
$ make dev-uninstall

To create tarballs:

$ make boxtron.tar.xz

Target install is designed for distro packagers, to be used as such:

$ make prefix=/usr install

It's explained in detail in packaging guidelines.

Logs

All logging happens to stderr, therefore it will be merged with Steam logs.

On some distributions Steam does not print anything to terminal, in such case look for logs in following locations:

/tmp/dumps/${USER}_stdout.txt
~/.steam/error.log