dataviz-rs 0.1.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.
Files changed (107) hide show
  1. dataviz_rs-0.1.0/.github/workflows/mcp-release.yml +73 -0
  2. dataviz_rs-0.1.0/.github/workflows/pages.yml +62 -0
  3. dataviz_rs-0.1.0/.github/workflows/python.yml +85 -0
  4. dataviz_rs-0.1.0/.github/workflows/rust.yml +75 -0
  5. dataviz_rs-0.1.0/.gitignore +30 -0
  6. dataviz_rs-0.1.0/CHANGELOG.md +662 -0
  7. dataviz_rs-0.1.0/Cargo.lock +2708 -0
  8. dataviz_rs-0.1.0/Cargo.toml +58 -0
  9. dataviz_rs-0.1.0/LICENSE +21 -0
  10. dataviz_rs-0.1.0/PKG-INFO +110 -0
  11. dataviz_rs-0.1.0/README.md +573 -0
  12. dataviz_rs-0.1.0/assets/DejaVuSans-LICENSE.txt +48 -0
  13. dataviz_rs-0.1.0/assets/DejaVuSans.ttf +0 -0
  14. dataviz_rs-0.1.0/assets/README.md +10 -0
  15. dataviz_rs-0.1.0/assets/admin1.bin +0 -0
  16. dataviz_rs-0.1.0/assets/world_110m.bin +0 -0
  17. dataviz_rs-0.1.0/book/book.toml +11 -0
  18. dataviz_rs-0.1.0/book/src/choosing.md +25 -0
  19. dataviz_rs-0.1.0/book/src/claude.md +27 -0
  20. dataviz_rs-0.1.0/book/src/data.md +35 -0
  21. dataviz_rs-0.1.0/book/src/install.md +44 -0
  22. dataviz_rs-0.1.0/book/src/interactive.md +64 -0
  23. dataviz_rs-0.1.0/book/src/introduction.md +33 -0
  24. dataviz_rs-0.1.0/book/src/maps.md +19 -0
  25. dataviz_rs-0.1.0/book/src/output.md +25 -0
  26. dataviz_rs-0.1.0/book/src/python.md +56 -0
  27. dataviz_rs-0.1.0/book/src/quickstart.md +47 -0
  28. dataviz_rs-0.1.0/book/src/three_d.md +33 -0
  29. dataviz_rs-0.1.0/examples/plot_backends.rs +74 -0
  30. dataviz_rs-0.1.0/examples/plot_gallery.rs +713 -0
  31. dataviz_rs-0.1.0/examples/plot_interactive.rs +35 -0
  32. dataviz_rs-0.1.0/examples/plot_smoke.rs +71 -0
  33. dataviz_rs-0.1.0/examples/plot_terminal.rs +15 -0
  34. dataviz_rs-0.1.0/pyproject.toml +33 -0
  35. dataviz_rs-0.1.0/python/.gitignore +5 -0
  36. dataviz_rs-0.1.0/python/Cargo.toml +20 -0
  37. dataviz_rs-0.1.0/python/README.md +90 -0
  38. dataviz_rs-0.1.0/python/benchmarks/bench_vs_matplotlib.py +51 -0
  39. dataviz_rs-0.1.0/python/dataviz/__init__.py +433 -0
  40. dataviz_rs-0.1.0/python/src/lib.rs +656 -0
  41. dataviz_rs-0.1.0/python/tests/test_dataviz.py +128 -0
  42. dataviz_rs-0.1.0/src/lib.rs +51 -0
  43. dataviz_rs-0.1.0/src/plot/a11y.rs +380 -0
  44. dataviz_rs-0.1.0/src/plot/anim.rs +907 -0
  45. dataviz_rs-0.1.0/src/plot/axes.rs +1890 -0
  46. dataviz_rs-0.1.0/src/plot/axis.rs +395 -0
  47. dataviz_rs-0.1.0/src/plot/brush.rs +194 -0
  48. dataviz_rs-0.1.0/src/plot/color.rs +614 -0
  49. dataviz_rs-0.1.0/src/plot/data.rs +304 -0
  50. dataviz_rs-0.1.0/src/plot/facet.rs +163 -0
  51. dataviz_rs-0.1.0/src/plot/figure.rs +555 -0
  52. dataviz_rs-0.1.0/src/plot/geo.rs +1055 -0
  53. dataviz_rs-0.1.0/src/plot/geo_more.rs +652 -0
  54. dataviz_rs-0.1.0/src/plot/gpu.rs +2112 -0
  55. dataviz_rs-0.1.0/src/plot/gpu.wgsl +398 -0
  56. dataviz_rs-0.1.0/src/plot/html.rs +509 -0
  57. dataviz_rs-0.1.0/src/plot/interact.rs +281 -0
  58. dataviz_rs-0.1.0/src/plot/legend.rs +348 -0
  59. dataviz_rs-0.1.0/src/plot/math.rs +1159 -0
  60. dataviz_rs-0.1.0/src/plot/mod.rs +66 -0
  61. dataviz_rs-0.1.0/src/plot/output.rs +462 -0
  62. dataviz_rs-0.1.0/src/plot/raster.rs +3072 -0
  63. dataviz_rs-0.1.0/src/plot/render.rs +111 -0
  64. dataviz_rs-0.1.0/src/plot/scale.rs +88 -0
  65. dataviz_rs-0.1.0/src/plot/scene.rs +1024 -0
  66. dataviz_rs-0.1.0/src/plot/series/bar.rs +387 -0
  67. dataviz_rs-0.1.0/src/plot/series/bio.rs +1285 -0
  68. dataviz_rs-0.1.0/src/plot/series/bio3d.rs +1321 -0
  69. dataviz_rs-0.1.0/src/plot/series/contour.rs +486 -0
  70. dataviz_rs-0.1.0/src/plot/series/distribution.rs +608 -0
  71. dataviz_rs-0.1.0/src/plot/series/engineering.rs +1096 -0
  72. dataviz_rs-0.1.0/src/plot/series/evaluation.rs +846 -0
  73. dataviz_rs-0.1.0/src/plot/series/finance.rs +643 -0
  74. dataviz_rs-0.1.0/src/plot/series/frameless.rs +1719 -0
  75. dataviz_rs-0.1.0/src/plot/series/general.rs +1450 -0
  76. dataviz_rs-0.1.0/src/plot/series/genome.rs +1300 -0
  77. dataviz_rs-0.1.0/src/plot/series/grid.rs +595 -0
  78. dataviz_rs-0.1.0/src/plot/series/line.rs +886 -0
  79. dataviz_rs-0.1.0/src/plot/series/misc.rs +859 -0
  80. dataviz_rs-0.1.0/src/plot/series/ml.rs +666 -0
  81. dataviz_rs-0.1.0/src/plot/series/mod.rs +713 -0
  82. dataviz_rs-0.1.0/src/plot/series/polar.rs +586 -0
  83. dataviz_rs-0.1.0/src/plot/series/scatter.rs +437 -0
  84. dataviz_rs-0.1.0/src/plot/series/signal.rs +496 -0
  85. dataviz_rs-0.1.0/src/plot/series/stats.rs +955 -0
  86. dataviz_rs-0.1.0/src/plot/series/three_d.rs +3312 -0
  87. dataviz_rs-0.1.0/src/plot/series/trading.rs +693 -0
  88. dataviz_rs-0.1.0/src/plot/spec.rs +847 -0
  89. dataviz_rs-0.1.0/src/plot/stats.rs +1288 -0
  90. dataviz_rs-0.1.0/src/plot/style.rs +230 -0
  91. dataviz_rs-0.1.0/src/plot/terminal.rs +210 -0
  92. dataviz_rs-0.1.0/src/plot/text.rs +744 -0
  93. dataviz_rs-0.1.0/src/plot/theme.rs +276 -0
  94. dataviz_rs-0.1.0/src/plot/ticks.rs +622 -0
  95. dataviz_rs-0.1.0/src/plot/time.rs +201 -0
  96. dataviz_rs-0.1.0/src/plot/window.rs +1501 -0
  97. dataviz_rs-0.1.0/tests/interop.rs +34 -0
  98. dataviz_rs-0.1.0/tests/plot.rs +606 -0
  99. dataviz_rs-0.1.0/tools/README.template.md +427 -0
  100. dataviz_rs-0.1.0/tools/ansi_to_png.py +61 -0
  101. dataviz_rs-0.1.0/tools/book.py +78 -0
  102. dataviz_rs-0.1.0/tools/ci.sh +17 -0
  103. dataviz_rs-0.1.0/tools/gallery.py +114 -0
  104. dataviz_rs-0.1.0/tools/gen_admin1.py +88 -0
  105. dataviz_rs-0.1.0/tools/gen_world.py +51 -0
  106. dataviz_rs-0.1.0/tools/perf_section.py +108 -0
  107. dataviz_rs-0.1.0/tools/readme.py +29 -0
