MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / parse_lib_config

Method parse_lib_config

src/deopt.rs:157–164  ·  view source on GitHub ↗

parse the custom library config

(&self)

Source from the content-addressed store, hash-verified

155
156 /// parse the custom library config
157 fn parse_lib_config(&self) -> Result<LibConfig> {
158 let data = self.get_library_data_dir()?;
159 let config_path: PathBuf = [data, "config.yaml".into()].iter().collect();
160 let content = std::fs::read_to_string(config_path)?;
161 let config: LibConfig = serde_yaml::from_str(&content)
162 .context("fail to parse yaml config file, please check your syntax")?;
163 Ok(config)
164 }
165
166 /// get the data directory of the library under test.
167 pub fn get_library_data_dir(&self) -> Result<PathBuf> {

Callers 1

newMethod · 0.80

Calls 1

get_library_data_dirMethod · 0.80

Tested by

no test coverage detected