fast-rich 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fast_rich-0.3.0/.agent/workflows/benchmarking.md +23 -0
- fast_rich-0.3.0/.agent/workflows/coding.md +31 -0
- fast_rich-0.3.0/.agent/workflows/debugging.md +19 -0
- fast_rich-0.3.0/.agent/workflows/documentation.md +22 -0
- fast_rich-0.3.0/.agent/workflows/maintenance.md +14 -0
- fast_rich-0.3.0/.agent/workflows/publishing.md +29 -0
- fast_rich-0.3.0/.agent/workflows/reviewing.md +27 -0
- fast_rich-0.3.0/.agent/workflows/security.md +14 -0
- fast_rich-0.3.0/.agent/workflows/testing.md +20 -0
- fast_rich-0.3.0/.agent/workflows/versioning.md +20 -0
- fast_rich-0.3.0/.github/workflows/docs.yml +47 -0
- fast_rich-0.3.0/.github/workflows/rust.yml +67 -0
- fast_rich-0.3.0/.gitignore +45 -0
- fast_rich-0.3.0/CHANGELOG.md +50 -0
- fast_rich-0.3.0/Cargo.lock +1446 -0
- fast_rich-0.3.0/Cargo.toml +69 -0
- fast_rich-0.3.0/LICENSE-APACHE +175 -0
- fast_rich-0.3.0/LICENSE-MIT +21 -0
- fast_rich-0.3.0/PKG-INFO +136 -0
- fast_rich-0.3.0/PROJECT_SUMMARY.md +240 -0
- fast_rich-0.3.0/README.md +0 -0
- fast_rich-0.3.0/RICH_RUST_PLAN.md +214 -0
- fast_rich-0.3.0/benches/render_benchmark.rs +49 -0
- fast_rich-0.3.0/benchmarks/python/bench_columns.py +47 -0
- fast_rich-0.3.0/benchmarks/python/bench_inspect.py +32 -0
- fast_rich-0.3.0/benchmarks/python/bench_layout.py +27 -0
- fast_rich-0.3.0/benchmarks/python/bench_logging.py +30 -0
- fast_rich-0.3.0/benchmarks/python/bench_markdown.py +43 -0
- fast_rich-0.3.0/benchmarks/python/bench_panel.py +32 -0
- fast_rich-0.3.0/benchmarks/python/bench_progress.py +39 -0
- fast_rich-0.3.0/benchmarks/python/bench_rule.py +37 -0
- fast_rich-0.3.0/benchmarks/python/bench_syntax.py +37 -0
- fast_rich-0.3.0/benchmarks/python/bench_table.py +48 -0
- fast_rich-0.3.0/benchmarks/python/bench_text.py +30 -0
- fast_rich-0.3.0/benchmarks/python/bench_traceback.py +43 -0
- fast_rich-0.3.0/benchmarks/python/bench_tree.py +32 -0
- fast_rich-0.3.0/benchmarks/python/requirements.txt +3 -0
- fast_rich-0.3.0/benchmarks/results/python/v0.1.0/20251230_190513.json +54 -0
- fast_rich-0.3.0/benchmarks/results/python/v0.1.0/20251230_190817.json +54 -0
- fast_rich-0.3.0/benchmarks/results/python/v0.2.0/20251230_194322.json +9 -0
- fast_rich-0.3.0/benchmarks/results/python/v0.2.0/20251230_194339.json +9 -0
- fast_rich-0.3.0/benchmarks/results/python/v0.2.0/20251230_194347.json +9 -0
- fast_rich-0.3.0/benchmarks/results/python/v0.2.0/20251230_194408.json +54 -0
- fast_rich-0.3.0/bindings/python/Cargo.toml +12 -0
- fast_rich-0.3.0/bindings/python/FAST_RICH_PARITY.md +0 -0
- fast_rich-0.3.0/bindings/python/benchmarks/compare_performance.py +360 -0
- fast_rich-0.3.0/bindings/python/docs/api/index.md +110 -0
- fast_rich-0.3.0/bindings/python/docs/benchmarks.md +215 -0
- fast_rich-0.3.0/bindings/python/docs/components/console.md +210 -0
- fast_rich-0.3.0/bindings/python/docs/components/markdown.md +84 -0
- fast_rich-0.3.0/bindings/python/docs/components/more.md +264 -0
- fast_rich-0.3.0/bindings/python/docs/components/panel.md +124 -0
- fast_rich-0.3.0/bindings/python/docs/components/progress.md +183 -0
- fast_rich-0.3.0/bindings/python/docs/components/syntax.md +137 -0
- fast_rich-0.3.0/bindings/python/docs/components/table.md +216 -0
- fast_rich-0.3.0/bindings/python/docs/components/text.md +238 -0
- fast_rich-0.3.0/bindings/python/docs/components/tree.md +171 -0
- fast_rich-0.3.0/bindings/python/docs/getting-started/installation.md +55 -0
- fast_rich-0.3.0/bindings/python/docs/getting-started/migration.md +153 -0
- fast_rich-0.3.0/bindings/python/docs/getting-started/quickstart.md +241 -0
- fast_rich-0.3.0/bindings/python/docs/index.md +83 -0
- fast_rich-0.3.0/bindings/python/fast_rich/README.md +105 -0
- fast_rich-0.3.0/bindings/python/fast_rich/__init__.py +167 -0
- fast_rich-0.3.0/bindings/python/fast_rich/_print.py +95 -0
- fast_rich-0.3.0/bindings/python/fast_rich/abc.py +37 -0
- fast_rich-0.3.0/bindings/python/fast_rich/align.py +130 -0
- fast_rich-0.3.0/bindings/python/fast_rich/ansi.py +93 -0
- fast_rich-0.3.0/bindings/python/fast_rich/bar.py +67 -0
- fast_rich-0.3.0/bindings/python/fast_rich/box.py +176 -0
- fast_rich-0.3.0/bindings/python/fast_rich/cells.py +107 -0
- fast_rich-0.3.0/bindings/python/fast_rich/color.py +180 -0
- fast_rich-0.3.0/bindings/python/fast_rich/color_triplet.py +39 -0
- fast_rich-0.3.0/bindings/python/fast_rich/columns.py +96 -0
- fast_rich-0.3.0/bindings/python/fast_rich/console.py +382 -0
- fast_rich-0.3.0/bindings/python/fast_rich/console_options.py +131 -0
- fast_rich-0.3.0/bindings/python/fast_rich/constrain.py +47 -0
- fast_rich-0.3.0/bindings/python/fast_rich/containers.py +133 -0
- fast_rich-0.3.0/bindings/python/fast_rich/control.py +129 -0
- fast_rich-0.3.0/bindings/python/fast_rich/default_styles.py +170 -0
- fast_rich-0.3.0/bindings/python/fast_rich/diagnose.py +53 -0
- fast_rich-0.3.0/bindings/python/fast_rich/emoji.py +196 -0
- fast_rich-0.3.0/bindings/python/fast_rich/errors.py +55 -0
- fast_rich-0.3.0/bindings/python/fast_rich/file_proxy.py +77 -0
- fast_rich-0.3.0/bindings/python/fast_rich/filesize.py +97 -0
- fast_rich-0.3.0/bindings/python/fast_rich/highlighter.py +122 -0
- fast_rich-0.3.0/bindings/python/fast_rich/inspect.py +115 -0
- fast_rich-0.3.0/bindings/python/fast_rich/json.py +122 -0
- fast_rich-0.3.0/bindings/python/fast_rich/jupyter.py +78 -0
- fast_rich-0.3.0/bindings/python/fast_rich/layout.py +104 -0
- fast_rich-0.3.0/bindings/python/fast_rich/live.py +106 -0
- fast_rich-0.3.0/bindings/python/fast_rich/live_render.py +71 -0
- fast_rich-0.3.0/bindings/python/fast_rich/logging.py +137 -0
- fast_rich-0.3.0/bindings/python/fast_rich/markdown.py +89 -0
- fast_rich-0.3.0/bindings/python/fast_rich/markup.py +116 -0
- fast_rich-0.3.0/bindings/python/fast_rich/measure.py +106 -0
- fast_rich-0.3.0/bindings/python/fast_rich/padding.py +103 -0
- fast_rich-0.3.0/bindings/python/fast_rich/pager.py +70 -0
- fast_rich-0.3.0/bindings/python/fast_rich/palette.py +74 -0
- fast_rich-0.3.0/bindings/python/fast_rich/panel.py +133 -0
- fast_rich-0.3.0/bindings/python/fast_rich/pretty.py +169 -0
- fast_rich-0.3.0/bindings/python/fast_rich/progress.py +291 -0
- fast_rich-0.3.0/bindings/python/fast_rich/progress_bar.py +96 -0
- fast_rich-0.3.0/bindings/python/fast_rich/prompt.py +257 -0
- fast_rich-0.3.0/bindings/python/fast_rich/protocol.py +54 -0
- fast_rich-0.3.0/bindings/python/fast_rich/region.py +76 -0
- fast_rich-0.3.0/bindings/python/fast_rich/repr.py +50 -0
- fast_rich-0.3.0/bindings/python/fast_rich/rule.py +73 -0
- fast_rich-0.3.0/bindings/python/fast_rich/scope.py +51 -0
- fast_rich-0.3.0/bindings/python/fast_rich/screen.py +45 -0
- fast_rich-0.3.0/bindings/python/fast_rich/segment.py +156 -0
- fast_rich-0.3.0/bindings/python/fast_rich/spinner.py +350 -0
- fast_rich-0.3.0/bindings/python/fast_rich/status.py +106 -0
- fast_rich-0.3.0/bindings/python/fast_rich/style.py +171 -0
- fast_rich-0.3.0/bindings/python/fast_rich/styled.py +41 -0
- fast_rich-0.3.0/bindings/python/fast_rich/syntax.py +169 -0
- fast_rich-0.3.0/bindings/python/fast_rich/table.py +323 -0
- fast_rich-0.3.0/bindings/python/fast_rich/terminal_theme.py +96 -0
- fast_rich-0.3.0/bindings/python/fast_rich/text.py +203 -0
- fast_rich-0.3.0/bindings/python/fast_rich/theme.py +162 -0
- fast_rich-0.3.0/bindings/python/fast_rich/themes.py +95 -0
- fast_rich-0.3.0/bindings/python/fast_rich/traceback.py +180 -0
- fast_rich-0.3.0/bindings/python/fast_rich/tree.py +136 -0
- fast_rich-0.3.0/bindings/python/mkdocs.yml +81 -0
- fast_rich-0.3.0/bindings/python/rich_rust/__init__.py +0 -0
- fast_rich-0.3.0/bindings/python/src/columns.rs +46 -0
- fast_rich-0.3.0/bindings/python/src/console.rs +121 -0
- fast_rich-0.3.0/bindings/python/src/filesize.rs +12 -0
- fast_rich-0.3.0/bindings/python/src/inspect.rs +41 -0
- fast_rich-0.3.0/bindings/python/src/layout.rs +26 -0
- fast_rich-0.3.0/bindings/python/src/lib.rs +58 -0
- fast_rich-0.3.0/bindings/python/src/live.rs +24 -0
- fast_rich-0.3.0/bindings/python/src/markdown.rs +22 -0
- fast_rich-0.3.0/bindings/python/src/panel.rs +27 -0
- fast_rich-0.3.0/bindings/python/src/progress.rs +38 -0
- fast_rich-0.3.0/bindings/python/src/prompt.rs +14 -0
- fast_rich-0.3.0/bindings/python/src/rule.rs +25 -0
- fast_rich-0.3.0/bindings/python/src/style.rs +86 -0
- fast_rich-0.3.0/bindings/python/src/syntax.rs +38 -0
- fast_rich-0.3.0/bindings/python/src/table.rs +28 -0
- fast_rich-0.3.0/bindings/python/src/text.rs +68 -0
- fast_rich-0.3.0/bindings/python/src/traceback.rs +25 -0
- fast_rich-0.3.0/bindings/python/src/tree.rs +61 -0
- fast_rich-0.3.0/bindings/python/tests/conftest.py +27 -0
- fast_rich-0.3.0/bindings/python/tests/test_console_parity.py +130 -0
- fast_rich-0.3.0/bindings/python/tests/test_table_parity.py +128 -0
- fast_rich-0.3.0/bindings/python/tests/test_text_panel_parity.py +136 -0
- fast_rich-0.3.0/docs/api.md +28 -0
- fast_rich-0.3.0/docs/benchmarks.md +172 -0
- fast_rich-0.3.0/docs/index.md +51 -0
- fast_rich-0.3.0/docs/python_api.md +64 -0
- fast_rich-0.3.0/examples/hello.rs +36 -0
- fast_rich-0.3.0/examples/markup.rs +85 -0
- fast_rich-0.3.0/examples/panel.rs +95 -0
- fast_rich-0.3.0/examples/progress.rs +82 -0
- fast_rich-0.3.0/examples/styles.rs +95 -0
- fast_rich-0.3.0/examples/syntax.rs +45 -0
- fast_rich-0.3.0/examples/table.rs +98 -0
- fast_rich-0.3.0/examples/tree.rs +167 -0
- fast_rich-0.3.0/fast_rich/README.md +105 -0
- fast_rich-0.3.0/fast_rich/__init__.py +167 -0
- fast_rich-0.3.0/fast_rich/_print.py +95 -0
- fast_rich-0.3.0/fast_rich/abc.py +37 -0
- fast_rich-0.3.0/fast_rich/align.py +130 -0
- fast_rich-0.3.0/fast_rich/ansi.py +93 -0
- fast_rich-0.3.0/fast_rich/bar.py +67 -0
- fast_rich-0.3.0/fast_rich/box.py +176 -0
- fast_rich-0.3.0/fast_rich/cells.py +107 -0
- fast_rich-0.3.0/fast_rich/color.py +180 -0
- fast_rich-0.3.0/fast_rich/color_triplet.py +39 -0
- fast_rich-0.3.0/fast_rich/columns.py +96 -0
- fast_rich-0.3.0/fast_rich/console.py +382 -0
- fast_rich-0.3.0/fast_rich/console_options.py +131 -0
- fast_rich-0.3.0/fast_rich/constrain.py +47 -0
- fast_rich-0.3.0/fast_rich/containers.py +133 -0
- fast_rich-0.3.0/fast_rich/control.py +129 -0
- fast_rich-0.3.0/fast_rich/default_styles.py +170 -0
- fast_rich-0.3.0/fast_rich/diagnose.py +53 -0
- fast_rich-0.3.0/fast_rich/emoji.py +196 -0
- fast_rich-0.3.0/fast_rich/errors.py +55 -0
- fast_rich-0.3.0/fast_rich/file_proxy.py +77 -0
- fast_rich-0.3.0/fast_rich/filesize.py +97 -0
- fast_rich-0.3.0/fast_rich/highlighter.py +122 -0
- fast_rich-0.3.0/fast_rich/inspect.py +115 -0
- fast_rich-0.3.0/fast_rich/json.py +122 -0
- fast_rich-0.3.0/fast_rich/jupyter.py +78 -0
- fast_rich-0.3.0/fast_rich/layout.py +104 -0
- fast_rich-0.3.0/fast_rich/live.py +106 -0
- fast_rich-0.3.0/fast_rich/live_render.py +71 -0
- fast_rich-0.3.0/fast_rich/logging.py +137 -0
- fast_rich-0.3.0/fast_rich/markdown.py +89 -0
- fast_rich-0.3.0/fast_rich/markup.py +116 -0
- fast_rich-0.3.0/fast_rich/measure.py +106 -0
- fast_rich-0.3.0/fast_rich/padding.py +103 -0
- fast_rich-0.3.0/fast_rich/pager.py +70 -0
- fast_rich-0.3.0/fast_rich/palette.py +74 -0
- fast_rich-0.3.0/fast_rich/panel.py +133 -0
- fast_rich-0.3.0/fast_rich/pretty.py +169 -0
- fast_rich-0.3.0/fast_rich/progress.py +291 -0
- fast_rich-0.3.0/fast_rich/progress_bar.py +96 -0
- fast_rich-0.3.0/fast_rich/prompt.py +257 -0
- fast_rich-0.3.0/fast_rich/protocol.py +54 -0
- fast_rich-0.3.0/fast_rich/region.py +76 -0
- fast_rich-0.3.0/fast_rich/repr.py +50 -0
- fast_rich-0.3.0/fast_rich/rule.py +73 -0
- fast_rich-0.3.0/fast_rich/scope.py +51 -0
- fast_rich-0.3.0/fast_rich/screen.py +45 -0
- fast_rich-0.3.0/fast_rich/segment.py +156 -0
- fast_rich-0.3.0/fast_rich/spinner.py +350 -0
- fast_rich-0.3.0/fast_rich/status.py +106 -0
- fast_rich-0.3.0/fast_rich/style.py +171 -0
- fast_rich-0.3.0/fast_rich/styled.py +41 -0
- fast_rich-0.3.0/fast_rich/syntax.py +169 -0
- fast_rich-0.3.0/fast_rich/table.py +323 -0
- fast_rich-0.3.0/fast_rich/terminal_theme.py +96 -0
- fast_rich-0.3.0/fast_rich/text.py +203 -0
- fast_rich-0.3.0/fast_rich/theme.py +162 -0
- fast_rich-0.3.0/fast_rich/themes.py +95 -0
- fast_rich-0.3.0/fast_rich/traceback.py +180 -0
- fast_rich-0.3.0/fast_rich/tree.py +136 -0
- fast_rich-0.3.0/mkdocs.yml +41 -0
- fast_rich-0.3.0/pyproject.toml +54 -0
- fast_rich-0.3.0/scripts/benchmark_runner.py +69 -0
- fast_rich-0.3.0/src/columns.rs +224 -0
- fast_rich-0.3.0/src/console.rs +472 -0
- fast_rich-0.3.0/src/emoji.rs +444 -0
- fast_rich-0.3.0/src/filesize.rs +52 -0
- fast_rich-0.3.0/src/inspect.rs +45 -0
- fast_rich-0.3.0/src/layout.rs +108 -0
- fast_rich-0.3.0/src/lib.rs +150 -0
- fast_rich-0.3.0/src/live.rs +50 -0
- fast_rich-0.3.0/src/log.rs +322 -0
- fast_rich-0.3.0/src/markdown.rs +387 -0
- fast_rich-0.3.0/src/markup.rs +261 -0
- fast_rich-0.3.0/src/panel.rs +387 -0
- fast_rich-0.3.0/src/progress/bar.rs +492 -0
- fast_rich-0.3.0/src/progress/mod.rs +17 -0
- fast_rich-0.3.0/src/progress/spinner.rs +206 -0
- fast_rich-0.3.0/src/progress/status.rs +171 -0
- fast_rich-0.3.0/src/progress/track.rs +132 -0
- fast_rich-0.3.0/src/prompt.rs +45 -0
- fast_rich-0.3.0/src/renderable.rs +160 -0
- fast_rich-0.3.0/src/rule.rs +174 -0
- fast_rich-0.3.0/src/style.rs +567 -0
- fast_rich-0.3.0/src/syntax.rs +271 -0
- fast_rich-0.3.0/src/table.rs +683 -0
- fast_rich-0.3.0/src/text.rs +463 -0
- fast_rich-0.3.0/src/traceback.rs +244 -0
- fast_rich-0.3.0/src/tree.rs +349 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: detailed workflow for benchmarking code including versioning and report generation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
1. **Setup & Versioning**:
|
|
6
|
+
* **Never Overwrite**: Always create a new versioned entry in `benchmarks/results/<lang>/<version>/`.
|
|
7
|
+
* Use `scripts/benchmark_runner.py` to ensure consistency.
|
|
8
|
+
* Ensure `benchmarks/requirements.txt` (if Python) is up to date.
|
|
9
|
+
|
|
10
|
+
2. **Execution steps**:
|
|
11
|
+
* **Baseline**: If optimizing, establish a baseline vX.Y.Z-baseline first.
|
|
12
|
+
* **Run**: Execute benchmarks targeting the specific component.
|
|
13
|
+
* **Commit**: `git add benchmarks/results/... && git commit -m "bench: record baseline for <feature>"`
|
|
14
|
+
|
|
15
|
+
3. **Analysis**:
|
|
16
|
+
* Compare new JSON against baseline JSON.
|
|
17
|
+
* **Optimization Validated**: If speedup > 5%, document in `CHANGELOG.md`.
|
|
18
|
+
* **Regression Check**: If slowdown > 5%, **STOP** and investigate.
|
|
19
|
+
|
|
20
|
+
4. **Reporting**:
|
|
21
|
+
* Update `docs/benchmarks.md` with new summary tables.
|
|
22
|
+
* Update `RICH_RUST_PLAN.md` with the latest result path.
|
|
23
|
+
* **Commit**: `git commit -m "docs: update benchmark report"`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: detailed workflow for coding tasks ensuring high quality, atomic commits, and stability
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
When asking to write code or implement features, strictly follow this workflow:
|
|
6
|
+
|
|
7
|
+
1. **Analyze and Plan**:
|
|
8
|
+
* Understand the requirements deeply.
|
|
9
|
+
* Check `RICH_RUST_PLAN.md` for context.
|
|
10
|
+
* If complex, create an `implementation_plan.md` first.
|
|
11
|
+
|
|
12
|
+
2. **Implementation Loop (Per Feature)**:
|
|
13
|
+
* **Atomic Scope**: Work on one small, verifiable feature at a time.
|
|
14
|
+
* **Test-Driven**: Write tests *alongside* the code.
|
|
15
|
+
* **Verify**: Run `cargo check` and `cargo test` immediately.
|
|
16
|
+
* **Lint**: Run `cargo clippy` and `cargo fmt --all`.
|
|
17
|
+
* **Strict Check**: You MUST run `cargo fmt --all -- --check` to verify CI compliance.
|
|
18
|
+
* **Commit**: **IMMEDIATELY** add and commit verification passes.
|
|
19
|
+
* Command: `git add <files> && git commit -m "feat: <concise description>"`
|
|
20
|
+
* *Never accumulate multiple features in one uncommitted state.*
|
|
21
|
+
|
|
22
|
+
3. **Refactor & Polish**:
|
|
23
|
+
* Review API ergonomics (Builders, specific types).
|
|
24
|
+
* Ensure no `unsafe` unless strictly documented and necessary.
|
|
25
|
+
* **Commit**: `git commit -m "refactor: <description>"`
|
|
26
|
+
|
|
27
|
+
4. **Final Verification**:
|
|
28
|
+
* Run full suite: `cargo test --workspace`.
|
|
29
|
+
* Check examples: Run a relevant example from `examples/`.
|
|
30
|
+
|
|
31
|
+
**Rule of Thumb**: If you have written >50 lines of code without a commit, you are doing it wrong.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: workflow for fixing bugs and issues
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
1. **Reproduce**:
|
|
6
|
+
* Create a minimal reproduction code snippet.
|
|
7
|
+
* Create a new test case in a `tests/` file that fails (demonstrates the bug).
|
|
8
|
+
|
|
9
|
+
2. **Diagnose**:
|
|
10
|
+
* Use logging (`trace!`, `debug!`) or `inspect!` to trace execution.
|
|
11
|
+
* Analyze the stack trace if it's a panic.
|
|
12
|
+
|
|
13
|
+
3. **Fix**:
|
|
14
|
+
* Apply the fix.
|
|
15
|
+
* Ensure the reproduction test case now passes.
|
|
16
|
+
|
|
17
|
+
4. **Regression Test**:
|
|
18
|
+
* Keep the reproduction test in the codebase to prevent regression.
|
|
19
|
+
* Run full test suite.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: workflow for documentation of the code
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
1. **Code Comments**:
|
|
6
|
+
* Ensure all public items (structs, enums, functions, traits) have `///` doc comments.
|
|
7
|
+
* Use sections in doc comments: `# Examples`, `# Panics`, `# Errors`.
|
|
8
|
+
|
|
9
|
+
2. **Generate Docs**:
|
|
10
|
+
* Run `cargo doc --no-deps --open` to preview documentation.
|
|
11
|
+
* Check for broken links.
|
|
12
|
+
|
|
13
|
+
3. **Project Docs**:
|
|
14
|
+
* Maintain `README.md` with:
|
|
15
|
+
* Project overview
|
|
16
|
+
* Installation instructions
|
|
17
|
+
* Quick start examples
|
|
18
|
+
* Feature list
|
|
19
|
+
* Maintain `CHANGELOG.md`.
|
|
20
|
+
|
|
21
|
+
4. **Examples**:
|
|
22
|
+
* Ensure `examples/` directory contains runnable code demonstrating features.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: workflow for maintaining dependencies and cleanup
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
1. **Check Outdated Dependencies**:
|
|
6
|
+
* Run `cargo outdated` (requires `cargo-outdated`) or check crates.io manually.
|
|
7
|
+
* Update minimal versions in `Cargo.toml` if necessary (e.g. for security fixes).
|
|
8
|
+
|
|
9
|
+
2. **Update Lockfile**:
|
|
10
|
+
* Run `cargo update` to update `Cargo.lock` within compatible semver ranges.
|
|
11
|
+
* Run tests (`cargo test --all-features`) immediately after updating.
|
|
12
|
+
|
|
13
|
+
3. **Clean Build Artifacts**:
|
|
14
|
+
* Run `cargo clean` occasionally to free disk space or resolve weird build errors.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: strict workflow for publishing releases to crates.io and PyPI
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
1. **Pre-Release Check**:
|
|
6
|
+
* **Tests**: `cargo test --workspace` MUST pass.
|
|
7
|
+
* **Lints**: `cargo clippy --workspace -- -D warnings` MUST be clean.
|
|
8
|
+
* **Docs**: `cargo doc --no-deps` MUST succeed.
|
|
9
|
+
* **Clean Git**: `git status` MUST be clean.
|
|
10
|
+
|
|
11
|
+
2. **Versioning**:
|
|
12
|
+
* Bump version in `Cargo.toml`.
|
|
13
|
+
* Bump version in `bindings/python/Cargo.toml`.
|
|
14
|
+
* Update `CHANGELOG.md` with release notes and date.
|
|
15
|
+
* **Commit**: `git commit -am "chore: release vX.Y.Z"`
|
|
16
|
+
|
|
17
|
+
3. **Dry Run**:
|
|
18
|
+
* `cargo publish --dry-run`
|
|
19
|
+
* `maturin build` (ensure wheels generated)
|
|
20
|
+
|
|
21
|
+
4. **Release Interaction**:
|
|
22
|
+
* **ASK USER** for confirmation to publish.
|
|
23
|
+
* On approval:
|
|
24
|
+
1. `cargo publish`
|
|
25
|
+
2. `git tag vX.Y.Z`
|
|
26
|
+
3. `git push origin vX.Y.Z`
|
|
27
|
+
|
|
28
|
+
5. **Post-Release**:
|
|
29
|
+
* Update `RICH_RUST_PLAN.md` start next iteration.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: workflow for reviewing code quality, correctness, and enforcing professional standards
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
When asked to review code:
|
|
6
|
+
|
|
7
|
+
1. **Strict Linting & Formatting**:
|
|
8
|
+
* **Format**: Run `cargo fmt --all`.
|
|
9
|
+
* **CI Compliance**: Run `cargo fmt --all -- --check` to guarantee CI passes.
|
|
10
|
+
* **Lint**: Run `cargo clippy --workspace -- -D warnings`.
|
|
11
|
+
* **Commit Fixes**: If the review triggers changes, `git commit -m "style: apply review fixes"` immediately.
|
|
12
|
+
|
|
13
|
+
2. **Safety Logic**:
|
|
14
|
+
* **Unsafe Audit**: Grep for `unsafe`. If found, it MUST have a `// SAFETY:` comment explaining why it holds.
|
|
15
|
+
* **Error Handling**: No `unwrap()` in `src/` (library code). Use `?` and custom errors.
|
|
16
|
+
* **Public API**: Ensure all `pub` items have doc strings.
|
|
17
|
+
|
|
18
|
+
3. **Test Coverage**:
|
|
19
|
+
* Run `cargo test --workspace`.
|
|
20
|
+
* If a bug is found, write a reproduction test case *first*.
|
|
21
|
+
|
|
22
|
+
4. **Documentation**:
|
|
23
|
+
* Check `README.md` and `CHANGELOG.md` are consistent with the code.
|
|
24
|
+
* Ensure `examples/` compile and run.
|
|
25
|
+
|
|
26
|
+
5. **Final Polish**:
|
|
27
|
+
* Does code look "Professional"? (Consistent naming, no commented-out blocks, no "TODOs" left in critical paths).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: workflow for checking security vulnerabilities
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
1. **Vulnerability Scanning**:
|
|
6
|
+
* Install `cargo-audit` if not present: `cargo install cargo-audit`.
|
|
7
|
+
* Run `cargo audit` to check for specific vulnerabilities in dependencies.
|
|
8
|
+
|
|
9
|
+
2. **Unsafe Code Review**:
|
|
10
|
+
* Search for `unsafe` blocks: `grep -r "unsafe" src/`.
|
|
11
|
+
* Audit each block for soundness and ensure comments explain safety.
|
|
12
|
+
|
|
13
|
+
3. **Fuzzing** (Optional):
|
|
14
|
+
* Use `cargo-fuzz` for parsing logic (markup, markdown).
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: workflow for testing the library
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
1. **Unit Tests**:
|
|
6
|
+
* Run `cargo test --lib` to test core logic.
|
|
7
|
+
* Ensure all modules have a `#[cfg(test)] mod tests` section.
|
|
8
|
+
|
|
9
|
+
2. **Integration Tests**:
|
|
10
|
+
* Run integration tests in `tests/` directory (if any) via `cargo test --test '*'`.
|
|
11
|
+
|
|
12
|
+
3. **Doc Tests**:
|
|
13
|
+
* Run `cargo test --doc` to verify code examples in comments.
|
|
14
|
+
|
|
15
|
+
4. **Feature Permutations**:
|
|
16
|
+
* Run tests with all features: `cargo test --all-features`.
|
|
17
|
+
* Run tests with no features: `cargo test --no-default-features`.
|
|
18
|
+
|
|
19
|
+
5. **Visual Verification**:
|
|
20
|
+
* Run examples to ensure output looks correct: `cargo run --example <name>`.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: workflow for managing code versions and changelog
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
1. **Check Current Version**:
|
|
6
|
+
* Read `Cargo.toml` [package] section.
|
|
7
|
+
|
|
8
|
+
2. **Determine Bump Type**:
|
|
9
|
+
* **Major**: Breaking API changes.
|
|
10
|
+
* **Minor**: New features, backwards compatible.
|
|
11
|
+
* **Patch**: Bug fixes, backwards compatible.
|
|
12
|
+
|
|
13
|
+
3. **Update Files**:
|
|
14
|
+
* Update `version` in `Cargo.toml`.
|
|
15
|
+
* Update `CHANGELOG.md` with a new header `[Version] - YYYY-MM-DD`.
|
|
16
|
+
* Move "Unreleased" changes to the new version section.
|
|
17
|
+
|
|
18
|
+
4. **Tagging (Git)**:
|
|
19
|
+
* Create a git commit: `chore: Bump version to X.Y.Z`.
|
|
20
|
+
* Create a git tag: `git tag vX.Y.Z`.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
deploy:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Configure Git Credentials
|
|
19
|
+
run: |
|
|
20
|
+
git config user.name github-actions[bot]
|
|
21
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
22
|
+
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: 3.x
|
|
26
|
+
|
|
27
|
+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
28
|
+
|
|
29
|
+
- uses: actions/cache@v4
|
|
30
|
+
with:
|
|
31
|
+
key: mkdocs-material-${{ env.cache_id }}
|
|
32
|
+
path: .cache
|
|
33
|
+
restore-keys: |
|
|
34
|
+
mkdocs-material-
|
|
35
|
+
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
working-directory: bindings/python
|
|
38
|
+
run: pip install mkdocs-material
|
|
39
|
+
|
|
40
|
+
- name: Build documentation
|
|
41
|
+
working-directory: bindings/python
|
|
42
|
+
run: mkdocs build
|
|
43
|
+
|
|
44
|
+
- name: Deploy documentation
|
|
45
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
46
|
+
working-directory: bindings/python
|
|
47
|
+
run: mkdocs gh-deploy --force
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: Test Suite
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- name: Set up Rust
|
|
19
|
+
uses: dtolnay/rust-toolchain@stable
|
|
20
|
+
- name: Cache dependencies
|
|
21
|
+
uses: Swatinem/rust-cache@v2
|
|
22
|
+
- name: Build
|
|
23
|
+
run: cargo build --verbose
|
|
24
|
+
- name: Run tests
|
|
25
|
+
run: cargo test --all-features --verbose
|
|
26
|
+
|
|
27
|
+
clippy:
|
|
28
|
+
name: Clippy
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- name: Set up Rust
|
|
33
|
+
uses: dtolnay/rust-toolchain@stable
|
|
34
|
+
with:
|
|
35
|
+
components: clippy
|
|
36
|
+
- name: Cache dependencies
|
|
37
|
+
uses: Swatinem/rust-cache@v2
|
|
38
|
+
- name: Lint
|
|
39
|
+
run: cargo clippy --all-features -- -D warnings
|
|
40
|
+
|
|
41
|
+
fmt:
|
|
42
|
+
name: Rustfmt
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
- name: Set up Rust
|
|
47
|
+
uses: dtolnay/rust-toolchain@stable
|
|
48
|
+
with:
|
|
49
|
+
components: rustfmt
|
|
50
|
+
- name: Check formatting
|
|
51
|
+
run: cargo fmt --all -- --check
|
|
52
|
+
|
|
53
|
+
bindings:
|
|
54
|
+
name: Python Bindings
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
- uses: actions/setup-python@v5
|
|
59
|
+
with:
|
|
60
|
+
python-version: '3.10'
|
|
61
|
+
- name: Set up Rust
|
|
62
|
+
uses: dtolnay/rust-toolchain@stable
|
|
63
|
+
- name: Install maturin
|
|
64
|
+
run: pip install maturin
|
|
65
|
+
- name: Build bindings
|
|
66
|
+
working-directory: bindings/python
|
|
67
|
+
run: maturin build
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/target
|
|
2
|
+
|
|
3
|
+
# Python
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*$py.class
|
|
7
|
+
*.so
|
|
8
|
+
.Python
|
|
9
|
+
build/
|
|
10
|
+
develop-eggs/
|
|
11
|
+
dist/
|
|
12
|
+
downloads/
|
|
13
|
+
eggs/
|
|
14
|
+
.eggs/
|
|
15
|
+
lib/
|
|
16
|
+
lib64/
|
|
17
|
+
parts/
|
|
18
|
+
sdist/
|
|
19
|
+
var/
|
|
20
|
+
wheels/
|
|
21
|
+
share/python-wheels/
|
|
22
|
+
*.egg-info/
|
|
23
|
+
.installed.cfg
|
|
24
|
+
*.egg
|
|
25
|
+
MANIFEST
|
|
26
|
+
|
|
27
|
+
# Virtual Environments
|
|
28
|
+
venv/
|
|
29
|
+
.env
|
|
30
|
+
.venv
|
|
31
|
+
env/
|
|
32
|
+
ENV/
|
|
33
|
+
env.bak/
|
|
34
|
+
venv.bak/
|
|
35
|
+
|
|
36
|
+
# MkDocs
|
|
37
|
+
site/
|
|
38
|
+
|
|
39
|
+
# IDE
|
|
40
|
+
.idea/
|
|
41
|
+
.vscode/
|
|
42
|
+
|
|
43
|
+
# OS
|
|
44
|
+
.DS_Store
|
|
45
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.2.0] - 2025-12-30
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Layout**: New tiling layout engine (`Layout`, `split_row`, `split_column`).
|
|
14
|
+
- **Live**: Live display updating (`Live` context manager).
|
|
15
|
+
- **Prompt**: Interactive user input handling (`Prompt.ask`).
|
|
16
|
+
- **Inspect**: Object introspection tool (`inspect()`) for Rust and Python objects.
|
|
17
|
+
- **Filesize**: Utilities for human-readable file sizes (`decimal`, `binary`).
|
|
18
|
+
- **Bindings**: Full Python bindings for all new modules.
|
|
19
|
+
- **Benchmarks**: Comparisons for `Layout` and `Inspect` scenarios.
|
|
20
|
+
- **CI**: Strict enforcing of atomic commits and formatting.
|
|
21
|
+
|
|
22
|
+
## [0.1.1] - 2025-12-30
|
|
23
|
+
|
|
24
|
+
### Improved
|
|
25
|
+
- **Syntax Highlighting Performance**: Optimized `Syntax` rendering speed by **3.5x** (14.5s -> 4.2s for 1000 iterations) by using `OnceLock` for global syntax/theme set caching. This resolved a major bottleneck where large binary dumps were reloaded on every instantiation.
|
|
26
|
+
|
|
27
|
+
## [0.1.0] - 2025-12-30
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
- **Core Library**: Implemented Rust port of Rich's core components:
|
|
31
|
+
- `Console` with style and color support.
|
|
32
|
+
- `Table` with auto-sizing and unicode borders.
|
|
33
|
+
- `Tree` for hierarchical data.
|
|
34
|
+
- `Panel` and `Rule` layouts.
|
|
35
|
+
- `Progress` bars with spinners.
|
|
36
|
+
- `Markdown` rendering via `pulldown-cmark`.
|
|
37
|
+
- `Syntax` highlighting via `syntect`.
|
|
38
|
+
- `Traceback` beautiful error reporting.
|
|
39
|
+
- `Logging` handler.
|
|
40
|
+
- **Python Bindings**: Full ABI3-compatible Python extension module (`rich_rust`) exposing all core components.
|
|
41
|
+
- **Benchmarks**: Comprehensive suite proving 2x-24x performance improvements over Python `rich`.
|
|
42
|
+
- Logging: 24x faster.
|
|
43
|
+
- Columns: 23x faster.
|
|
44
|
+
- Table: 17x faster.
|
|
45
|
+
- Tree: 11x faster.
|
|
46
|
+
- Markdown: 9x faster.
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
- Fixed duplicate `dev-dependencies` in `Cargo.toml`.
|
|
50
|
+
- Resolved all Clippy warnings in core and bindings.
|