Skip to content

Commit b7acd38

Browse files
author
FirstUnicorn
committed
refactor: replace emoji with ASCII text markers in workflow output
Replaced all emoji characters with stable ASCII text markers: - [NEW] instead of emoji for new packages - [EXISTS] instead of warning emoji for existing versions - [NEW VERSION] instead of checkmark for new versions - [WARN] instead of warning emoji - [ERROR] instead of X emoji - [INFO] instead of information emoji - [PASSED] instead of checkmark badge - [FAILED] instead of X badge Benefits: - Consistent rendering across all terminals and logs - No encoding issues - Better accessibility for screen readers - Easier to grep/search in logs
1 parent c08dc5b commit b7acd38

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ jobs:
101101
)
102102
103103
if response.status_code == 404:
104-
print(f" NEW PACKAGE - Not on PyPI yet (will publish)")
104+
print(f" [NEW] Not on PyPI yet (will publish)")
105105
continue
106106
elif response.status_code != 200:
107-
print(f" ⚠ WARNING - PyPI API error: {response.status_code}")
107+
print(f" [WARN] PyPI API error: {response.status_code}")
108108
continue
109109
110110
pypi_data = response.json()
@@ -113,7 +113,7 @@ jobs:
113113
114114
if pkg_version in pypi_versions:
115115
# Version exists on PyPI - check if code changed
116-
print(f" ⚠ VERSION {pkg_version} ALREADY EXISTS on PyPI")
116+
print(f" [EXISTS] Version {pkg_version} already on PyPI")
117117
118118
# Get git commit hash for this package
119119
import subprocess
@@ -126,28 +126,28 @@ jobs:
126126
127127
if current_commit:
128128
print(f" Current commit: {current_commit}")
129-
print(f" ERROR: Code changed but version not bumped!")
129+
print(f" [ERROR] Code changed but version not bumped!")
130130
errors.append(
131131
f"{pkg_name}: Built version {pkg_version} already on PyPI "
132132
f"but code has changed (commit {current_commit}). "
133133
f"Bump version in pyproject.toml"
134134
)
135135
else:
136-
print(f" ⚠ WARNING: Cannot determine git changes")
136+
print(f" [WARN] Cannot determine git changes")
137137
except Exception as e:
138-
print(f" ⚠ WARNING: Could not check git history: {e}")
138+
print(f" [WARN] Could not check git history: {e}")
139139
else:
140-
print(f" NEW VERSION {pkg_version} (will publish)")
140+
print(f" [NEW VERSION] {pkg_version} (will publish)")
141141
if latest_pypi:
142142
print(f" Latest on PyPI: {latest_pypi}")
143143
144144
except requests.RequestException as e:
145-
print(f" ⚠ WARNING - Could not check PyPI: {e}")
145+
print(f" [WARN] Could not check PyPI: {e}")
146146
147147
print("\n" + "=" * 70)
148148
149149
if errors:
150-
print(" VERSION CHECK FAILED")
150+
print("[FAILED] VERSION CHECK FAILED")
151151
print("\nErrors:")
152152
for error in errors:
153153
print(f" - {error}")
@@ -157,7 +157,7 @@ jobs:
157157
print(" 3. Re-run this workflow")
158158
exit(1)
159159
else:
160-
print(" VERSION CHECK PASSED")
160+
print("[PASSED] VERSION CHECK PASSED")
161161
print("\nAll packages either:")
162162
print(" - Are new (not on PyPI yet)")
163163
print(" - Have new versions not yet published")

.github/workflows/publish-testpypi.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,29 +85,29 @@ jobs:
8585
)
8686
8787
if response.status_code == 404:
88-
print(f" NEW PACKAGE - Not on TestPyPI yet (will publish)")
88+
print(f" [NEW] Not on TestPyPI yet (will publish)")
8989
continue
9090
elif response.status_code != 200:
91-
print(f" ⚠ WARNING - TestPyPI API error: {response.status_code}")
91+
print(f" [WARN] TestPyPI API error: {response.status_code}")
9292
continue
9393
9494
pypi_data = response.json()
9595
pypi_versions = list(pypi_data['releases'].keys())
9696
latest_pypi = max(pypi_versions, key=version.parse) if pypi_versions else None
9797
9898
if pkg_version in pypi_versions:
99-
print(f" ⚠ VERSION {pkg_version} ALREADY EXISTS on TestPyPI")
100-
print(f" ℹ️ TestPyPI: Allowing re-publish for testing")
99+
print(f" [EXISTS] Version {pkg_version} already on TestPyPI")
100+
print(f" [INFO] TestPyPI: Allowing re-publish for testing")
101101
else:
102-
print(f" NEW VERSION {pkg_version} (will publish)")
102+
print(f" [NEW VERSION] {pkg_version} (will publish)")
103103
if latest_pypi:
104104
print(f" Latest on TestPyPI: {latest_pypi}")
105105
106106
except requests.RequestException as e:
107-
print(f" ⚠ WARNING - Could not check TestPyPI: {e}")
107+
print(f" [WARN] Could not check TestPyPI: {e}")
108108
109109
print("\n" + "=" * 70)
110-
print(" TESTPYPI CHECK PASSED (proceeding with publication)")
110+
print("[PASSED] TESTPYPI CHECK PASSED (proceeding with publication)")
111111
print("Note: TestPyPI allows re-publishing same versions for testing")
112112
EOF
113113

0 commit comments

Comments
 (0)