@@ -5,7 +5,6 @@ use crate::log::DEFAULT_LOG_LEVEL;
55use anyhow:: Result ;
66use documented:: DocumentedFields ;
77use serde:: { Deserialize , Serialize } ;
8- use std:: env:: current_dir;
98use std:: fmt:: Write ;
109use std:: path:: { Path , PathBuf } ;
1110
@@ -48,9 +47,9 @@ pub struct Settings {
4847 pub overwrite : bool ,
4948 /// Whether to write additional information to CSV files
5049 pub debug_model : bool ,
51- /// Results root path to save MUSE2 results. Defaults to `{pwd}/ muse2_results`.
50+ /// Results root path to save MUSE2 results. Defaults to `muse2_results`.
5251 pub results_root : PathBuf ,
53- /// Results root path to save MUSE2 graph outputs. Defaults to `{pwd}/ muse2_graphs`.
52+ /// Results root path to save MUSE2 graph outputs. Defaults to `muse2_graphs`.
5453 pub graph_results_root : PathBuf ,
5554}
5655
@@ -60,8 +59,8 @@ impl Default for Settings {
6059 log_level : DEFAULT_LOG_LEVEL . to_string ( ) ,
6160 overwrite : false ,
6261 debug_model : false ,
63- results_root : current_dir ( ) . unwrap ( ) . join ( "muse2_results" ) ,
64- graph_results_root : current_dir ( ) . unwrap ( ) . join ( "muse2_graphs" ) ,
62+ results_root : PathBuf :: from ( "muse2_results" ) ,
63+ graph_results_root : PathBuf :: from ( "muse2_graphs" ) ,
6564 }
6665 }
6766}
@@ -147,10 +146,7 @@ mod tests {
147146 Settings :: load_from_path( & file_path) . unwrap( ) ,
148147 Settings {
149148 log_level: "warn" . to_string( ) ,
150- debug_model: false ,
151- overwrite: false ,
152- results_root: current_dir( ) . unwrap( ) . join( "muse2_results" ) ,
153- graph_results_root: current_dir( ) . unwrap( ) . join( "muse2_graphs" ) ,
149+ ..Settings :: default ( )
154150 }
155151 ) ;
156152 }
0 commit comments