Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
11bfe05
Changed: Refactors UUID usage to SlotMap keys internally
acgetchell Sep 13, 2025
7c7c40c
Fixed: Boundary facet check uses correct facet key
acgetchell Sep 14, 2025
53dbea5
Fixed: Improves facet visibility and data handling
acgetchell Sep 14, 2025
eeeb046
Changed: Improves triangulation performance, internal refactor
acgetchell Sep 14, 2025
4e2bd42
Added: Optimize cell vertex UUID retrieval with iterator
acgetchell Sep 14, 2025
be31587
Added: Introduces `bench` feature for performance analysis
acgetchell Sep 14, 2025
d371993
Changed: Improves benchmark handling and triangulation performance
acgetchell Sep 14, 2025
ccbcf73
Fixed: Correctly identifies boundary facets in triangulation
acgetchell Sep 15, 2025
9b5f957
Fixed: Corrects facet key handling in Bowyer-Watson
acgetchell Sep 15, 2025
b7bf370
Added: derive_facet_key_from_vertices and FacetCacheProvider trait
acgetchell Sep 15, 2025
d62220a
Changed: Improve robustness and caching in Bowyer-Watson
acgetchell Sep 15, 2025
c85bd71
Fixed: Prevents false positives in convex hull visibility test
acgetchell Sep 15, 2025
abae967
Fixed: Adjusts epsilon threshold for convex hull calculation
acgetchell Sep 16, 2025
b36693e
Fixed: Correctly identifies boundary facets in rare cases
acgetchell Sep 16, 2025
86bd478
Fixed: Boundary facet edge case and improved debugging
acgetchell Sep 16, 2025
8d7e521
Changed: Improves boundary facet detection performance
acgetchell Sep 16, 2025
203ed6d
Fixed: Improves numerical robustness in visibility test
acgetchell Sep 16, 2025
c21d250
Fixed: Improves facet boundary detection reliability
acgetchell Sep 16, 2025
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
147 changes: 135 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,156 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [Unreleased](https://github.com/acgetchell/delaunay/compare/v0.4.3...HEAD)

### Merged Pull Requests

- Fix/benchmarks [`#76`](https://github.com/acgetchell/delaunay/pull/76)

- Changed: Improves triangulation performance, internal refactor [`eeeb046`](https://github.com/acgetchell/delaunay/commit/eeeb046ef3b5c7775b6cafc07fdc6c2cb3124dd1)
- Changed: Refactors UUID usage to SlotMap keys internally [`11bfe05`](https://github.com/acgetchell/delaunay/commit/11bfe05bf9a3111b97aa1d2bb4818d100778bb2c)

### Added

- **Added: Optimize cell vertex UUID retrieval with iterator** [`4e2bd42`](https://github.com/acgetchell/delaunay/commit/4e2bd429249ed920c0f6929fe1a7ba9ff0ffd904)

- **Added: Introduces `bench` feature for performance analysis** [`be31587`](https://github.com/acgetchell/delaunay/commit/be315874192050483d98d9d6d933dc68da54be80)

### Changed

- **Changed: Reduce verbosity of memory scaling benchmarks** [`82c1789`](https://github.com/acgetchell/delaunay/commit/82c178901962fb2fed65bb71cb76671a054aa1bb)
- **Changed: Improve baseline artifact handling in benchmarks**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

Refactors the benchmark regression test to reliably locate and process baseline files downloaded from artifacts. It now uses alphabetical sorting to
deterministically select the baseline file
when multiple tag-specific files are available.
This change ensures consistent baseline selection and improves regression test accuracy.
Also changes to the regression summary, which is an internal change.

- **Changed: Improve benchmark regression reporting and baseline handling**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

Improves benchmark regression reporting by consistently setting BASELINE_ORIGIN environment variable. Modifies the regression check
to avoid early return on failure, allowing for consistent reporting
of results.

Updates documentation and adds a test case.

- **Changed: Refactors baseline preparation for GitHub Actions**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

Consolidates environment variable writing for baseline preparation into a helper function to reduce redundancy.

Improves baseline file selection by prioritizing stable
(non-prerelease) versions when multiple files match.

Changes error output stream to stderr.

- **Changed: Enhance baseline commit extraction and env vars**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

Enhances the baseline commit extraction process to determine the source (baseline file or metadata) and sets BASELINE_COMMIT_SOURCE
accordingly.

Also, mirrors GitHub Actions environment variables written to GITHUB_ENV into the current process. This makes them immediately available without needing to
re-read the file.

Finally, when multiple baseline files exist, prefers the newest file based on modification time.

- **Changed: Improve baseline artifact handling in benchmarks** [`a630c1a`](https://github.com/acgetchell/delaunay/commit/a630c1aeb7ebfa699e8467b46fa35ad1d367eb90)
- **Changed: Improves benchmark regression and baseline handling**

- **Changed: Improve benchmark regression reporting and baseline handling** [`1d331c5`](https://github.com/acgetchell/delaunay/commit/1d331c55c3826bc4c573a55785e16fd4c1e2bad2)
[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

- **Changed: Refactors baseline preparation for GitHub Actions** [`9412dbf`](https://github.com/acgetchell/delaunay/commit/9412dbf4d795b338363db01e50fc5043b9e27a5c)
Refactors benchmark regression reporting and baseline artifact handling for more robust performance comparisons in CI. This includes improved error handling,
baseline selection, and environment variable management.

- **Changed: Enhance baseline commit extraction and env vars** [`2b32a97`](https://github.com/acgetchell/delaunay/commit/2b32a9765a32ae114a05d92ebd755551bdd84b2e)
Reduces verbosity of memory scaling benchmarks and fixes various documentation errors. Simplifies internal APIs and optimizes collection usage for performance
gains.

- **Changed: Reduce verbosity of memory scaling benchmarks** [`82c1789`](https://github.com/acgetchell/delaunay/commit/82c178901962fb2fed65bb71cb76671a054aa1bb)

### Fixed

- **Fix benchmarking by quieting output** [`cf9b323`](https://github.com/acgetchell/delaunay/commit/cf9b3239ae79e804c60e1c4e49d1ea152f3418d5)
- **Fix benchmarking by quieting output**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

- **Fix benchmarking by improving file handling**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

Improves the baseline file handling logic in `prepare_baseline` to support tag-specific (`baseline-v*.txt`) and generic (`baseline*.txt`) baseline file names.
It now also converts
tag-specific baseline files to `baseline_results.txt` for
consistency. The commit extraction logic has also been improved,
with functions to extract SHA from baseline and metadata files. These improvements ensure that the regression tests can automatically leverage baseline
artifacts generated by the `generate-baseline` workflow.

- **Fixed: Extracts baseline tag and prefers highest semver version**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

Fixes the logic for extracting the baseline commit SHA from artifact files. It now propagates the baseline tag to the workflow environment, enabling
version-aware baseline selection.

It also prioritizes tag files with the highest semver version when
multiple tagged baseline files exist, ensuring the most relevant
baseline is selected.

- **Fixed: Handles baseline copy errors and improves baseline selection**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

Fixes an issue where errors during baseline file copying were not properly handled. Now, if copying the baseline file fails, the script sets environment
variables to indicate the failure and prints an error message to stderr.

Also improves baseline file selection by preferring stable releases over pre-releases when both exist, and selects the highest pre-release if no stable
release is available. This ensures more accurate and
reliable benchmark comparisons.

Additionally, includes the baseline source file name in the Github environment variables for better traceability. Also, more lines are read from the baseline
file when printing baseline metadata.

- **Fixed: Handles baseline summary read errors gracefully**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

Addresses a potential issue where the benchmark regression helper would fail if it couldn't read the baseline summary file. Now, it gracefully handles such
errors, prints a warning to stderr, and
continues, ensuring the rest of the baseline preparation process can proceed, setting relevant environment variables.

Also, fixes baseline tag propagation to workflow environments and ensures cargo bench commands capture output.

- **Fixed: Correctly detects stable baseline versions**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

Fixes an issue where prerelease versions of baseline files were incorrectly preferred over stable versions when both had the same semantic version. This
ensures that stable baselines are always selected when available.

Also captures output when running performance benchmarks.

- **Fixed: Handles multiline env vars and sanitizes baseline tags**

[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

- **Fix benchmarking by improving file handling** [`ab8baf8`](https://github.com/acgetchell/delaunay/commit/ab8baf8524cb1d2b0e728c5b963353ad2bd84770)
Fixes issues with multiline environment variables by using heredoc format in GITHUB_ENV. Sanitizes baseline tags to prevent command injection by replacing
unsafe characters and capping the
tag length. Also, improves baseline file selection by using `packaging.version` for semver comparisons, handling prereleases and invalid versions gracefully.

- **Fixed: Extracts baseline tag and prefers highest semver version** [`cf3a061`](https://github.com/acgetchell/delaunay/commit/cf3a061c78676963265a7e1d7db81a48aa704d8f)
- **Fixed: Sanitize environment variables written to GITHUB\_ENV**

- **Fixed: Handles baseline copy errors and improves baseline selection** [`37a134e`](https://github.com/acgetchell/delaunay/commit/37a134ed73731b71956118692798bcdf4d98e6d2)
[`a090e1e8d9be1140da2e6f5139e3901c06e98f78`](https://github.com/acgetchell/delaunay/commit/a090e1e8d9be1140da2e6f5139e3901c06e98f78)

- **Fixed: Handles baseline summary read errors gracefully** [`b933479`](https://github.com/acgetchell/delaunay/commit/b933479eb7bc40b72ba04b4e3cee452c62dbb66a)
Ensures that environment variables written to the GITHUB_ENV file and the process environment are properly sanitized by removing carriage return and newline
characters. Also handles None values correctly by converting them to empty strings. This prevents issues caused by unescaped characters in downstream
processes.

- **Fixed: Correctly detects stable baseline versions** [`ed25fc0`](https://github.com/acgetchell/delaunay/commit/ed25fc05a76b5586efbce3c0ed65901170aca3bf)
- **Fixed: Boundary facet check uses correct facet key** [`7c7c40c`](https://github.com/acgetchell/delaunay/commit/7c7c40c7e52e50c5432940a670f13fd5263d608a)

- **Fixed: Handles multiline env vars and sanitizes baseline tags** [`94aee63`](https://github.com/acgetchell/delaunay/commit/94aee6365c0904c62f7f5975a293dbda8743fef8)
- **Fixed: Improves facet visibility and data handling** [`53dbea5`](https://github.com/acgetchell/delaunay/commit/53dbea5601cdafc7bb02dac7234fda394094d929)

## [v0.4.3](https://github.com/acgetchell/delaunay/compare/v0.4.2...v0.4.3) - 2025-09-12

Expand Down
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ allocation-counter = { version = "0.8.1", optional = true } # for memory profil
anyhow = "1.0.99"
arc-swap = "1.7.1"
approx = "0.5.1"
bimap = "0.6.3"
clap = { version = "4.5.47", features = ["derive"] }
derive_builder = "0.20.1"
fxhash = "0.2.1" # Fast non-cryptographic hashing for performance
Expand All @@ -43,6 +42,7 @@ pastey = "0.1"

[features]
count-allocations = ["allocation-counter"]
bench = [] # Enable benchmark-style tests and performance analysis

[[bench]]
name = "circumsphere_containment"
Expand Down
4 changes: 4 additions & 0 deletions WARP.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This file provides guidance to WARP (warp.dev) when working with code in this re

- **ALWAYS** run spell check after editing ANY files (code, documentation, configuration files, etc.)
- **REQUIRED** when adding or modifying any files to ensure proper spelling throughout the project
- **EXCEPTION**: **DO NOT** spell-check `cspell.json` itself - it contains intentional misspellings in `flagWords` from misspelled git commits
- **IF** cspell reports legitimate technical terms, programming keywords, or project-specific terminology as misspelled, add them to the `words` array in `cspell.json`
- **EXAMPLES**: Python terms (`kwargs`, `args`, `asyncio`), Rust terms (`usize`, `clippy`, `rustc`), technical terms (`triangulation`, `circumsphere`, `delaunay`),
project/crate names (e.g., `nalgebra`, `serde`, `thiserror`, `pastey`).
Expand Down Expand Up @@ -161,6 +162,9 @@ bash scripts/run_all_examples.sh

# Python utility testing (if Python scripts modified)
uv run pytest

# Benchmark-style tests (performance analysis and demonstrations)
cargo test --lib --features bench # Includes timing-based tests normally excluded from CI
```

### Performance and Benchmarks
Expand Down
4 changes: 2 additions & 2 deletions benches/microbenchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ macro_rules! generate_dimensional_benchmarks {
let mut tds = Tds::<f64, (), (), $dim>::new(&vertices).unwrap();

// Add some duplicate cells to make the benchmark meaningful
let cell_vertices: Vec<_> = tds.vertices.values().copied().collect();
let cell_vertices: Vec<_> = tds.vertices().values().copied().collect();
if cell_vertices.len() >= ($dim + 1) {
// Create a few duplicate cells
for _ in 0..3 {
let duplicate_cell = cell!(cell_vertices[0..($dim + 1)].to_vec());
let cell_key = tds.cells_mut().insert(duplicate_cell);
let cell_uuid = tds.cells_mut()[cell_key].uuid();
// Note: Intentionally not updating bimap to create true duplicates for testing
// Note: Intentionally not updating UUID mappings to create true duplicates for testing
let _ = cell_uuid; // Suppress unused variable warning
}
}
Expand Down
Loading
Loading