Workdir config
This commit is contained in:
@@ -102,8 +102,6 @@ impl Datasets {
|
||||
let config = ConfigToml {
|
||||
dataset: DatasetConfig {
|
||||
name: Label::new("virtual-dataset").unwrap(),
|
||||
working_dir: None,
|
||||
|
||||
source: [(
|
||||
Self::virt_source(),
|
||||
Source::Filesystem {
|
||||
@@ -155,7 +153,10 @@ impl Datasets {
|
||||
});
|
||||
}
|
||||
|
||||
pub async fn open(config: impl Into<PathBuf>) -> Result<Self, std::io::Error> {
|
||||
pub async fn open(
|
||||
config: impl Into<PathBuf>,
|
||||
working_dir_root: impl Into<PathBuf>,
|
||||
) -> Result<Self, std::io::Error> {
|
||||
let path_config = config.into();
|
||||
let path_parent = path_config
|
||||
.parent()
|
||||
@@ -184,12 +185,7 @@ impl Datasets {
|
||||
}
|
||||
};
|
||||
|
||||
let path_workdir = config
|
||||
.dataset
|
||||
.working_dir
|
||||
.clone()
|
||||
.unwrap_or(path_parent.join(".pile"))
|
||||
.join(config.dataset.name.as_str());
|
||||
let path_workdir = working_dir_root.into().join(config.dataset.name.as_str());
|
||||
|
||||
let mut sources = HashMap::new();
|
||||
let mut disabled_sources = HashMap::new();
|
||||
|
||||
Reference in New Issue
Block a user