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.
Matheus Felipe 1c3e4eba37
Create run validations section
2 years ago
..
tests Create tests to check_file_format 2 years ago
validate Add format and links in validate scope 2 years ago
README.md Create run validations section 2 years ago
github_pull_request.sh Create new workflow to run test of push and pull 2 years ago
requirements.txt Create new requirements file 2 years ago

README.md

Public APIs Scripts

This directory contains all validation and testing scripts used by Public APIs.

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

Run validations

To run format validation on the README.md file, being in the root directory of public-apis, run:

$ python scripts/validate/format.py README.md

To run link validation on the README.md file, being in the root directory of public-apis, run:

$ python scripts/validate/links.py README.md

Running Tests

To run all tests it is necessary to change to the scripts directory:

$ cd scripts

then run:

$ python -m unittest discover tests/ --verbose

To run only the format tests, run:

$ python -m unittest discover tests/ --verbose --pattern "test_validate_format.py"

To run only the links tests, run:

$ python -m unittest discover tests/ --verbose --pattern "test_validate_links.py"

Note that it is necessary to have python installed.