From 08ba4e64582a77a267c6aa30826ae6a2ba90b47c Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Mon, 17 Jan 2022 20:04:31 -0300 Subject: [PATCH] Create README.md to scripts directory --- scripts/README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 scripts/README.md diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 00000000..951c91d2 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,45 @@ +# Public APIs Scripts + +This directory contains all validation and testing scripts used by Public APIs. + +```bash +scripts +│ github_pull_request.sh # used to validate changes of a pull request +│ requirements.txt # contains dependencies of validate package +│ +├───tests # contains all unit tests from the validate package +│ test_validate_format.py +│ test_validate_links.py +│ +└───validate # validate package + format.py + links.py +``` + +## Running Tests + +To run all tests it is necessary to change to the scripts directory: + +```bash +$ cd scripts +``` + +then run: + +```bash +$ python -m unittest discover tests/ --verbose +``` + +To run only the format tests, run: + +```bash +$ python -m unittest discover tests/ --verbose --pattern "test_validate_format.py" +``` + +To run only the links tests, run: + +```bash +$ python -m unittest discover tests/ --verbose --pattern "test_validate_links.py" +``` + +*Note that it is necessary to have [python](https://www.python.org/) installed.*