diff --git a/README.md b/README.md index 605e1f0c43569ad5546b1bcaa6247a6fb5074475..979ee10941a6ed6da6e3617a93241d1d32c8cc6e 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,22 @@ cool_module.greeter() # prints "Hello World" ## Contributing To contribute, please create a feature branch and a "Draft" merge request. -Upon completion, the merge request should be marked as ready and a reviewer should be assigned. +Upon completion, the merge request should be marked as ready and a reviewer +should be assigned. + +Verify your changes locally and be sure to add tests. Verifying local +changes is done through `tox`. + +```pip install tox``` + +With tox the same jobs as run on the CI/CD pipeline can be ran. These +include unit tests and linting. + +```tox``` + +To automatically apply most suggested linting changes execute: + +```tox -e format``` ## License This project is licensed under the Apache License Version 2.0 diff --git a/tests/requirements.txt b/tests/requirements.txt index c28d83eb59417e45937be95328d3224a587a81d7..cccf4e8f586d3bbadd504b9d073baf29e47454ff 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,6 +1,7 @@ black build flake8 +autopep8 >= 1.7.0 # MIT pylint pytest pytest-cov diff --git a/tox.ini b/tox.ini index 0c73407b467025c899dbf77bd869e9633a6f0356..fee6821010b9c86c01b0a9ae31a121694983715a 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ commands = # Use generative name and command prefixes to reuse the same virtualenv # for all linting jobs. -[testenv:{pep8,black,pylint}] +[testenv:{pep8,black,pylint,format}] usedevelop = False envdir = {toxworkdir}/linting commands = @@ -30,6 +30,10 @@ commands = black: {envpython} -m black --check --diff . pylint: {envpython} -m pylint --version pylint: {envpython} -m pylint map tests + format: {envpython} -m autopep8 -v -aa --in-place --recursive map + format: {envpython} -m autopep8 -v -aa --in-place --recursive tests + format: {envpython} -m black -v . + [testenv:build] usedevelop = False