pub struct Config {
pub build: Option<String>,
pub python: PathBuf,
pub tree: Option<String>,
pub goal: Option<String>,
}Expand description
soma-tree.toml, at the root of the repository being explored.
Fields§
§build: Option<String>module:function — takes nothing, returns a Graph.
Optional, and not as a convenience: reading an investigation’s reasoning should not require knowing how to build its graph. Finished work — a paper, a repository nobody runs, one from before soma — has reasoning worth reading and may have nothing to probe. Without it, what needs a probe says so and the rest works.
python: PathBufThe interpreter that can import somatize. Rarely the one on PATH.
tree: Option<String>What this investigation is called, so several can share one store without seeing each other. Defaults to the repository’s own name.
It is in the name records are bound under, which is the one part of this that cannot be changed later without moving somebody’s directories.
goal: Option<String>Which way is better: min for a loss, max for an accuracy.
Declared here because it is not in the store: the direction lives in
the Goal handed to a sampler and is written in no record. Without it
trials are shown by their range, which is true anyway.
Implementations§
Source§impl Config
impl Config
Sourcepub fn building(&self) -> Result<&str, String>
pub fn building(&self) -> Result<&str, String>
How to build the graph, or why it cannot be.
The message is for whoever is about to probe and not for whoever reads: somebody looking at the reasoning never gets here.
Sourcepub fn read(repo: &Path) -> Result<Self, String>
pub fn read(repo: &Path) -> Result<Self, String>
Read from the repository and not from the checkout: how an experiment is built is a fact about the project now, and reading it out of each commit would leave one predating the file unprobeable.
Not being there is not a failure, for the same reason build is
optional: a repository from before soma has a reasoning worth reading
and nothing to probe, and it has no soma-tree.toml either. What needs
a probe still says so, through building.
Sourcepub fn towards(&self) -> Result<Option<Goal>, String>
pub fn towards(&self) -> Result<Option<Goal>, String>
Which way is better, if it was declared. What is not understood is
refused rather than read as not declared: a typo in goal would stop
saying which was best with nothing saying why.
pub fn tree(&self, repo: &Path) -> String
Sourcepub fn interpreter(&self, repo: &Path) -> PathBuf
pub fn interpreter(&self, repo: &Path) -> PathBuf
The interpreter, made absolute against the repo so that a relative
.venv/bin/python still resolves once the probe runs in a worktree
somewhere else entirely.