Skip to content
Snippets Groups Projects
Commit db585c89 authored by Corné Lukken's avatar Corné Lukken
Browse files

CWG-11: linting auto format and appropriate documentation

parent 726f5dc5
No related branches found
No related tags found
1 merge request!6CWG-11: linting auto format and appropriate documentation
Pipeline #39022 passed
...@@ -22,7 +22,22 @@ cool_module.greeter() # prints "Hello World" ...@@ -22,7 +22,22 @@ cool_module.greeter() # prints "Hello World"
## Contributing ## Contributing
To contribute, please create a feature branch and a "Draft" merge request. 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 ## License
This project is licensed under the Apache License Version 2.0 This project is licensed under the Apache License Version 2.0
black black
build build
flake8 flake8
autopep8 >= 1.7.0 # MIT
pylint pylint
pytest pytest
pytest-cov pytest-cov
...@@ -20,7 +20,7 @@ commands = ...@@ -20,7 +20,7 @@ commands =
# Use generative name and command prefixes to reuse the same virtualenv # Use generative name and command prefixes to reuse the same virtualenv
# for all linting jobs. # for all linting jobs.
[testenv:{pep8,black,pylint}] [testenv:{pep8,black,pylint,format}]
usedevelop = False usedevelop = False
envdir = {toxworkdir}/linting envdir = {toxworkdir}/linting
commands = commands =
...@@ -30,6 +30,10 @@ commands = ...@@ -30,6 +30,10 @@ commands =
black: {envpython} -m black --check --diff . black: {envpython} -m black --check --diff .
pylint: {envpython} -m pylint --version pylint: {envpython} -m pylint --version
pylint: {envpython} -m pylint map tests 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] [testenv:build]
usedevelop = False usedevelop = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment