Skip to content

Updated to modern dependencies: rand 0.9.2, alga 0.9.3, nalgebra 0.34.1#33

Open
jackbackes wants to merge 6 commits intoWaDelma:masterfrom
jackbackes:master
Open

Updated to modern dependencies: rand 0.9.2, alga 0.9.3, nalgebra 0.34.1#33
jackbackes wants to merge 6 commits intoWaDelma:masterfrom
jackbackes:master

Conversation

@jackbackes
Copy link

I thought you might take a maintenance pull request.

  • Updated to modern dependencies: rand 0.9.2, alga 0.9.3, nalgebra 0.34.1
  • Updated all the visualization cli dependencies as well.
  • All tests and benchmarks pass on Mac M3.
  • Fixed all clippy warnings and doc test examples.

Let me know if you have any questions!

Jack Backes added 6 commits October 4, 2025 22:46
- Updated rand from 0.6 to 0.9.2 with StandardUniform distribution
- Updated alga from 0.8 to 0.9.3
- Updated nalgebra from 0.17 to 0.34.1 with alga and rand features
- Fixed Float trait to use RealField instead of AbstractField
- Replaced deprecated APIs (gen() -> random(), Standard -> StandardUniform)
- Fixed ambiguous method calls between num_traits::Float and ComplexField
- Kept Vector trait with blanket impl (still compiles with alga 0.9)
- Library now compiles successfully with all modern dependencies
- Updated clap from v2 to v4 API
- Replaced deprecated arg_enum! with manual FromStr implementations
- Fixed rand 0.9 compatibility (thread_rng → rng, gen → random)
- Fixed image crate Rgb struct usage (data field → tuple struct)
- Added nalgebra "rand" feature for Distribution implementation
- Cleaned up unused imports in main library
- Fixed doc test examples to use rand 0.9 API (rng() instead of FromEntropy)
- Applied cargo fmt to format all code consistently
- Fixed all clippy warnings:
  - Removed redundant field names in struct initialization
  - Fixed doc comment indentation
  - Used std::f64::consts::PI instead of hardcoded value
  - Removed unnecessary braces and casts
  - Applied other minor clippy suggestions
- Added #[derive(Default)] for Type enum
- All tests now pass successfully
- Added descriptive expect() messages throughout the codebase
- Improves debugging by providing context when panics occur
- Updated workspace to use resolver "2" for better dependency resolution
- Updated poisson-visualisation to edition 2024
- Bumped version to 0.11.0 for both packages
- Updated poisson to edition 2024
- Major dependency updates: rand 0.9.2, alga 0.9.3, nalgebra 0.34.1
@jackbackes
Copy link
Author

@WaDelma please review.

use num_traits::Zero;
use rand::{rngs::SmallRng, SeedableRng};
let mut rand = SmallRng::from_seed([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
let mut rand = SmallRng::from_seed([1; 32]); // range from 1 to 32
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this array is now one full of 1's with length 32. This doesn't seem to match the comment. The seed is arbitrary so I don't mind the value, but comment should be fixed at least.

}
}
};
// TODO: At 10 the test suddenly takes forever and takes all of the memory resulting into getting killed by oom killer
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this?

#[test]
fn multiple_too_close_invalid() {
let samples = 100;
let samples = 101; // TODO: 100 freezes forever.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting 😅

@WaDelma
Copy link
Owner

WaDelma commented Nov 1, 2025

Thanks for the PR! Haven't been looking at the github in a while so missed this completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants