Skip to content
Draft

Docs #68

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
c631cef
Add comprehensive documentation system implementation plan
tammoippen Jan 19, 2026
3c0631d
Add Brython compatibility validation test
tammoippen Jan 19, 2026
bbd42a9
Document Brython validation test results
tammoippen Jan 19, 2026
6fbe285
Remove debug logs and disable Brython debug mode
tammoippen Jan 19, 2026
006dc74
Update README - FORCE_COLOR not needed
tammoippen Jan 19, 2026
a4a7123
Use Makefile for test environment setup, ignore generated files
tammoippen Jan 19, 2026
1edf2c5
Restore Olympic Rings test page
tammoippen Jan 19, 2026
d5e0f44
Add MkDocs and documentation dependencies
tammoippen Jan 19, 2026
379f160
Add basic MkDocs configuration
tammoippen Jan 19, 2026
508f83d
Enable doctest in pytest configuration
tammoippen Jan 19, 2026
3a97f29
Add example analysis script with tests
tammoippen Jan 19, 2026
431b1dc
Add build artifacts to gitignore
tammoippen Jan 19, 2026
d45df83
add lock file
tammoippen Jan 19, 2026
8c0a313
Add example categorization logic
tammoippen Jan 19, 2026
5be0e64
Add example execution and output capture
tammoippen Jan 19, 2026
3c3f8e0
Add static example pre-rendering
tammoippen Jan 19, 2026
ba5fa6a
Add markdown generation templates for examples
tammoippen Jan 19, 2026
87a62e1
Add category page generation
tammoippen Jan 19, 2026
7682d12
Add home page generation
tammoippen Jan 19, 2026
6e58a58
Add amber phosphor terminal theme CSS
tammoippen Jan 19, 2026
81e6804
Add comprehensive implementation review with fixes
tammoippen Jan 19, 2026
5a09f49
Fix color contrast, filter unwanted examples, add hero plot, update nav
tammoippen Jan 19, 2026
b8f6ee2
Add Brython runtime integration
tammoippen Jan 19, 2026
468b861
Add plotille source copying for Brython access
tammoippen Jan 19, 2026
9fdb00f
Add CodeMirror setup with textarea enhancement
tammoippen Jan 19, 2026
5d83fd3
Add Phase 6-7 implementation review with critical fixes
tammoippen Jan 19, 2026
8020b98
Fix build errors and complete Task 7.2
tammoippen Jan 19, 2026
e290b6f
Fix Brython execution errors
tammoippen Jan 19, 2026
3ad60b3
Fix Brython execution context error and add Makefile docs targets
tammoippen Jan 19, 2026
1fabfb7
Rewrite Brython execution to use permanent Python script
tammoippen Jan 19, 2026
b1601db
Fix empty element ID error in Brython execution
tammoippen Jan 19, 2026
55ba795
Move plotille to Brython standard Lib/site-packages/ location
tammoippen Jan 19, 2026
3f5118f
Use local Brython installation instead of CDN
tammoippen Jan 19, 2026
3a05514
Add isatty() and AnsiUp for colored output support
tammoippen Jan 20, 2026
d0547ac
Remove documentation build artifacts from git
tammoippen Jan 20, 2026
20da306
Fix UX issues: code contrast, header readability, search results
tammoippen Jan 20, 2026
f075e40
Fix remaining UX issues: colors, navigation, search
tammoippen Jan 20, 2026
d4af150
rm build artifacts
tammoippen Jan 20, 2026
168e1a0
some cleanup
tammoippen Jan 20, 2026
1c7de37
Add CSS simplification plan and implementation updates
tammoippen Jan 20, 2026
098dcf5
Simplify to standard Material theme with minimal terminal styling
tammoippen Jan 20, 2026
100c4d5
use light and dark theme
tammoippen Jan 20, 2026
81fe39a
Add mkdocstrings API reference configuration
tammoippen Jan 20, 2026
982af79
Add doctest examples to plot() function
tammoippen Jan 20, 2026
4a78b41
Add doctests to scatter(), hist(), and histogram() functions
tammoippen Jan 20, 2026
ce98748
Configure site navigation structure
tammoippen Jan 20, 2026
d685ea3
Add comprehensive review of Phase 8-9 implementation
tammoippen Jan 20, 2026
16df035
Fix navigation - remove non-existent cookbook pages
tammoippen Jan 20, 2026
8185acb
Add GitHub Actions workflow for documentation
tammoippen Jan 20, 2026
67311ce
Add documentation testing checklist
tammoippen Jan 20, 2026
a3ae542
Add error styling for interactive examples
tammoippen Jan 20, 2026
40ad898
Add documentation link to README
tammoippen Jan 20, 2026
e7ff0a6
Add comprehensive review of Phase 11-12 implementation
tammoippen Jan 20, 2026
8e6b9e4
Fix testing checklist to reflect actual cookbook pages
tammoippen Jan 20, 2026
64fb81d
generate colored static plots
tammoippen Jan 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Deploy Documentation

