Skip to content

Commit

Permalink
Improve slack message
Browse files Browse the repository at this point in the history
  • Loading branch information
pvk-developer committed Sep 17, 2024
1 parent 76dc7ef commit 23cfbb6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ jobs:
with:
path: results/

# Set up Python 3.10
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies for report
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
# Generate the report
- name: Generate the report
env:
Expand Down
25 changes: 17 additions & 8 deletions tests/benchmark/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,27 @@ def compare_previous_result_with_current(args):
stored_value = get_previous_dtype_result(dtype, col)

if current_value and not stored_value:
message = f"New supported dtype '{dtype}' for method '{col}'."
new_supported_dtypes.append(message)
new_supported_dtypes.append(dtype)

elif not current_value and stored_value:
message = f"Unsupported dtype '{dtype}' for method '{col}'."
unsupported_dtypes.append(message)
unsupported_dtypes.append(dtype)

slack_message = ''
for new_dtype in new_supported_dtypes:
slack_message += f':party_blob: {new_dtype}\n'
for unsupported_dtype in unsupported_dtypes:
slack_message += f':fire: {unsupported_dtype}\n'
if new_supported_dtypes:
slack_message += (
f':party_blob: New data types supported for python: {PYTHON_VERSION} '
'{set(new_supported_dtypes)}\n'
)

if unsupported_dtypes:
slack_message += (
f':party_blob: New data types supported for python: {PYTHON_VERSION} '
'{set(new_supported_dtypes}\n'
)
slack_message += (
f':fire: New unsupported data types for python: {PYTHON_VERSION} for the following '
'dtypes: {set(unsupported_dtype)}\n'
)

if slack_message:
post_slack_message('sdv-alerts-debug', slack_message)
Expand Down

0 comments on commit 23cfbb6

Please sign in to comment.