Thanks for thinking about contributing. codechu-spark is a small
stdlib-only library for single-row text visualizations — sparklines,
labeled bar charts, heatmaps.
This library was originally extracted from Disk Cleaner via codechu/cli-py, but is maintained independently with its own release cadence.
git clone https://github.com/codechu/codechu-spark-py.git
cd codechu-spark-py
pip install -e ".[dev]"
pytest -q
ruff check src tests- Branch names:
feature/<short>,fix/<short>,refactor/<short>,docs/<short>,test/<short>. - Commit messages: Conventional Commits
(
feat:,fix:,refactor:,docs:,test:,chore:). - One change per PR.
pytest -qmust pass; coverage stays at ≥90 %.- Cover the edge cases on every renderer: empty input, single
value, all-equal values, custom
chars, width < len, width > len.
The public surface is sparkline, bar_chart, and heatmap.
Default glyphs are part of the contract — changing them requires a
major version bump. Adding a new renderer is a minor bump.
No runtime dependencies. If you need one, the answer is almost always "no, write it in stdlib".
ruff check+ruff formatclean.- Type hints on public APIs (
from __future__ import annotations). - Renderers return strings — no
print, no I/O, no ANSI escapes.
If you find a security issue, see SECURITY.md — do not open a public issue for it.
Every commit must be signed off with the DCO. The sign-off certifies that you wrote the patch, or otherwise have the right to submit it under the project's license. Add a line to your commit message:
Signed-off-by: Your Name <you@example.com>
git commit -s does this automatically. PRs without sign-off will
be asked to amend before merge.
Contributions are accepted under the project's license (see LICENSE).