Skip to content

Commit

Permalink
Add readme validation step (Azure#2748)
Browse files Browse the repository at this point in the history
* Add script to check README.md and README template

* Refactor check-readme.sh and add messages

* Add step to cli-assets-component-pipeline workflow to test

* Update workflow

* Update workflow

* Fix syntax error

* Update action

* Fix typo

* Add exclusion logic

* Try adding readme validation to readme.py

* Update workflows with readme.py

* Update workflows with readme.py

* Update workflows with readme.py

* Update workflows with readme.py

* Fix github workspace variable

* Fix github workspace variables for exclusion check

* Fix exclusion logic

* Update readme exclusions

* Revert accidental change

* Update readme_exclusions.txt

* Revert accidental change to working directory

* Update check-readme.sh

* Update exclusion logic and file name

* Add debug message

* Update exclusion logic and file name

* FIx working directory file names

* Update exclusion logic and file name

* Add debugging statements

* Remove debugging statements

* Update readme.py and regenerate cli workflows

* Update working-directory

* Update readme to add validate readme to sdk workflows

* Move templates folder inside infra

* Add validate readme check to tutorials and sdk/python files

* Fix readme.py and revert unintended changes

* Revert unnecessary changes and update readme_validation_exclusions.txt

* Update exclusions list

* Update template

* Update readme_validation_exclusions.txt

* Update exclusions

* Replace check-readme.sh with check-readme.py

* Update readme template

* Update check-readme.py with Kevin's suggestions

* Remove 2nd CLI argument

* Add debugging messages

* Add debugging messages

* Add debugging messages

* Update debugging messages

* Update debugging messages

* Strip whitespace

* Convert sample path to string

* Fix exclusions

* Remove debugging messages

* re-format with black

* Manually update one sample with logging logic to test

* Regenerate resolved notebooks

* Remove appinsights logging step

* Exclude /home/runner/work/azureml-examples/azureml-examples/cli/jobs/automl-standalone-jobs/cli-automl-forecasting-task-github-dau
  • Loading branch information
diondrapeck authored Jan 12, 2024
1 parent db6bea8 commit a8431e1
Show file tree
Hide file tree
Showing 375 changed files with 3,963 additions and 31 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/cli-assets-component-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,32 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/component"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
az ml component create -f assets/component/pipeline.yml
log_output=$(az ml component create -f assets/component/pipeline.yml 2>&1)
echo "$log_output" > create-asset.log
cat create-asset.log
working-directory: cli
- name: Determine Failure Reason
run: |
failure_reason="N/A"
if [ "${{ job.status }}" == "failure" ]; then
if grep -q "ResourceNotReady" create-asset.log; then
failure_reason = "ResourceNotReady"
elif grep -q "quota" create-asset.log; then
failure_reason="QuotaIssue"
elif grep -q "ParentResourceNotFound" create-asset.log; then
failure_reason="ParentResourceNotFound"
else
failure_reason="UncategorizedFailure"
fi
fi
echo "FAILURE_REASON=$failure_reason" >> $GITHUB_ENV
working-directory: cli
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-component-train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/component"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-cloud-file-https.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-cloud-file-wasbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-cloud-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-cloud-folder-https.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-cloud-folder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-cloud-mltable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-iris-csv-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-local-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-local-folder-sampledata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-local-folder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-local-mltable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-data-public-file-https.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/data"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-environment-docker-context.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/environment"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-environment-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/environment"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-model-local-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/model"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-assets-model-local-mlflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/assets/model"
working-directory: infra/bootstrapping
continue-on-error: false
- name: create asset
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/endpoints/batch/deploy-models/custom-outputs-parquet"
working-directory: infra/bootstrapping
continue-on-error: false
- name: delete endpoint if existing
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand All @@ -68,4 +73,4 @@ jobs:
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
az ml batch-endpoint delete -n tomoutputsparquetendpoint8741 -y
working-directory: cli
working-directory: cli
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/endpoints/batch/deploy-models/heart-classifier-mlflow"
working-directory: infra/bootstrapping
continue-on-error: false
- name: delete endpoint if existing
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand All @@ -61,4 +66,4 @@ jobs:
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
az ml batch-endpoint delete -n tclassifiermlflowendpoint3191 -y
working-directory: cli
working-directory: cli
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/endpoints/batch/deploy-models/huggingface-text-summarization"
working-directory: infra/bootstrapping
continue-on-error: false
- name: delete endpoint if existing
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand All @@ -68,4 +73,4 @@ jobs:
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
az ml batch-endpoint delete -n textsummarizationendpoint2742 -y
working-directory: cli
working-directory: cli
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/endpoints/batch/deploy-models/imagenet-classifier"
working-directory: infra/bootstrapping
continue-on-error: false
- name: delete endpoint if existing
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand All @@ -61,4 +66,4 @@ jobs:
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
az ml batch-endpoint delete -n imagenetclassifierendpoint3948 -y
working-directory: cli
working-directory: cli
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/endpoints/batch/deploy-models/mnist-classifier"
working-directory: infra/bootstrapping
continue-on-error: false
- name: delete endpoint if existing
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand All @@ -61,4 +66,4 @@ jobs:
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
az ml batch-endpoint delete -n lsmnistclassifierendpoint9980 -y
working-directory: cli
working-directory: cli
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/endpoints/batch/deploy-pipelines/batch-scoring-with-preprocessing"
working-directory: infra/bootstrapping
continue-on-error: false
- name: delete endpoint if existing
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand All @@ -68,4 +73,4 @@ jobs:
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
az ml batch-endpoint delete -n withpreprocessingendpoint6601 -y
working-directory: cli
working-directory: cli
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/endpoints/batch/deploy-pipelines/hello-batch"
working-directory: infra/bootstrapping
continue-on-error: false
- name: delete endpoint if existing
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand All @@ -68,4 +73,4 @@ jobs:
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
az ml batch-endpoint delete -n pelineshellobatchendpoint9006 -y
working-directory: cli
working-directory: cli
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: validate readme
run: |
python check-readme.py "${{ github.workspace }}/cli/endpoints/batch/deploy-pipelines/training-with-components"
working-directory: infra/bootstrapping
continue-on-error: false
- name: delete endpoint if existing
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand All @@ -61,4 +66,4 @@ jobs:
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
az ml batch-endpoint delete -n ingwithcomponentsendpoint9219 -y
working-directory: cli
working-directory: cli
Loading

0 comments on commit a8431e1

Please sign in to comment.