Skip to content

Commit

Permalink
[Fundamental]Check enforcer print more messsage and fix some nits on …
Browse files Browse the repository at this point in the history
…readme parser (microsoft#3623)

# Description

Please add an informative description that covers that changes made by
the pull request and link all relevant issues.

# All Promptflow Contribution checklist:
- [ ] **The pull request does not introduce [breaking changes].**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [ ] **I have read the [contribution
guidelines](https://github.com/microsoft/promptflow/blob/main/CONTRIBUTING.md).**
- [ ] **I confirm that all new dependencies are compatible with the MIT
license.**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.
  • Loading branch information
crazygao authored Aug 6, 2024
1 parent cc796bb commit 8f21c2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion scripts/check_enforcer/check_enforcer.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ def trigger_checks(valid_status_array):

for key in pipelines.keys():
if pipelines_count[key] < pipelines[key]:
print(
f"[Failure]Pipeline {key} is triggered {pipelines_count[key]} times, less than {pipelines[key]} times."
)
failed_reason = "Not all pipelines are triggered."
else:
print(
f"Pipeline {key} is triggered {pipelines_count[key]} times, more or equal to {pipelines[key]} times."
)


def status_checks(valid_status_array):
Expand Down Expand Up @@ -166,7 +173,7 @@ def trigger_prepare(input_paths):
global special_care

for input_path in input_paths:
if "samples_connections_connection" in checks:
if "samples_connections_connection" in input_path:
continue
# Check if the input path contains "examples" or "samples".
if "examples" in input_path or "samples" in input_path:
Expand Down
2 changes: 1 addition & 1 deletion scripts/readme/readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def main(check):
continue
output_object[workflow.workflow_name].append(item)
for readme in readme_telemetry:
if not hasattr(readme_telemetry, "workflow_name"):
if not hasattr(readme, "workflow_name"):
continue
output_object[readme.workflow_name] = []
readme_items = re.split(r"\[|,| |\]", readme.path_filter)
Expand Down

0 comments on commit 8f21c2c

Please sign in to comment.