Skip to content

Add mojo-asciichart v1.1.2#199

Open
Mjboothaus wants to merge 9 commits intomodular:mainfrom
Mjboothaus:add-mojo-asciichart-v1.1.1
Open

Add mojo-asciichart v1.1.2#199
Mjboothaus wants to merge 9 commits intomodular:mainfrom
Mjboothaus:add-mojo-asciichart-v1.1.1

Conversation

@Mjboothaus
Copy link
Contributor

@Mjboothaus Mjboothaus commented Jan 27, 2026

Adds mojo-asciichart v1.1.2 - Nice-looking lightweight console ASCII line charts for Mojo.

Version update: v1.1.1 → v1.1.2 includes pre-commit whitespace fixes.

First submission following the modular-community standards guide.

Package features:

  • Native Mojo port of the popular asciichartpy (Python) and asciichart (JavaScript) libraries
  • Generate beautiful ASCII line charts in your terminal with no dependencies
  • Basic plot() function for single series data
  • Configurable height, min/max bounds, custom formatting
  • Automatic data scaling and min/max detection
  • NaN value handling (renders gaps in data)
  • UTF-8 box-drawing characters for smooth curves
  • ANSI color support with 6 predefined themes (default, blue, matrix, fire, ocean, rainbow)
  • Python interop tests validating compatibility with asciichartpy
  • Pixel-perfect output matching the original Python implementation
  • Performance: 1.4-4.3x faster than Python's asciichartpy
  • Comprehensive test suite with 29 tests passing

Use case: Perfect for command-line tools, monitoring dashboards, debugging output, and any Mojo application needing quick data visualization without GUI dependencies.

Compliance checklist:

  • ✅ Package image (126KB PNG) for builds.modular.com
  • ✅ CodeQL scanning enabled
  • ✅ CodeQL badge in README
  • ✅ Apache-2.0 license
  • ✅ Git tag v1.1.2 exists
  • ✅ recipe.yaml with proper structure
  • ✅ test_package.mojo validates core functionality
  • ✅ Comprehensive README and documentation
  • ✅ Performance benchmarks comparing to Python

Repository: https://github.com/DataBooth/mojo-asciichart
CodeQL: CodeQL

Mjboothaus and others added 2 commits January 27, 2026 17:27
First submission following modular-community standards:
- Package image included for builds.modular.com
- CodeQL scanning enabled in repository
- Recipe with proper structure and metadata
- Test package validates basic functionality

mojo-asciichart is a native Mojo port of asciichartpy, providing
lightweight console ASCII line charts with 6 color themes and
1.4-4.3x better performance than Python.
Version bump includes whitespace fixes from pre-commit.

Co-Authored-By: Warp <agent@warp.dev>
@Mjboothaus Mjboothaus changed the title Add mojo-asciichart v1.1.1 - ASCII line charts for Mojo Add mojo-asciichart v1.1.2 Jan 28, 2026
Mjboothaus and others added 3 commits January 29, 2026 13:44
- Add context with version and mojo_version variables
- Change from 'mojo >=25.1' to 'mojo-compiler =0.25.7'
- Use pin_compatible() for runtime dependency

Co-Authored-By: Warp <agent@warp.dev>
- Change 'test:' to 'tests:' with script block
- Change 'doc_url' to 'documentation'
- Change 'dev_url' to 'repository'

Co-Authored-By: Warp <agent@warp.dev>
Co-Authored-By: Warp <agent@warp.dev>
@Mjboothaus
Copy link
Contributor Author

Mjboothaus commented Feb 2, 2026

Update:

  • migrated mojo-asciichart to Mojo 0.26.1.
  • In the mojo-asciichart repo, MAX is now pinned to '>=26.1.0,<27', tests were updated to avoid direct String indexing and deprecated ListFloat64 constructors, and all 5 test suites pass under 0.26.1 (including core Python interop tests).
  • The local mojo-asciichart recipe.yaml now uses context.mojo_version = '=0.26.1' and the same pin has been applied here in recipes/mojo-asciichart/recipe.yaml.
  • Some advanced Python-list → Mojo-list interop tests have been temporarily relaxed pending a 0.26.1-friendly PythonObject conversion API, but cross-language output comparisons (simple, sine, height, flat) remain fully covered.

@Mjboothaus
Copy link
Contributor Author

The pre-commit whitespace check seems really temperamental - I am enforcing it in my repo but it fails in CI? @yetalit

@yetalit
Copy link
Collaborator

yetalit commented Feb 3, 2026

@Mjboothaus Those whitespaces I removed were causing the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants