You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.3 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Public APIs Scripts
  2. This directory contains all validation and testing scripts used by Public APIs.
  3. ```bash
  4. scripts
  5. │ github_pull_request.sh # used to validate changes of a pull request
  6. │ requirements.txt # contains dependencies of validate package
  7. ├───tests # contains all unit tests from the validate package
  8. │ test_validate_format.py
  9. │ test_validate_links.py
  10. └───validate # validate package
  11. format.py
  12. links.py
  13. ```
  14. ## Run validations
  15. To run format validation on the `README.md` file, being in the root directory of public-apis, run:
  16. ```bash
  17. $ python scripts/validate/format.py README.md
  18. ```
  19. To run link validation on the `README.md` file, being in the root directory of public-apis, run:
  20. ```bash
  21. $ python scripts/validate/links.py README.md
  22. ```
  23. ## Running Tests
  24. To run all tests it is necessary to change to the scripts directory:
  25. ```bash
  26. $ cd scripts
  27. ```
  28. then run:
  29. ```bash
  30. $ python -m unittest discover tests/ --verbose
  31. ```
  32. To run only the format tests, run:
  33. ```bash
  34. $ python -m unittest discover tests/ --verbose --pattern "test_validate_format.py"
  35. ```
  36. To run only the links tests, run:
  37. ```bash
  38. $ python -m unittest discover tests/ --verbose --pattern "test_validate_links.py"
  39. ```
  40. *Note that it is necessary to have [python](https://www.python.org/) installed.*