Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

Latest commit

 

History

History
44 lines (30 loc) · 1.39 KB

CONTRIBUTING.md

File metadata and controls

44 lines (30 loc) · 1.39 KB

Contributions guide

Contributions are welcome.
Please open an issue and submit a PR.

Requirements

The file requirements-dev.txt has the required packages to contribute:

  • lazydocs is used by the script generate-functions-documentation.py to generate the functions documentation in markdown format from the functions docstring.
  • pytest is required to use the script unit_test.py in order to test the functions defined in the directory anta.
  • pytest-cov is used to produce code coverage reports.
  • pylint is a linter for python.
  • yamllint is a linter for YAML files.

To use yamllint

Run the command yamllint -c .yamllint.yml .

To use pylint

Run the command pylint $(git ls-files '-.py')

To run unit tests

To run the unit tests that test the functions defined in the directory anta, run the following commands from the tests directory:

py.test 
py.test -vv
py.test --cov .
py.test --cov . -vv
py.test --cov=anta.tests
py.test --cov=anta.tests -vv 

To generate documentation functions

To generate from the functions docstring the documentation in markdown format in the directory documentation, run these commands from the root of the repository:

python documentation/generate-functions-documentation.py
ls documentation