diff --git a/.ops/.gitlab-ci.yml b/.ops/.gitlab-ci.yml index 57eea0b2..62a8c7b0 100644 --- a/.ops/.gitlab-ci.yml +++ b/.ops/.gitlab-ci.yml @@ -4,4 +4,4 @@ include: variables: APP_NAME: "xtreme1" - APP_VERSION: "0.9" + APP_VERSION: "0.9.1" diff --git a/README.md b/README.md index 222e2807..a3ab0565 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
Xtreme1 logo -![](https://img.shields.io/badge/Release-v0.9-green) +![](https://img.shields.io/badge/Release-v0.9.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) @@ -64,8 +64,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.9/xtreme1-v0.9.zip -unzip -d xtreme1-v0.9 xtreme1-v0.9.zip +wget https://github.com/xtreme1-io/xtreme1/releases/download/v0.9.1/xtreme1-v0.9.1.zip +unzip -d xtreme1-v0.9.1 xtreme1-v0.9.1.zip ``` ## Start all services diff --git a/backend/Dockerfile b/backend/Dockerfile index 399e4c7b..7ba02213 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -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.9-SNAPSHOT.jar ./app.jar +COPY --from=build /build/target/xtreme1-backend-0.9.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 diff --git a/backend/README.md b/backend/README.md index bbd3210a..213ddd71 100644 --- a/backend/README.md +++ b/backend/README.md @@ -92,7 +92,7 @@ cd backend mvn package # Using local configuration to start application. -java -Dspring.profiles.active=local -jar target/xtreme1-backend-0.9-SNAPSHOT.jar +java -Dspring.profiles.active=local -jar target/xtreme1-backend-0.9.1-SNAPSHOT.jar ``` Now you can access the backend service at `http://localhost:8080/`. diff --git a/backend/pom.xml b/backend/pom.xml index 15068ff2..0ad9cbe1 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -13,7 +13,7 @@ ai.basic xtreme1 - 0.9-SNAPSHOT + 0.9.1-SNAPSHOT 11 diff --git a/backend/src/main/java/ai/basic/x1/usecase/DataFlowUseCase.java b/backend/src/main/java/ai/basic/x1/usecase/DataFlowUseCase.java index 2b578ad0..16828a54 100644 --- a/backend/src/main/java/ai/basic/x1/usecase/DataFlowUseCase.java +++ b/backend/src/main/java/ai/basic/x1/usecase/DataFlowUseCase.java @@ -14,8 +14,8 @@ import java.util.Optional; /** - * @author chenchao - * @date 2022/8/26 + * @author chenchao, chanYoung + * @date 2024/4/15 */ public class DataFlowUseCase { @@ -51,19 +51,35 @@ public void submit(Long itemId) { if (DataStatusEnum.VALID.equals(status)) { annotationStatus = DataAnnotationStatusEnum.ANNOTATED; } - dataInfoDAO.updateById(DataInfo.builder().id(itemId).annotationStatus(annotationStatus).build()); + dataInfoDAO.updateById(DataInfo.builder().id(itemId).status(status).annotationStatus(annotationStatus).build()); var sceneId = dataEdit.getSceneId(); - if (ObjectUtil.isNotNull(sceneId) && DataStatusEnum.INVALID.equals(status)) { - dataInfoDAO.updateById(DataInfo.builder().id(sceneId).annotationStatus(DataAnnotationStatusEnum.INVALID).build()); - } else if (ObjectUtil.isNotNull(sceneId) && DataStatusEnum.VALID.equals(status)) { + if (ObjectUtil.isNotNull(sceneId)) { var lambdaQueryWrapper = Wrappers.lambdaQuery(DataInfo.class); lambdaQueryWrapper.eq(DataInfo::getDatasetId, dataEdit.getDatasetId()); lambdaQueryWrapper.eq(DataInfo::getParentId, sceneId); lambdaQueryWrapper.eq(DataInfo::getStatus, DataStatusEnum.INVALID); - if (dataInfoDAO.count() == 0) { - dataInfoDAO.updateById(DataInfo.builder().id(sceneId).annotationStatus(DataAnnotationStatusEnum.ANNOTATED).build()); + if (dataInfoDAO.count(lambdaQueryWrapper) == 0) { + dataInfoDAO.updateById(DataInfo.builder().id(sceneId).status(DataStatusEnum.VALID).annotationStatus(DataAnnotationStatusEnum.ANNOTATED).build()); + var dataInfoLambdaUpdateWrapper = Wrappers.lambdaUpdate(DataInfo.class) + .eq(DataInfo::getDatasetId, dataEdit.getDatasetId()) + .eq(DataInfo::getParentId, sceneId); + dataInfoLambdaUpdateWrapper.set(DataInfo::getAnnotationStatus, DataAnnotationStatusEnum.ANNOTATED); + dataInfoDAO.update(dataInfoLambdaUpdateWrapper); } else { - dataInfoDAO.updateById(DataInfo.builder().id(sceneId).annotationStatus(DataAnnotationStatusEnum.INVALID).build()); + dataInfoDAO.updateById(DataInfo.builder().id(sceneId).status(DataStatusEnum.INVALID).annotationStatus(DataAnnotationStatusEnum.INVALID).build()); + var dataInfoLambdaUpdateWrapper = Wrappers.lambdaUpdate(DataInfo.class) + .eq(DataInfo::getDatasetId, dataEdit.getDatasetId()) + .eq(DataInfo::getParentId, sceneId) + .eq(DataInfo::getStatus, DataStatusEnum.VALID); + dataInfoLambdaUpdateWrapper.set(DataInfo::getAnnotationStatus, DataAnnotationStatusEnum.ANNOTATED); + dataInfoDAO.update(dataInfoLambdaUpdateWrapper); + + var dataInfoLambdaUpdateWrapper2 = Wrappers.lambdaUpdate(DataInfo.class) + .eq(DataInfo::getDatasetId, dataEdit.getDatasetId()) + .eq(DataInfo::getParentId, sceneId) + .eq(DataInfo::getStatus, DataStatusEnum.INVALID); + dataInfoLambdaUpdateWrapper2.set(DataInfo::getAnnotationStatus, DataAnnotationStatusEnum.INVALID); + dataInfoDAO.update(dataInfoLambdaUpdateWrapper2); } } } diff --git a/docker-compose.yml b/docker-compose.yml index 3e23ffa3..bc7dc3af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -65,7 +65,7 @@ services: retries: 10 backend: # By default, Compose will pull image from Docker Hub when no local image found. - image: basicai/xtreme1-backend:v0.9 + image: basicai/xtreme1-backend:v0.9.1 pull_policy: always # Uncomment this line and comment previous line to build image locally, not pull from Docker Hub. # build: ./backend @@ -96,7 +96,7 @@ services: condition: service_healthy frontend: # By default, Compose will pull image from Docker Hub when no local image found. - image: basicai/xtreme1-frontend:v0.9 + image: basicai/xtreme1-frontend:v0.9.1 pull_policy: always # Uncomment this line and comment previous line to build image locally, not pull from Docker Hub. # build: ./frontend