Skip to content

Commit

Permalink
feat!: hide testing module behind a feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pnevyk committed Nov 12, 2023
1 parent d7a92b4 commit e69ede6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ keywords = ["nonlinear-equations", "optimization", "math", "science"]
categories = ["science", "mathematics"]
edition = "2021"

[features]
testing = []

[dependencies]
nalgebra = "0.31"
rand = { version = "0.8", features = ["small_rng"] }
Expand Down
2 changes: 1 addition & 1 deletion gomez-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

[dependencies]
divan = "0.1.2"
gomez = { path = ".." }
gomez = { path = "..", features = ["testing"] }
gsl-wrapper = { path = "../gsl-wrapper" }

[[bench]]
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,13 @@ pub mod analysis;
pub mod core;
pub mod derivatives;
pub mod solver;

#[cfg(feature = "testing")]
pub mod testing;

#[cfg(not(feature = "testing"))]
pub(crate) mod testing;

pub use nalgebra;

/// Gomez prelude.
Expand Down
2 changes: 2 additions & 0 deletions src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
//! \[4\] [HOMPACK: A Suite of Codes for Globally Convergent Homotopy
//! Algorithms](https://dl.acm.org/doi/10.1145/29380.214343)
#![allow(unused)]

use std::error::Error as StdError;

use nalgebra::{
Expand Down

0 comments on commit e69ede6

Please sign in to comment.