Linting

This page describes the linting procedures set up in the "EmpaticRobot" repository.

GitHub actions (CI/CD)

The pull requests on mainbranches will be tested using a Github Actions CI/CD pipeline. The tests are as follows:

  • pytest checks if the unit-tests are successful

  • flake8 does the following linting checks

    • < 140 chars per line

    • A default python check for syntax (no undefined/non-compiling code etc)

We do ignore some of the flake8 rules. Check setup.cfg for more information.

Running tests and linting locally

To run the flake8 locally, follow this:

$ pip install -r requirements.txt
$ flake8 . --config="./setup.cfg"

To run the tests locally, you can use this:

$ pytest . -vs 

Or choose to not run the test that take long to run by running this:

$ pytest . -v -m "not long"

Last updated