Page MenuHomePhabricator

Create tox config for Bernard repo to validate code style and to execute this check using Jenkins CI tox-docker
Closed, ResolvedPublic


To check that our code is in working condition and follows the style guidelines every commit, we should create a config for tox so that it works with the existing tox-docker Jenkins jobs.
This would then be executed by jenkins-bot

We could use something else other than tox, but we are sticking to tox so that we conform to the existing DBA codebase (they all use tox)

In future this should be extended for unit tests of the Python code


  • Create tox config for bernard repository to validate styles (flake8?) with jenkins-bot
  • In future add commands for unit tests check


  • Able to run tests on Wikimedia Jenkins for style guidelines.
  • jenkins-bot can be called successfully on the bernard repository

Event Timeline

@Marostegui @jcrespo
I wonder if we should stick to using tox for code style validations/unit tests just to maintain consistency with the rest of the DBA codebase? Or is there another better way?

Or is there another better way?

There are other ways, but unless you have a reason, we probably want to stick to that for python code, for easy of use and implementation (the main reason to use python is to uniformize it across same team repos and reduce congnitive load of future maintainers).

If you decide to use something different, make sure you are confident to setup it on our jenkins config repo , document it thoroughly, and create a potential different docker image.

Change 713604 had a related patch set uploaded (by H.krishna123; author: H.krishna123):

[operations/software/bernard@master] [WIP]: Add basic tox config Add Tox config into bernard repository along with the test-requirements.txt so that we can get CI up and running

Change 713604 merged by Jcrespo:

[operations/software/bernard@master] bernard: Add basic tox config