|
|
@@ -113,7 +113,9 @@ public class NewDatasetServiceImpl implements NewDatasetService { |
|
|
datasetVo.setIdentifier(repositoryName); |
|
|
datasetVo.setIdentifier(repositoryName); |
|
|
datasetVo.setId(gitlinIid); |
|
|
datasetVo.setId(gitlinIid); |
|
|
datasetVo.setOwner((String) userInfo.get("login")); |
|
|
datasetVo.setOwner((String) userInfo.get("login")); |
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(datasetVo.getDatasetSource())){ |
|
|
|
|
|
datasetVo.setDatasetSource("用户上传"); |
|
|
|
|
|
} |
|
|
YamlUtils.generateYamlFile(JsonUtils.objectToMap(datasetVo), localPath, "dataset"); |
|
|
YamlUtils.generateYamlFile(JsonUtils.objectToMap(datasetVo), localPath, "dataset"); |
|
|
// dvc init 初始化 |
|
|
// dvc init 初始化 |
|
|
DVCUtils.dvcInit(localPath); |
|
|
DVCUtils.dvcInit(localPath); |
|
|
@@ -182,6 +184,9 @@ public class NewDatasetServiceImpl implements NewDatasetService { |
|
|
datasetVo.setIdentifier(repositoryName); |
|
|
datasetVo.setIdentifier(repositoryName); |
|
|
datasetVo.setId(datasetVo.getId()); |
|
|
datasetVo.setId(datasetVo.getId()); |
|
|
datasetVo.setOwner((String) userInfo.get("login")); |
|
|
datasetVo.setOwner((String) userInfo.get("login")); |
|
|
|
|
|
if (StringUtils.isEmpty(datasetVo.getDatasetSource())){ |
|
|
|
|
|
datasetVo.setDatasetSource("用户上传"); |
|
|
|
|
|
} |
|
|
YamlUtils.generateYamlFile(JsonUtils.objectToMap(datasetVo), localPath, "dataset"); |
|
|
YamlUtils.generateYamlFile(JsonUtils.objectToMap(datasetVo), localPath, "dataset"); |
|
|
|
|
|
|
|
|
// dvc init 初始化 |
|
|
// dvc init 初始化 |
|
|
@@ -269,9 +274,9 @@ public class NewDatasetServiceImpl implements NewDatasetService { |
|
|
version = (String) versionList.get(0).get("name"); |
|
|
version = (String) versionList.get(0).get("name"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
List<Map<String, Object>> fileDetailsAfterGitPull = DVCUtils.getFileDetailsAfterGitPull("E:\\test\\" +id, repositoryName, version, "data",gitLinkUsername, gitLinkPassword); |
|
|
|
|
|
|
|
|
List<Map<String, Object>> fileDetailsAfterGitPull = DVCUtils.getFileDetailsAfterGitPull(localPathlocal +id, repositoryName, version, "data",gitLinkUsername, gitLinkPassword); |
|
|
// 在localPathlocal+id+"/"+repositoryName目录下的dataset.yaml中取到元数据 |
|
|
// 在localPathlocal+id+"/"+repositoryName目录下的dataset.yaml中取到元数据 |
|
|
Map<String, Object> stringObjectMap = YamlUtils.loadYamlFile("E:\\test\\" + id + "\\" + repositoryName + "\\" + "dataset.yaml"); |
|
|
|
|
|
|
|
|
Map<String, Object> stringObjectMap = YamlUtils.loadYamlFile(localPathlocal + id + "\\" + repositoryName + "\\" + "dataset.yaml"); |
|
|
NewDatasetVo newDatasetVo = ConvertUtil.convertMapToObject(stringObjectMap, NewDatasetVo.class); |
|
|
NewDatasetVo newDatasetVo = ConvertUtil.convertMapToObject(stringObjectMap, NewDatasetVo.class); |
|
|
List<VersionVo> versionVos = new ArrayList<VersionVo>(); |
|
|
List<VersionVo> versionVos = new ArrayList<VersionVo>(); |
|
|
if (fileDetailsAfterGitPull!=null&&fileDetailsAfterGitPull.size()>0){ |
|
|
if (fileDetailsAfterGitPull!=null&&fileDetailsAfterGitPull.size()>0){ |
|
|
|