Skip to content

Commit

Permalink
Bump version to v0.8.1
Browse files Browse the repository at this point in the history
Signed-off-by: fanyinbo <[email protected]>
  • Loading branch information
fanyinbo committed Feb 2, 2024
1 parent e97ead8 commit 5f579b9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .ops/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ include:

variables:
APP_NAME: "xtreme1"
APP_VERSION: "0.8"
APP_VERSION: "v0.8.1"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">
<img width="386" alt="Xtreme1 logo" src="https://user-images.githubusercontent.com/84139543/190300943-98da7d5c-bd67-4074-a94f-b7405d29fb90.png">

![](https://img.shields.io/badge/Release-v0.8-green)
![](https://img.shields.io/badge/Release-v0.8.1-green)
![](https://img.shields.io/badge/License-Apache%202.0-blueviolet)
[![Twitter](https://img.shields.io/badge/Follow-Twitter-blue)](https://twitter.com/Xtreme1io)
[![Online](https://img.shields.io/badge/Xtreme1_Online-App-yellow)](https://app.basic.ai/#/login)
Expand Down Expand Up @@ -62,8 +62,8 @@ Image Data Curation (Visualizing & Debug) - [MobileNetV3](https://github.com/xi
Download the latest release package and unzip it.

```bash
wget https://github.com/xtreme1-io/xtreme1/releases/download/v0.8/xtreme1-v0.8.zip
unzip -d xtreme1-v0.8 xtreme1-v0.8.zip
wget https://github.com/xtreme1-io/xtreme1/releases/download/v0.8.1/xtreme1-v0.8.1.zip
unzip -d xtreme1-v0.8.1 xtreme1-v0.8.1.zip
```

## Start all services
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt update && \
apt install -y iputils-ping curl wget netcat python3 python3-pip git
RUN pip3 install --upgrade --force-reinstall git+https://github.com/xtreme1-io/xtreme1-sdk.git@d0cf4cc
WORKDIR /app
COPY --from=build /build/target/xtreme1-backend-0.8-SNAPSHOT.jar ./app.jar
COPY --from=build /build/target/xtreme1-backend-0.8.1-SNAPSHOT.jar ./app.jar
RUN mkdir -p config
RUN wget 'https://github.com/xtreme1-io/asset/raw/main/datasets/xtreme1-lidar-fusion-trial.zip' -O xtreme1-lidar-fusion-trial.zip
RUN wget 'https://github.com/xtreme1-io/asset/raw/main/datasets/xtreme1-image-trial.zip' -O xtreme1-image-trial.zip
Expand Down
2 changes: 1 addition & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ cd backend
mvn package

# Using local configuration to start application.
java -Dspring.profiles.active=local -jar target/xtreme1-backend-0.8-SNAPSHOT.jar
java -Dspring.profiles.active=local -jar target/xtreme1-backend-0.8.1-SNAPSHOT.jar
```

Now you can access the backend service at `http://localhost:8080/`.
Expand Down
2 changes: 1 addition & 1 deletion backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>ai.basic</groupId>
<artifactId>xtreme1-backend</artifactId>
<version>0.8-SNAPSHOT</version>
<version>0.8.1-SNAPSHOT</version>
<name>Xtreme1 Backend</name>
<description></description>

Expand Down
24 changes: 17 additions & 7 deletions backend/src/main/java/ai/basic/x1/usecase/UploadDataUseCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ public void parseTextUploadFile(DataInfoUploadBO dataInfoUploadBO) {
var rootPath = String.format("%s/%s", userId, datasetId);
var errorBuilder = new StringBuilder();
var dataInfoBOBuilder = DataInfoBO.builder().datasetId(datasetId)
.parentId(Constants.DEFAULT_PARENT_ID)
.type(ItemTypeEnum.SINGLE_DATA)
.status(DataStatusEnum.VALID)
.annotationStatus(DataAnnotationStatusEnum.NOT_ANNOTATED)
Expand Down Expand Up @@ -349,7 +350,7 @@ public void parseTextUploadFile(DataInfoUploadBO dataInfoUploadBO) {
dataInfoBOList.add(dataInfoBO);
});
if (CollectionUtil.isNotEmpty(dataInfoBOList)) {
insertBatch(dataInfoBOList, datasetId, errorBuilder);
insertBatch(dataInfoBOList, datasetId, errorBuilder, Constants.DEFAULT_PARENT_ID);
}
} catch (Exception e) {
log.error("Handle data error", e);
Expand Down Expand Up @@ -463,7 +464,15 @@ public void commonParseUploadFile(DataInfoUploadBO dataInfoUploadBO, BiConsumer<
var dataAnnotationObjectBOBuilder = DataAnnotationObjectBO.builder()
.datasetId(datasetId).createdBy(userId).createdAt(OffsetDateTime.now()).sourceId(sourceId);
sceneFileList.forEach(sceneFile -> {
var sceneId = this.saveScene(sceneFile, dataInfoUploadBO);
Long sceneId;
try {
sceneId = this.saveScene(sceneFile, dataInfoUploadBO);
} catch (DuplicateKeyException e) {
log.error("The scene already exists,scene name is {}", sceneFile.getName());
errorBuilder.append("Duplicate scene names:").append(sceneFile.getName()).append(";");
return;
}

var dataNameList = getDataNamesFunction.apply(sceneFile);
if (CollectionUtil.isEmpty(dataNameList)) {
log.error("The file in {} folder is empty", sceneFile);
Expand Down Expand Up @@ -498,7 +507,7 @@ public void commonParseUploadFile(DataInfoUploadBO dataInfoUploadBO, BiConsumer<
}
});
if (CollectionUtil.isNotEmpty(dataInfoBOList)) {
var resDataInfoList = this.insertBatch(dataInfoBOList, datasetId, errorBuilder);
var resDataInfoList = this.insertBatch(dataInfoBOList, datasetId, errorBuilder, sceneId);
this.saveBatchDataResult(resDataInfoList, dataAnnotationObjectBOList);
}
} catch (Exception e) {
Expand Down Expand Up @@ -1045,9 +1054,9 @@ public String getFilename(File file) {
*
* @param dataInfoBOList Collection of data details
*/
public List<DataInfoBO> insertBatch(List<DataInfoBO> dataInfoBOList, Long datasetId, StringBuilder errorBuilder) {
public List<DataInfoBO> insertBatch(List<DataInfoBO> dataInfoBOList, Long datasetId, StringBuilder errorBuilder, Long parentId) {
var names = dataInfoBOList.stream().map(DataInfoBO::getName).collect(Collectors.toList());
var existDataInfoList = this.findByNames(datasetId, names);
var existDataInfoList = this.findByNames(datasetId, parentId, names);
if (CollUtil.isNotEmpty(existDataInfoList)) {
var existNames = existDataInfoList.stream().map(DataInfoBO::getName).collect(Collectors.toList());
dataInfoBOList = dataInfoBOList.stream().filter(dataInfoBO -> !existNames.contains(dataInfoBO.getName())).collect(Collectors.toList());
Expand All @@ -1071,10 +1080,11 @@ public List<DataInfoBO> insertBatch(List<DataInfoBO> dataInfoBOList, Long datase
}
}

private List<DataInfoBO> findByNames(Long datasetId, List<String> names) {
private List<DataInfoBO> findByNames(Long datasetId, Long parentId, List<String> names) {
var dataInfoLambdaQueryWrapper = Wrappers.lambdaQuery(DataInfo.class);
dataInfoLambdaQueryWrapper.eq(DataInfo::getDatasetId, datasetId);
dataInfoLambdaQueryWrapper.in(DataInfo::getName, names);
dataInfoLambdaQueryWrapper.eq(DataInfo::getParentId, parentId);
return DefaultConverter.convert(dataInfoDAO.list(dataInfoLambdaQueryWrapper), DataInfoBO.class);
}

Expand Down Expand Up @@ -1145,4 +1155,4 @@ private void getLeafNodeList(List<Tree<String>> treeNodes, List<Tree<String>> le
}
});
}
}
}

0 comments on commit 5f579b9

Please sign in to comment.