Skip to content

feat: weaponize ASCII sparklines#18

Merged
palladius merged 3 commits into
mainfrom
feature/260420-ricc-sparklines
Apr 20, 2026
Merged

feat: weaponize ASCII sparklines#18
palladius merged 3 commits into
mainfrom
feature/260420-ricc-sparklines

Conversation

@palladius
Copy link
Copy Markdown
Collaborator

Extract ASCII sparklines generation to a generic script in monitoring-graphs and add pipes as wrappers. Closes #17

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Hi @palladius, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## 📋 Review Summary

This PR successfully extracts the ASCII sparkline generation logic into a generic, reusable script in the monitoring-graphs skill and adds visual framing with pipe wrappers. The changes improve code modularity and enhance the visual feedback for SRE investigations.

🔍 General Feedback

  • Modularity: Excellent job moving the generic sparkline logic to a standalone script. This makes it much easier to use sparklines in other parts of the extension.
  • Aesthetics: The addition of the | wrappers and the switch to space for the baseline character makes the sparklines much easier to read in terminal outputs.
  • Consistency: The updates to export_timeseries_to_csv.py correctly leverage the new script's logic while maintaining backward compatibility in terms of output format.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 The extraction of sparkline generation into a generic script is a great improvement for reusability across the extension.

However, consider adding a basic unit test for this new script (e.g., in a test/ directory) to ensure the ASCII generation remains consistent as you evolve it.

normalized = np.round((binned - vmin) / (vmax - vmin) * 7).astype(int)
chars = ['_', '▂', '▃', '▄', '▅', '▆', '▇', '█']
return "".join([chars[i] for i in normalized])
chars = [' ', '▂', '▃', '▄', '▅', '▆', '▇', '█']
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 This change from _ to (space) for the lowest bucket improves the visual clarity of the sparkline when wrapped in | pipes, as requested.

Comment thread skills/monitoring-graphs/scripts/csv_to_sparkline.py
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@palladius
Copy link
Copy Markdown
Collaborator Author

LGTM

@palladius palladius merged commit 88d45d3 into main Apr 20, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weaponize ASCII sparkline

1 participant