on:
push:
branches:
- master # Adjust if your main branch is named differently
workflow_dispatch: # Allow manual trigger

permissions:
contents: write # Needed to push to gh-pages

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for proper git info

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run tests (including doctests)
run: |
pytest --doctest-modules plotille/ -v

- name: Generate documentation
run: |
python scripts/generate_docs.py

- name: Build MkDocs site
run: |
mkdocs build --strict

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
cname: plotille.tammo.io
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ build/
*.so
*.c
*.html
!docs/overrides/*.html

# Brython runtime files (generated, should be installed via make docs-setup)
docs/brython.js
docs/brython_stdlib.js
docs/unicode.txt
docs/README.txt
docs/demo.html
docs/ansi_up.js
# Documentation build artifacts
docs/Lib/
docs/assets/example-outputs/
docs/cookbook/
docs/index.md
docs/stylesheets/ansi-colors.css


*.pyc
__pycache__/
dist/
Expand All @@ -19,3 +36,7 @@ Pipfile.lock
cov_html/
coverage.xml
pip-wheel-metadata/
site/
.mypy_cache/
.ruff_cache/
.uv/
26 changes: 25 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: style tests install
.PHONY: style tests install docs docs-setup docs-serve

fmt:
uv run --locked ruff format .
Expand All @@ -17,3 +17,27 @@ tests:

install:
uv install

docs-copy-plotille:
@echo "Copy plotille to docs folder"
@rm -rf docs/Lib
@mkdir -p docs/Lib/site-packages/plotille
@cp plotille/*.py docs/Lib/site-packages/plotille/

docs-brython:
@echo "Installing Brython runtime..."
@rm -f docs/brython.js docs/brython_stdlib.js docs/unicode.txt docs/demo.html docs/README.txt docs/index.html
@echo "Y" | uv run brython-cli install --install-dir docs
@rm -f docs/demo.html docs/README.txt docs/index.html
@echo "✓ Brython installed to docs/"

docs/ansi_up.js:
@echo "Downloading AnsiUp library..."
@curl -sL -o docs/ansi_up.js https://unpkg.com/ansi_up@6.0.2/ansi_up.js
@echo "✓ AnsiUp downloaded to docs/"

docs: docs-copy-plotille docs/ansi_up.js docs-brython
uv run python docs/generate_docs.py

docs-serve: docs
uv run mkdocs serve --dev-addr 127.0.0.1:8000
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ If you are still using python 2.7, please use plotille v4 or before. With v5 I a

## Documentation

📚 **Full documentation available at [plotille.tammo.io](https://plotille.tammo.io)**

Features:
- **Interactive examples** - Edit and run code in your browser
- **Complete API reference** - Auto-generated from source
- **Cookbook** - Examples organized by complexity

```python
In [1]: import plotille
In [2]: import numpy as np
Expand Down
17 changes: 17 additions & 0 deletions docs/api/canvas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Canvas

Low-level canvas for direct drawing.

::: plotille.Canvas
options:
show_root_heading: true
show_source: true
members:
- __init__
- point
- line
- rect
- text
- braille_image
- image
- plot
21 changes: 21 additions & 0 deletions docs/api/figure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Figure

The Figure class for composing complex visualizations.

::: plotille.Figure
options:
show_root_heading: true
show_source: true
members:
- __init__
- plot
- scatter
- histogram
- text
- axvline
- axhline
- axvspan
- axhspan
- imgshow
- show
- clear
20 changes: 20 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# API Reference

Complete API documentation for plotille.

## High-Level Functions

Quick plotting functions for simple use cases.

- [Plotting Functions](plotting.md) - `plot()`, `scatter()`, `histogram()`
- [Figure Class](figure.md) - Compose complex multi-plot visualizations

## Core Components

- [Canvas](canvas.md) - Low-level drawing primitives
- [Colors](colors.md) - Color handling and themes

## Utilities

- [Input Formatting](formatting.md) - Data preprocessing
- [Data Types](datatypes.md) - Internal data structures
31 changes: 31 additions & 0 deletions docs/api/plotting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Plotting Functions

High-level plotting functions for quick visualizations.

## plot

::: plotille.plot
options:
show_root_heading: true
show_source: true

## scatter

::: plotille.scatter
options:
show_root_heading: true
show_source: true

## hist

::: plotille.hist
options:
show_root_heading: true
show_source: true

## histogram

::: plotille.histogram
options:
show_root_heading: true
show_source: true
Loading
Loading