@@ -0,0 +1,73 @@
1
+ name: dataviz-mcp release
2
+ # Push a tag `mcp-vX.Y.Z` to build the MCP server for the Claude plugin's
3
+ # launcher (claude-plugin/bin/dataviz-mcp-launcher) and attach it to the
4
+ # GitHub release of that tag.
5
+ on:
6
+ push:
7
+ tags: ["mcp-v*"]
8
+ # Rebuild the binaries of an existing tag.
9
+ workflow_dispatch:
10
+ inputs:
11
+ tag:
12
+ description: "Tag, e.g. mcp-v0.1.0"
13
+ required: true
14
+
15
+ permissions:
16
+ contents: write
17
+
18
+ env:
19
+ TAG: ${{ inputs.tag || github.ref_name }}
20
+ CARGO_TERM_COLOR: always
21
+
22
+ jobs:
23
+ release:
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ with:
28
+ ref: ${{ env.TAG }}
29
+ - name: Create the release
30
+ env:
31
+ GH_TOKEN: ${{ github.token }}
32
+ run: gh release view "$TAG" || gh release create "$TAG" --title "dataviz-mcp ${TAG#mcp-v}" --notes "MCP server of the dataviz Claude plugin. Install the plugin with \`/plugin marketplace add dataviz-rs/dataviz\` and \`/plugin install dataviz@dataviz\`, or the server with \`cargo install dataviz-mcp\`."
33
+
34
+ build:
35
+ needs: release
36
+ strategy:
37
+ fail-fast: false
38
+ matrix:
39
+ include:
40
+ # Linux: static (musl) binaries run on any distribution, whatever
41
+ # its glibc version.
42
+ - { os: ubuntu-latest, target: x86_64-unknown-linux-musl }
43
+ - { os: ubuntu-24.04-arm, target: aarch64-unknown-linux-musl }
44
+ # Intel Macs: cross-compiled on Apple silicon (older macOS images are retired).
45
+ - { os: macos-latest, target: x86_64-apple-darwin }
46
+ - { os: macos-latest, target: aarch64-apple-darwin }
47
+ - { os: windows-latest, target: x86_64-pc-windows-msvc }
48
+ runs-on: ${{ matrix.os }}
49
+ steps:
50
+ - uses: actions/checkout@v4
51
+ with:
52
+ ref: ${{ env.TAG }}
53
+ - uses: dtolnay/rust-toolchain@stable
54
+ with:
55
+ targets: ${{ matrix.target }}
56
+ - uses: Swatinem/rust-cache@v2
57
+ - name: Build
58
+ run: cargo build --release -p dataviz-mcp --target ${{ matrix.target }}
59
+ - name: Package and upload
60
+ shell: bash
61
+ env:
62
+ GH_TOKEN: ${{ github.token }}
63
+ run: |
64
+ cd target/${{ matrix.target }}/release
65
+ if [ "${{ runner.os }}" = "Windows" ]; then
66
+ 7z a "dataviz-mcp-${{ matrix.target }}.zip" dataviz-mcp.exe
67
+ asset="dataviz-mcp-${{ matrix.target }}.zip"
68
+ else
69
+ strip dataviz-mcp || true
70
+ tar -czf "dataviz-mcp-${{ matrix.target }}.tar.gz" dataviz-mcp
71
+ asset="dataviz-mcp-${{ matrix.target }}.tar.gz"
72
+ fi
73
+ gh release upload "$TAG" "$asset" --clobber
@@ -0,0 +1,62 @@
1
+ name: Guide and demo (GitHub Pages)
2
+ # Builds the guide (book/, chart catalog from the examples' READMEs) and the
3
+ # WebAssembly demo (dataviz-examples/plot-wasm, built against this
4
+ # checkout) and publishes them at https://dataviz-rs.github.io/dataviz/.
5
+ on:
6
+ push:
7
+ branches: [main]
8
+ paths: ["book/**", "tools/book.py", "tools/gallery.py", "tools/perf_section.py", "src/**", ".github/workflows/pages.yml"]
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: read
13
+ pages: write
14
+ id-token: write
15
+
16
+ concurrency:
17
+ group: pages
18
+ cancel-in-progress: true
19
+
20
+ jobs:
21
+ build:
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ - uses: actions/checkout@v4
26
+ with:
27
+ repository: dataviz-rs/dataviz-examples
28
+ path: ex
29
+ - uses: dtolnay/rust-toolchain@stable
30
+ with:
31
+ targets: wasm32-unknown-unknown
32
+ - uses: Swatinem/rust-cache@v2
33
+ with:
34
+ workspaces: ex
35
+ - name: Install mdBook
36
+ run: |
37
+ v=v0.5.4
38
+ curl -sSfL "https://github.com/rust-lang/mdBook/releases/download/$v/mdbook-$v-x86_64-unknown-linux-gnu.tar.gz" | tar xz -C /usr/local/bin
39
+ - name: Build the guide
40
+ run: |
41
+ python3 tools/book.py ex
42
+ mdbook build book
43
+ - name: Build the WebAssembly demo
44
+ run: |
45
+ cd ex
46
+ cargo build --profile wasm --target wasm32-unknown-unknown -p plot-wasm --config 'patch.crates-io.dataviz.path=".."'
47
+ mkdir -p ../book/book/demo
48
+ cp plot-wasm/www/* ../book/book/demo/
49
+ cp target/wasm32-unknown-unknown/wasm/plot_wasm.wasm ../book/book/demo/
50
+ - uses: actions/upload-pages-artifact@v3
51
+ with:
52
+ path: book/book
53
+
54
+ deploy:
55
+ needs: build
56
+ runs-on: ubuntu-latest
57
+ environment:
58
+ name: github-pages
59
+ url: ${{ steps.deployment.outputs.page_url }}
60
+ steps:
61
+ - id: deployment
62
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,85 @@
1
+ name: Python package
2
+ # Tests the Python bindings on every push; on a tag `py-vX.Y.Z` builds
3
+ # wheels for Linux, macOS and Windows (abi3: one wheel per platform for
4
+ # Python 3.9+) and publishes them to PyPI (trusted publishing: add this
5
+ # repository and workflow as a publisher of the `dataviz` project on PyPI
6
+ # once).
7
+ on:
8
+ push:
9
+ # Branch pushes run the tests when these paths change; tags build wheels
10
+ # (path filters do not apply to tags).
11
+ branches: ["**"]
12
+ paths: ["python/**", "src/**", "Cargo.toml", ".github/workflows/python.yml"]
13
+ tags: ["py-v*"]
14
+ pull_request:
15
+ paths: ["python/**", "src/**"]
16
+
17
+ jobs:
18
+ test:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.12"
25
+ - uses: dtolnay/rust-toolchain@stable
26
+ - uses: Swatinem/rust-cache@v2
27
+ - name: Build and test
28
+ working-directory: python
29
+ run: |
30
+ python -m venv .venv
31
+ .venv/bin/pip install maturin numpy pytest
32
+ .venv/bin/maturin develop --release
33
+ .venv/bin/python -m pytest -q tests
34
+
35
+ wheels:
36
+ if: startsWith(github.ref, 'refs/tags/py-v')
37
+ needs: test
38
+ strategy:
39
+ matrix:
40
+ include:
41
+ - { os: ubuntu-latest, target: x86_64 }
42
+ - { os: ubuntu-latest, target: aarch64 }
43
+ - { os: macos-latest, target: universal2-apple-darwin }
44
+ - { os: windows-latest, target: x64 }
45
+ runs-on: ${{ matrix.os }}
46
+ steps:
47
+ - uses: actions/checkout@v4
48
+ - uses: PyO3/maturin-action@v1
49
+ with:
50
+ working-directory: python
51
+ target: ${{ matrix.target }}
52
+ args: --release --out dist
53
+ manylinux: auto
54
+ - uses: actions/upload-artifact@v4
55
+ with:
56
+ name: wheels-${{ matrix.os }}-${{ matrix.target }}
57
+ path: python/dist
58
+
59
+ sdist:
60
+ if: startsWith(github.ref, 'refs/tags/py-v')
61
+ runs-on: ubuntu-latest
62
+ steps:
63
+ - uses: actions/checkout@v4
64
+ - uses: PyO3/maturin-action@v1
65
+ with:
66
+ working-directory: python
67
+ command: sdist
68
+ args: --out dist
69
+ - uses: actions/upload-artifact@v4
70
+ with:
71
+ name: sdist
72
+ path: python/dist
73
+
74
+ publish:
75
+ needs: [wheels, sdist]
76
+ runs-on: ubuntu-latest
77
+ environment: pypi
78
+ permissions:
79
+ id-token: write
80
+ steps:
81
+ - uses: actions/download-artifact@v4
82
+ with:
83
+ path: dist
84
+ merge-multiple: true
85
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,75 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ pull_request:
5
+
6
+ env:
7
+ CARGO_TERM_COLOR: always
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Install system dependencies (minifb, fonts)
17
+ run: sudo apt-get update && sudo apt-get install -y libxkbcommon-dev libwayland-dev fonts-dejavu-core
18
+
19
+ - name: Set up Rust toolchain
20
+ uses: dtolnay/rust-toolchain@stable
21
+ with:
22
+ components: clippy, rustfmt
23
+
24
+ - name: Cache cargo registry and build
25
+ uses: Swatinem/rust-cache@v2
26
+
27
+ - name: Check formatting
28
+ run: cargo fmt --all -- --check
29
+
30
+ - name: Clippy
31
+ run: cargo clippy --all-targets --all-features -- -D warnings
32
+
33
+ - name: Tests (unit, integration, doc, README; all features)
34
+ run: cargo test --all-features --verbose
35
+
36
+ - name: Headless build (no default features)
37
+ run: cargo build --no-default-features
38
+
39
+ - name: MCP server (clippy, tests)
40
+ run: |
41
+ cargo clippy -p dataviz-mcp --all-targets -- -D warnings
42
+ cargo test -p dataviz-mcp
43
+
44
+ - name: Docs
45
+ run: cargo doc --no-deps --all-features
46
+ env:
47
+ RUSTDOCFLAGS: -D warnings
48
+
49
+ msrv:
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - name: Install system dependencies
54
+ run: sudo apt-get update && sudo apt-get install -y libxkbcommon-dev libwayland-dev
55
+ - uses: dtolnay/rust-toolchain@1.89
56
+ - uses: Swatinem/rust-cache@v2
57
+ - name: Build with the minimum supported Rust version
58
+ run: cargo build --all-targets
59
+
60
+ # Tests on Windows and macOS (the window feature builds there without
61
+ # extra system packages).
62
+ platforms:
63
+ strategy:
64
+ fail-fast: false
65
+ matrix:
66
+ os: [windows-latest, macos-latest]
67
+ runs-on: ${{ matrix.os }}
68
+ steps:
69
+ - uses: actions/checkout@v4
70
+ - uses: dtolnay/rust-toolchain@stable
71
+ - uses: Swatinem/rust-cache@v2
72
+ - name: Tests (library and MCP server)
73
+ run: |
74
+ cargo test --features pdf
75
+ cargo test -p dataviz-mcp
@@ -0,0 +1,30 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ debug/
4
+ target/
5
+
6
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
7
+ # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
8
+ Cargo.lock
9
+
10
+ # These are backup files generated by rustfmt
11
+ **/*.rs.bk
12
+
13
+ # MSVC Windows builds of rustc generate these, which store debugging information
14
+ *.pdb
15
+
16
+ # RustRover
17
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
18
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
19
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
20
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
21
+ #.idea//gallery/
22
+
23
+ # Local gallery output
24
+ /cikti/
25
+
26
+ # Built guide and generated pages (tools/book.py)
27
+ book/book/
28
+ book/src/catalog/
29
+ book/src/performance.md
30
+ book/src/SUMMARY.md