figline 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.
- figline-0.1.0/.github/workflows/ci.yml +64 -0
- figline-0.1.0/.github/workflows/release.yml +114 -0
- figline-0.1.0/.gitignore +22 -0
- figline-0.1.0/Cargo.lock +1367 -0
- figline-0.1.0/Cargo.toml +34 -0
- figline-0.1.0/LICENSE-APACHE +199 -0
- figline-0.1.0/LICENSE-MIT +21 -0
- figline-0.1.0/PKG-INFO +72 -0
- figline-0.1.0/README.md +48 -0
- figline-0.1.0/benchmarks/bench_figline.py +267 -0
- figline-0.1.0/pyproject.toml +33 -0
- figline-0.1.0/python/figline/__init__.py +15 -0
- figline-0.1.0/python/figline/__init__.pyi +117 -0
- figline-0.1.0/python/figline/py.typed +1 -0
- figline-0.1.0/ruff.toml +6 -0
- figline-0.1.0/rustfmt.toml +3 -0
- figline-0.1.0/src/data.rs +539 -0
- figline-0.1.0/src/error.rs +49 -0
- figline-0.1.0/src/figure.rs +651 -0
- figline-0.1.0/src/lib.rs +24 -0
- figline-0.1.0/src/pdf.rs +631 -0
- figline-0.1.0/src/raster.rs +682 -0
- figline-0.1.0/src/svg.rs +393 -0
- figline-0.1.0/src/ticks.rs +637 -0
- figline-0.1.0/tests/test_plot.py +150 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
rust:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
14
|
+
with:
|
|
15
|
+
components: rustfmt, clippy
|
|
16
|
+
- uses: Swatinem/rust-cache@v2
|
|
17
|
+
- name: Check Rust formatting
|
|
18
|
+
run: cargo fmt --all -- --check
|
|
19
|
+
- name: Run Clippy
|
|
20
|
+
run: cargo clippy --all-targets -- -D warnings
|
|
21
|
+
|
|
22
|
+
python-lint:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- name: Check Python lints
|
|
27
|
+
uses: astral-sh/ruff-action@v3
|
|
28
|
+
- name: Check Python formatting
|
|
29
|
+
uses: astral-sh/ruff-action@v3
|
|
30
|
+
with:
|
|
31
|
+
args: "format --check"
|
|
32
|
+
|
|
33
|
+
wheels:
|
|
34
|
+
needs: [rust, python-lint]
|
|
35
|
+
strategy:
|
|
36
|
+
fail-fast: false
|
|
37
|
+
matrix:
|
|
38
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
39
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
40
|
+
runs-on: ${{ matrix.os }}
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
- uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: ${{ matrix.python-version }}
|
|
46
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
47
|
+
- uses: Swatinem/rust-cache@v2
|
|
48
|
+
- name: Install build tools
|
|
49
|
+
run: python -m pip install --upgrade pip maturin==1.16.0
|
|
50
|
+
- name: Build, install, and verify wheel
|
|
51
|
+
shell: bash
|
|
52
|
+
run: |
|
|
53
|
+
set -euo pipefail
|
|
54
|
+
maturin build --release --out dist
|
|
55
|
+
python -m venv .venv-test
|
|
56
|
+
if [ -f .venv-test/Scripts/python.exe ]; then
|
|
57
|
+
PY=.venv-test/Scripts/python.exe
|
|
58
|
+
else
|
|
59
|
+
PY=.venv-test/bin/python
|
|
60
|
+
fi
|
|
61
|
+
"$PY" -m pip install --upgrade pip
|
|
62
|
+
"$PY" -m pip install --force-reinstall dist/*.whl pytest mypy numpy pypdf
|
|
63
|
+
"$PY" -m mypy tests python/figline
|
|
64
|
+
"$PY" -m pytest tests -v
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
sdist:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- name: Build source distribution
|
|
14
|
+
uses: PyO3/maturin-action@v1
|
|
15
|
+
with:
|
|
16
|
+
command: sdist
|
|
17
|
+
args: --out dist
|
|
18
|
+
- name: Upload sdist artifact
|
|
19
|
+
uses: actions/upload-artifact@v4
|
|
20
|
+
with:
|
|
21
|
+
name: dist-sdist
|
|
22
|
+
path: dist/*.tar.gz
|
|
23
|
+
|
|
24
|
+
linux:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
strategy:
|
|
27
|
+
fail-fast: false
|
|
28
|
+
matrix:
|
|
29
|
+
target: [x86_64, aarch64]
|
|
30
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
- uses: Swatinem/rust-cache@v2
|
|
34
|
+
- name: Build manylinux_2_28 wheel
|
|
35
|
+
uses: PyO3/maturin-action@v1
|
|
36
|
+
with:
|
|
37
|
+
target: ${{ matrix.target }}
|
|
38
|
+
manylinux: "2_28"
|
|
39
|
+
args: --release -i ${{ matrix.python-version }} --out dist
|
|
40
|
+
- name: Upload Linux wheel
|
|
41
|
+
uses: actions/upload-artifact@v4
|
|
42
|
+
with:
|
|
43
|
+
name: dist-linux-${{ matrix.target }}-${{ matrix.python-version }}
|
|
44
|
+
path: dist/*.whl
|
|
45
|
+
|
|
46
|
+
macos:
|
|
47
|
+
runs-on: macos-latest
|
|
48
|
+
strategy:
|
|
49
|
+
fail-fast: false
|
|
50
|
+
matrix:
|
|
51
|
+
target: [aarch64, x86_64]
|
|
52
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
- uses: actions/setup-python@v5
|
|
56
|
+
with:
|
|
57
|
+
python-version: ${{ matrix.python-version }}
|
|
58
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
59
|
+
- uses: Swatinem/rust-cache@v2
|
|
60
|
+
- name: Build macOS wheel
|
|
61
|
+
uses: PyO3/maturin-action@v1
|
|
62
|
+
with:
|
|
63
|
+
target: ${{ matrix.target }}
|
|
64
|
+
args: --release --out dist
|
|
65
|
+
- name: Upload macOS wheel
|
|
66
|
+
uses: actions/upload-artifact@v4
|
|
67
|
+
with:
|
|
68
|
+
name: dist-macos-${{ matrix.target }}-${{ matrix.python-version }}
|
|
69
|
+
path: dist/*.whl
|
|
70
|
+
|
|
71
|
+
windows:
|
|
72
|
+
runs-on: windows-latest
|
|
73
|
+
strategy:
|
|
74
|
+
fail-fast: false
|
|
75
|
+
matrix:
|
|
76
|
+
target: [x64]
|
|
77
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v4
|
|
80
|
+
- uses: actions/setup-python@v5
|
|
81
|
+
with:
|
|
82
|
+
python-version: ${{ matrix.python-version }}
|
|
83
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
84
|
+
- uses: Swatinem/rust-cache@v2
|
|
85
|
+
- name: Build Windows wheel
|
|
86
|
+
uses: PyO3/maturin-action@v1
|
|
87
|
+
with:
|
|
88
|
+
target: ${{ matrix.target }}
|
|
89
|
+
args: --release --out dist
|
|
90
|
+
- name: Upload Windows wheel
|
|
91
|
+
uses: actions/upload-artifact@v4
|
|
92
|
+
with:
|
|
93
|
+
name: dist-windows-${{ matrix.target }}-${{ matrix.python-version }}
|
|
94
|
+
path: dist/*.whl
|
|
95
|
+
|
|
96
|
+
publish:
|
|
97
|
+
name: Publish to PyPI
|
|
98
|
+
needs: [sdist, linux, macos, windows]
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
environment:
|
|
101
|
+
name: pypi
|
|
102
|
+
url: https://pypi.org/p/figline
|
|
103
|
+
permissions:
|
|
104
|
+
id-token: write
|
|
105
|
+
steps:
|
|
106
|
+
- name: Download all release distributions
|
|
107
|
+
uses: actions/download-artifact@v4
|
|
108
|
+
with:
|
|
109
|
+
path: dist
|
|
110
|
+
merge-multiple: true
|
|
111
|
+
- name: Publish via Trusted Publishing
|
|
112
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
113
|
+
with:
|
|
114
|
+
packages-dir: dist/
|
figline-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Rust
|
|
2
|
+
/target/
|
|
3
|
+
**/*.rs.bk
|
|
4
|
+
|
|
5
|
+
# Python
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*.so
|
|
9
|
+
*.pyd
|
|
10
|
+
*.whl
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
.mypy_cache/
|
|
14
|
+
.venv/
|
|
15
|
+
venv/
|
|
16
|
+
dist/
|
|
17
|
+
build/
|
|
18
|
+
*.egg-info/
|
|
19
|
+
|
|
20
|
+
# OS / Editor
|
|
21
|
+
.DS_Store
|
|
22
|
+
Thumbs.db
|