Params: add development parameters
This commit is contained in:
parent
7dffab78e1
commit
2c37cae636
|
@ -8,5 +8,7 @@ edition = "2021"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.4.8", features = ["derive"]}
|
clap = { version = "4.4.8", features = ["derive"]}
|
||||||
derive_builder = "0.12.0"
|
derive_builder = "0.12.0"
|
||||||
|
rand = "0.8.5"
|
||||||
|
rand_distr = "0.4.3"
|
||||||
serde = { version = "1.0.192", features = ["derive"]}
|
serde = { version = "1.0.192", features = ["derive"]}
|
||||||
toml = "0.8.8"
|
toml = "0.8.8"
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@ check:
|
||||||
cargo check
|
cargo check
|
||||||
|
|
||||||
run:
|
run:
|
||||||
cargo run -- params.toml 2>/dev/null | python3 scripts/format.py
|
@cargo run -- params.toml 2>/dev/null | python3 scripts/format.py
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
cargo run -- params.toml
|
cargo run -- params.toml
|
||||||
|
|
|
@ -91,3 +91,7 @@
|
||||||
[types.gen_tuple]
|
[types.gen_tuple]
|
||||||
gen_each_field = 0.5
|
gen_each_field = 0.5
|
||||||
get_instant = 0.5
|
get_instant = 0.5
|
||||||
|
|
||||||
|
[dev]
|
||||||
|
float_gen_distro_pos_stddiv = 56713724e30 # DO NOT expand with zeros
|
||||||
|
float_gen_distro_neg_stddiv = 56713724e30
|
||||||
|
|
|
@ -18,6 +18,7 @@ toml_struct!{
|
||||||
global_flow: GlobalFlow,
|
global_flow: GlobalFlow,
|
||||||
statements: Statments,
|
statements: Statments,
|
||||||
types: Types,
|
types: Types,
|
||||||
|
dev: Dev,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,6 +150,13 @@ toml_struct!{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toml_struct!{
|
||||||
|
struct Dev {
|
||||||
|
float_gen_distro_pos_stddiv: f32,
|
||||||
|
float_gen_distro_neg_stddiv: f32,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Params {
|
impl Params {
|
||||||
pub fn parse(p: &PathBuf) -> Self {
|
pub fn parse(p: &PathBuf) -> Self {
|
||||||
let file_string = fs::read_to_string(p)
|
let file_string = fs::read_to_string(p)
|
||||||
|
|
Loading…
Reference in a new issue