Skip to content

Latest commit

 

History

History
90 lines (50 loc) · 1.92 KB

CONTRIBUTING.md

File metadata and controls

90 lines (50 loc) · 1.92 KB

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

pip

$ pip3 install --user -r requirements.txt

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 Roberta:

$ make user-install
$ make user-uninstall

To create tarballs:

$ make roberta.tar.xz

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

$ make --prefix=/usr install

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