-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Port to using Click instead of arg_parser. - Expose options for external users to allow for more customization. - Increase coverage for paths by including paths that start with `/` or nothing. - Add retires for URLs before flagging them as broken. - Preform head request on URL which falls back to get if both not working flag as broken after retries count finishes. - Analyze all web URLs except the ones in skip_domains list. - Change Syntax of terminal comments to improve readability. - Add Spinner to indicate that the tool is working (Not compatible with all terminals) Signed-off-by: John Aziz <[email protected]>
- Loading branch information
1 parent
52036a4
commit b2bd651
Showing
29 changed files
with
1,056 additions
and
459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
name: Run Tests on Repositories | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- '**.py' | ||
- ".github/workflows/python-tests.yaml" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tests-genai-repo: | ||
name: Python Tests on generative-ai-for-beginners | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.9 | ||
id: python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -e . | ||
- name: Clone Repo | ||
run: git clone https://github.com/microsoft/generative-ai-for-beginners | ||
|
||
- name: Test Check Broken Paths in generative-ai-for-beginners | ||
if: always() | ||
run: | | ||
cd generative-ai-for-beginners | ||
markdown-checker -d . -f check_broken_paths -gu '' | ||
- name: Test Check URLs Country locale in generative-ai-for-beginners | ||
if: always() | ||
run: | | ||
cd generative-ai-for-beginners | ||
markdown-checker -d . -f check_urls_locale -gu '' | ||
- name: Test Check Broken URLs in generative-ai-for-beginners | ||
if: always() | ||
run: | | ||
cd generative-ai-for-beginners | ||
markdown-checker -d . -f check_broken_urls -gu '' | ||
tests-openai-repo: | ||
name: Python Tests on azure-search-openai-demo | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.9 | ||
id: python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -e . | ||
- name: Clone Repo | ||
run: git clone https://github.com/Azure-Samples/azure-search-openai-demo | ||
|
||
- name: Test Check Broken Paths in azure-search-openai-demo | ||
if: always() | ||
run: | | ||
cd azure-search-openai-demo | ||
markdown-checker -d . -f check_broken_paths -gu '' | ||
- name: Test Check URLs Country locale in azure-search-openai-demo | ||
if: always() | ||
run: | | ||
cd azure-search-openai-demo | ||
markdown-checker -d . -f check_urls_locale -gu '' | ||
- name: Test Check Broken URLs in azure-search-openai-demo | ||
if: always() | ||
run: | | ||
cd azure-search-openai-demo | ||
markdown-checker -d . -f check_broken_urls -gu '' | ||
tests-phicookbook-repo: | ||
name: Python Tests on Phi-3CookBook | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.9 | ||
id: python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -e . | ||
- name: Clone Repo | ||
run: git clone https://github.com/microsoft/Phi-3CookBook | ||
|
||
- name: Test Check Broken Paths in Phi-3CookBook | ||
if: always() | ||
run: | | ||
cd Phi-3CookBook | ||
markdown-checker -d . -f check_broken_paths -gu '' | ||
- name: Test Check URLs Country locale in Phi-3CookBook | ||
if: always() | ||
run: | | ||
cd Phi-3CookBook | ||
markdown-checker -d . -f check_urls_locale -gu '' | ||
- name: Test Check Broken URLs in Phi-3CookBook | ||
if: always() | ||
run: | | ||
cd Phi-3CookBook | ||
markdown-checker -d . -f check_broken_urls -gu '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Run Python Matrix Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
python-matrix-tests: | ||
if: ${{ always() }} # Always run even if a matrix candidate fails | ||
name: Python ${{ matrix.python_version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python_version: ["3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
architecture: x64 | ||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -e . | ||
- name: Clone Testing Repositories | ||
run: | | ||
git clone https://github.com/Azure-Samples/azure-search-openai-demo | ||
git clone https://github.com/microsoft/generative-ai-for-beginners | ||
git clone https://github.com/microsoft/Phi-3CookBook | ||
- name: Test Check Broken Paths in azure-search-openai-demo | ||
if: always() | ||
run: | | ||
cd azure-search-openai-demo | ||
markdown-checker -d . -f check_broken_paths -gu '' | ||
- name: Test Check Broken Paths in generative-ai-for-beginners | ||
if: always() | ||
run: | | ||
cd generative-ai-for-beginners | ||
markdown-checker -d . -f check_broken_paths -gu '' | ||
- name: Test Check Broken Paths in Phi-3CookBook | ||
if: always() | ||
run: | | ||
cd Phi-3CookBook | ||
markdown-checker -d . -f check_broken_paths -gu '' | ||
- name: Test Check URLs Country locale in azure-search-openai-demo | ||
if: always() | ||
run: | | ||
cd azure-search-openai-demo | ||
markdown-checker -d . -f check_urls_locale -gu '' | ||
- name: Test Check URLs Country locale in generative-ai-for-beginners | ||
if: always() | ||
run: | | ||
cd generative-ai-for-beginners | ||
markdown-checker -d . -f check_urls_locale -gu '' | ||
- name: Test Check URLs Country locale in Phi-3CookBook | ||
if: always() | ||
run: | | ||
cd Phi-3CookBook | ||
markdown-checker -d . -f check_urls_locale -gu '' | ||
- name: Test Check Broken URLs in azure-search-openai-demo | ||
if: always() | ||
run: | | ||
cd azure-search-openai-demo | ||
markdown-checker -d . -f check_broken_urls -gu '' | ||
- name: Test Check Broken URLs in generative-ai-for-beginners | ||
if: always() | ||
run: | | ||
cd generative-ai-for-beginners | ||
markdown-checker -d . -f check_broken_urls -gu '' | ||
- name: Test Check Broken URLs in Phi-3CookBook | ||
if: always() | ||
run: | | ||
cd Phi-3CookBook | ||
markdown-checker -d . -f check_broken_urls -gu '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.