adaptive-triangulation 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.
- adaptive_triangulation-0.1.0/.github/workflows/ci.yml +171 -0
- adaptive_triangulation-0.1.0/.gitignore +11 -0
- adaptive_triangulation-0.1.0/.pre-commit-config.yaml +37 -0
- adaptive_triangulation-0.1.0/Cargo.lock +877 -0
- adaptive_triangulation-0.1.0/Cargo.toml +34 -0
- adaptive_triangulation-0.1.0/LICENSE +29 -0
- adaptive_triangulation-0.1.0/PKG-INFO +156 -0
- adaptive_triangulation-0.1.0/README.md +130 -0
- adaptive_triangulation-0.1.0/benches/bench_triangulation.rs +300 -0
- adaptive_triangulation-0.1.0/examples/adaptive_learnernd.py +53 -0
- adaptive_triangulation-0.1.0/examples/basic_usage.py +44 -0
- adaptive_triangulation-0.1.0/examples/benchmark_vs_python.py +79 -0
- adaptive_triangulation-0.1.0/pyproject.toml +68 -0
- adaptive_triangulation-0.1.0/python/adaptive_triangulation/__init__.py +59 -0
- adaptive_triangulation-0.1.0/python/adaptive_triangulation/__init__.pyi +63 -0
- adaptive_triangulation-0.1.0/python/adaptive_triangulation/_rust.pyi +115 -0
- adaptive_triangulation-0.1.0/python/adaptive_triangulation/py.typed +0 -0
- adaptive_triangulation-0.1.0/src/geometry.rs +467 -0
- adaptive_triangulation-0.1.0/src/lib.rs +188 -0
- adaptive_triangulation-0.1.0/src/triangulation.rs +1739 -0
- adaptive_triangulation-0.1.0/tests/__init__.py +0 -0
- adaptive_triangulation-0.1.0/tests/test_project_metadata.py +70 -0
- adaptive_triangulation-0.1.0/tests/test_triangulation.py +631 -0
- adaptive_triangulation-0.1.0/uv.lock +728 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- "v*"
|
|
9
|
+
pull_request:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
pre-commit:
|
|
13
|
+
name: Pre-commit
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check out repository
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install uv and Python
|
|
21
|
+
uses: astral-sh/setup-uv@v7
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.13"
|
|
24
|
+
enable-cache: true
|
|
25
|
+
|
|
26
|
+
- name: Set up Rust
|
|
27
|
+
uses: dtolnay/rust-toolchain@stable
|
|
28
|
+
with:
|
|
29
|
+
components: clippy, rustfmt
|
|
30
|
+
|
|
31
|
+
- name: Sync lint environment
|
|
32
|
+
run: uv sync --locked --only-group lint
|
|
33
|
+
|
|
34
|
+
- name: Run pre-commit
|
|
35
|
+
run: uv run pre-commit run --all-files
|
|
36
|
+
|
|
37
|
+
python-tests:
|
|
38
|
+
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
39
|
+
runs-on: ${{ matrix.os }}
|
|
40
|
+
strategy:
|
|
41
|
+
fail-fast: false
|
|
42
|
+
matrix:
|
|
43
|
+
os:
|
|
44
|
+
- ubuntu-latest
|
|
45
|
+
- macos-latest
|
|
46
|
+
- windows-latest
|
|
47
|
+
python-version:
|
|
48
|
+
- "3.10"
|
|
49
|
+
- "3.11"
|
|
50
|
+
- "3.12"
|
|
51
|
+
- "3.13"
|
|
52
|
+
|
|
53
|
+
steps:
|
|
54
|
+
- name: Check out repository
|
|
55
|
+
uses: actions/checkout@v4
|
|
56
|
+
|
|
57
|
+
- name: Install uv and Python
|
|
58
|
+
uses: astral-sh/setup-uv@v7
|
|
59
|
+
with:
|
|
60
|
+
python-version: ${{ matrix.python-version }}
|
|
61
|
+
enable-cache: true
|
|
62
|
+
|
|
63
|
+
- name: Set up Rust
|
|
64
|
+
uses: dtolnay/rust-toolchain@stable
|
|
65
|
+
|
|
66
|
+
- name: Sync test environment
|
|
67
|
+
run: uv sync --locked --only-group test
|
|
68
|
+
|
|
69
|
+
- name: Run test suite
|
|
70
|
+
run: uv run pytest -x -v
|
|
71
|
+
|
|
72
|
+
rust-checks:
|
|
73
|
+
name: Rust checks
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
|
|
76
|
+
steps:
|
|
77
|
+
- name: Check out repository
|
|
78
|
+
uses: actions/checkout@v4
|
|
79
|
+
|
|
80
|
+
- name: Set up Rust
|
|
81
|
+
uses: dtolnay/rust-toolchain@stable
|
|
82
|
+
with:
|
|
83
|
+
components: clippy, rustfmt
|
|
84
|
+
|
|
85
|
+
- name: Cache Rust artifacts
|
|
86
|
+
uses: Swatinem/rust-cache@v2
|
|
87
|
+
|
|
88
|
+
- name: Run cargo tests
|
|
89
|
+
run: cargo test --all-targets
|
|
90
|
+
|
|
91
|
+
- name: Run clippy
|
|
92
|
+
run: cargo clippy --all-targets -- -D warnings
|
|
93
|
+
|
|
94
|
+
build-wheels:
|
|
95
|
+
name: Build wheels on ${{ matrix.os }}
|
|
96
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
97
|
+
runs-on: ${{ matrix.os }}
|
|
98
|
+
strategy:
|
|
99
|
+
fail-fast: false
|
|
100
|
+
matrix:
|
|
101
|
+
os:
|
|
102
|
+
- ubuntu-latest
|
|
103
|
+
- macos-latest
|
|
104
|
+
- windows-latest
|
|
105
|
+
|
|
106
|
+
steps:
|
|
107
|
+
- name: Check out repository
|
|
108
|
+
uses: actions/checkout@v4
|
|
109
|
+
|
|
110
|
+
- name: Set up Python
|
|
111
|
+
uses: actions/setup-python@v5
|
|
112
|
+
with:
|
|
113
|
+
python-version: "3.10"
|
|
114
|
+
|
|
115
|
+
- name: Build wheels
|
|
116
|
+
uses: PyO3/maturin-action@v1
|
|
117
|
+
with:
|
|
118
|
+
command: build
|
|
119
|
+
args: --release --out dist
|
|
120
|
+
manylinux: auto
|
|
121
|
+
sccache: "true"
|
|
122
|
+
|
|
123
|
+
- name: Upload wheel artifacts
|
|
124
|
+
uses: actions/upload-artifact@v4
|
|
125
|
+
with:
|
|
126
|
+
name: wheels-${{ matrix.os }}
|
|
127
|
+
path: dist
|
|
128
|
+
|
|
129
|
+
build-sdist:
|
|
130
|
+
name: Build source distribution
|
|
131
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
132
|
+
runs-on: ubuntu-latest
|
|
133
|
+
|
|
134
|
+
steps:
|
|
135
|
+
- name: Check out repository
|
|
136
|
+
uses: actions/checkout@v4
|
|
137
|
+
|
|
138
|
+
- name: Build sdist
|
|
139
|
+
uses: PyO3/maturin-action@v1
|
|
140
|
+
with:
|
|
141
|
+
command: sdist
|
|
142
|
+
args: --out dist
|
|
143
|
+
|
|
144
|
+
- name: Upload source distribution
|
|
145
|
+
uses: actions/upload-artifact@v4
|
|
146
|
+
with:
|
|
147
|
+
name: sdist
|
|
148
|
+
path: dist
|
|
149
|
+
|
|
150
|
+
publish:
|
|
151
|
+
name: Publish to PyPI
|
|
152
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
153
|
+
runs-on: ubuntu-latest
|
|
154
|
+
needs:
|
|
155
|
+
- build-wheels
|
|
156
|
+
- build-sdist
|
|
157
|
+
permissions:
|
|
158
|
+
contents: read
|
|
159
|
+
id-token: write
|
|
160
|
+
|
|
161
|
+
steps:
|
|
162
|
+
- name: Download built artifacts
|
|
163
|
+
uses: actions/download-artifact@v4
|
|
164
|
+
with:
|
|
165
|
+
path: dist
|
|
166
|
+
merge-multiple: true
|
|
167
|
+
|
|
168
|
+
- name: Publish distributions
|
|
169
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
170
|
+
with:
|
|
171
|
+
packages-dir: dist
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-toml
|
|
9
|
+
- id: check-merge-conflict
|
|
10
|
+
- id: check-added-large-files
|
|
11
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
12
|
+
rev: v0.11.0
|
|
13
|
+
hooks:
|
|
14
|
+
- id: ruff
|
|
15
|
+
args: [--fix, --unsafe-fixes]
|
|
16
|
+
- id: ruff-format
|
|
17
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
18
|
+
rev: v1.14.0
|
|
19
|
+
hooks:
|
|
20
|
+
- id: mypy
|
|
21
|
+
additional_dependencies: [numpy]
|
|
22
|
+
args: [--strict]
|
|
23
|
+
exclude: '(\.pyi$|tests/|examples/)'
|
|
24
|
+
- repo: local
|
|
25
|
+
hooks:
|
|
26
|
+
- id: cargo-fmt
|
|
27
|
+
name: cargo fmt
|
|
28
|
+
entry: cargo fmt --check
|
|
29
|
+
language: system
|
|
30
|
+
types: [rust]
|
|
31
|
+
pass_filenames: false
|
|
32
|
+
- id: cargo-clippy
|
|
33
|
+
name: cargo clippy
|
|
34
|
+
entry: cargo clippy -- -D warnings
|
|
35
|
+
language: system
|
|
36
|
+
types: [rust]
|
|
37
|
+
pass_filenames: false
|