pub struct ExperimentFiles {
pub host: Option<String>,
pub username: Option<String>,
pub binary_call: Option<PathBuf>,
pub binary: Option<PathBuf>,
pub root: Option<PathBuf>,
pub cfg_contents: Option<String>,
pub parsed_cfg: Option<Token>,
pub runs_path: Option<PathBuf>,
pub experiments: Vec<ConfigurationValue>,
pub launch_configurations: Vec<ConfigurationValue>,
pub packed_results: ConfigurationValue,
/* private fields */
}
Expand description
Each experiment owns some files:
- main.cfg
- main.od
- remote
- launch in the future, instead of being inside main.cfg
- runs/{run#,job#}
- binary.results
Fields§
§host: Option<String>
The host with the path of these files. None if it is the hosting where this instance of caminos is running.
username: Option<String>
Optional username to access the host.
binary_call: Option<PathBuf>
How caminos was called in the terminal.
binary: Option<PathBuf>
The path where caminos binary file is located.
root: Option<PathBuf>
The root path of the experiments
cfg_contents: Option<String>
The raw contents of the main.cfg file
parsed_cfg: Option<Token>
§runs_path: Option<PathBuf>
§experiments: Vec<ConfigurationValue>
The experiments as extracted from the main.cfg.
launch_configurations: Vec<ConfigurationValue>
The list of configurations for launch.
Either extracted from main.cfg field launch_configurations
or from the launch file (TODO the latter).
packed_results: ConfigurationValue
The results packeted (or to be packeted) in binary.results.
Implementations§
Source§impl ExperimentFiles
impl ExperimentFiles
Sourcepub fn build_cfg_contents(&mut self) -> Result<(), Error>
pub fn build_cfg_contents(&mut self) -> Result<(), Error>
Reads and stores the contents of main.cfg.
pub fn cfg_contents_ref(&self) -> &String
Sourcepub fn cfg_enough_content(&self) -> bool
pub fn cfg_enough_content(&self) -> bool
If main.cfg has enough content to be considered correct. For a quick check without parsing it.
pub fn build_parsed_cfg(&mut self) -> Result<(), Error>
Sourcepub fn build_root_path(&mut self) -> Result<(), Error>
pub fn build_root_path(&mut self) -> Result<(), Error>
Builds the root directory and all parents.
pub fn build_runs_path(&mut self) -> Result<(), Error>
pub fn build_experiments(&mut self) -> Result<(), Error>
pub fn build_launch_configurations(&mut self) -> Result<(), Error>
Sourcepub fn compare_cfg(&self, other: &ExperimentFiles) -> Result<(), Error>
pub fn compare_cfg(&self, other: &ExperimentFiles) -> Result<(), Error>
Returns Ok if their main.cfg content is the same Otherwise returns an error and prints a diff.
pub fn build_packed_results(&mut self)
Sourcepub fn get_outputs_path(&self) -> PathBuf
pub fn get_outputs_path(&self) -> PathBuf
The directory where to store the generated output files from the Output action.
pub fn example_cfg() -> &'static str
pub fn example_od() -> &'static str
pub fn example_remote() -> &'static str
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExperimentFiles
impl !RefUnwindSafe for ExperimentFiles
impl !Send for ExperimentFiles
impl !Sync for ExperimentFiles
impl Unpin for ExperimentFiles
impl !UnwindSafe for ExperimentFiles
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more